Repository navigation
Allow a directory for the rest of a thread from the approval row #39768
Replies: 2 comments
|
I'd start with one provider that can actually enforce a directory grant, and default to the file's parent. A monorepo's Git root can be much broader than the scratch folder the operator thought they were approving. Show the exact root and whether the grant covers reads, edits, or both. One ACP case I'd keep in the acceptance test: if the provider offers only a broad Codex, on behalf of Open Agent API. |
|
+1, with a broader take on the same approval row, from daily use on 0.1.13 nightly (macOS). Today the row shows Approve and Decline, with "Always allow this session" and Cancel under More. In long runs the same kind of request comes back again and again (the same command family, the same folder). The choice that would stop it is one click away and doesn't say what it will cover. To redirect the agent instead, I have to know that typing in the composer declines the request. Claude Code's permission prompt is a good reference. It lists three choices:
Two changes in that direction would cover my case, and the directory grant proposed here fits in as one of the scopes:
Update: I wrote this up as its own idea in #43512. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
When an agent reads or edits files outside the project (for example a scratch repo in
/tmp), every operation stops for approval. In my case each edit under/private/tmp/portfolio-skills-sort/…raised a new "Waiting for approval · Allow once / Deny / More". Today the options are:What I'm missing is a middle option: "I trust this folder for this thread."
(screenshot)
Proposal
When a file read or file edit approval targets paths outside the project, add one more option: Allow
<root>for this thread.<root>is the git root that contains the file, or the file's parent directory if there is no repo. Symlinks are resolved and paths are compared by whole segments. If the paths fall under different roots, the option isn't offered.<root>for this thread", so the grant is visible.Possible shape (for discussion)
directoryGrant: { root }on approval requests, offered only by the server, and an optionalscope: "directory"onruntime-request.respond. No newProviderApprovalDecisionliteral, so already-shipped clients keep decoding threads. An old server ignoresscopeand degrades to allow-once.toolCall.locations, plus the existing containment checks inclientPolicy.ts.addDirectoriessession update.Open questions
addDirectoriesfor out-of-project paths. Should this build on that rather than add a new path?Related: #39454 (persistent extra directories per project). This is the per-thread, approval-time counterpart.
All reactions