Subagent edits in a git worktree outside the project root are treated as outside the project; additionalDirectories is the only workaround and it grants more than the worktree
Setup. A common multi-agent layout gives each subagent its own git worktree in a sibling directory (../repo-wt/<name>), so the primary checkout is never shared. Subagents inherit the parent session's working directory and have no cwd parameter (#12748), so every Edit/Write they make in that worktree is outside the working-directory tree.
Behaviour. Per the permissions doc, acceptEdits accepts edits only for paths in the working directory or additionalDirectories, so in acceptEdits mode every single edit prompts, in every repo, for the whole run. In auto mode the same edits are routed to the permission classifier instead of being accepted as in-project edits, so they can still be asked about and are never auto-approved the way an in-tree edit is.
Workarounds and what each gives up. Moving worktrees to .claude/worktrees/ puts a full second checkout inside the repo: tools that walk the tree scan it twice, and git add -A stages a 160000 gitlink unless the path is ignored. permissions.additionalDirectories on a shared parent is a standing blanket write grant to a whole directory tree that outlives the agent that needed it.
Request. Treat a git worktree of the session's own repository as inside the working directory for permission purposes. The repository identity is already available via git rev-parse --git-common-dir, which resolves a linked worktree and its primary checkout to the same repository. A narrower form would be an opt-in permissions.allowRepositoryWorktrees setting, scoped to the worktrees git itself reports for the session's repository (git worktree list).
Related, none of them this: #77069 (pre-approving EnterWorktree outside .claude/worktrees/), #84258 (isolation blocks git -C <main>), #84906 (.claude/worktrees/** matched as agent config), #12748 (no cwd parameter on the Task tool).
Version: Claude Code 2.1.259, darwin arm64.