"Accept edits on" mode still prompts for Edit tool approval
Bug
With "accept edits on" (acceptEdits mode) active in the session status bar, the Edit tool still prompts for user approval on every call.
Environment
- Claude Code version: 2.1.104
- OS: macOS (Darwin 25.4.0, arm64)
- Installation: mise-managed single binary
- Working directory: git worktree at
.claude/.worktrees/master/(inside the project's.claude/directory)
Steps to reproduce
- Start a Claude Code session in a git worktree located at
<project>/.claude/.worktrees/<name>/ - Toggle to "accept edits on" mode (shift+tab until status bar shows "accept edits on")
- Ask Claude to edit any file (e.g. "change X in file Y")
- Observe: the Edit tool call shows a confirmation prompt ("Do you want to make this edit?") instead of auto-approving
Expected behavior
In acceptEdits mode, all Edit and Write tool calls to files within the working directories should be auto-approved without prompting.
Actual behavior
Every Edit call prompts for approval, despite the mode being active.
Analysis
From decompiled source, the acceptEdits path check works like:
// Check if path is within working directories
let $ = fS(H, _, K);
if ($) {
if (q === "read" || _.mode === "acceptEdits") return { allowed: true };
}
The fS function checks whether the file path falls within allowed working directories. The likely root cause is that the worktree path resolution fails when the working directory is nested inside .claude/.worktrees/. The path check function (fS) may not recognize the worktree directory as a valid working directory, causing the acceptEdits early-return to never trigger, falling through to the standard permission check which requires approval.
Settings files checked
All six settings files (global, project, worktree - both .json and .local.json) have no Edit/Write deny rules. The global settings.json has "deny": [].
Workaround
None found. Users must approve each edit individually.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗