fix: ensure explore subagent has external_directory perm set to ask instead of auto denying (#14060)

This commit is contained in:
Aiden Cline
2026-02-17 20:16:55 -06:00
committed by GitHub
parent 0ca75544ab
commit 25f3eef957
2 changed files with 18 additions and 3 deletions

View File

@@ -75,6 +75,20 @@ test("explore agent denies edit and write", async () => {
})
})
test("explore agent asks for external directories and allows Truncate.GLOB", async () => {
const { Truncate } = await import("../../src/tool/truncation")
await using tmp = await tmpdir()
await Instance.provide({
directory: tmp.path,
fn: async () => {
const explore = await Agent.get("explore")
expect(explore).toBeDefined()
expect(PermissionNext.evaluate("external_directory", "/some/other/path", explore!.permission).action).toBe("ask")
expect(PermissionNext.evaluate("external_directory", Truncate.GLOB, explore!.permission).action).toBe("allow")
},
})
})
test("general agent denies todo tools", async () => {
await using tmp = await tmpdir()
await Instance.provide({