`acceptEdits` mode does not extend to `additionalDirectories` (Edit/Write still prompt per-file)

Resolved 💬 1 comment Opened May 31, 2026 by aaronsleeper Closed Jul 3, 2026

Summary

defaultMode: "acceptEdits" auto-accepts Edit/Write operations within the project root, but does NOT extend to directories declared in additionalDirectories. Edits to files in trusted additional directories still prompt per-file, despite the directory being declared "trusted" via that field.

Reproduce

.claude/settings.local.json:

{
  "permissions": {
    "defaultMode": "acceptEdits",
    "additionalDirectories": [
      "/Users/me/.claude/plans",
      "/tmp"
    ]
  }
}
  1. Open a session in a project root.
  2. Have the agent Edit a file within the project root → auto-accepts silently (expected ✓).
  3. Have the agent Edit a file in /Users/me/.claude/plans/foo.md → prompts with "Make this edit to foo.md? 1 Yes 2 No" (unexpected ✗).
  4. Have the agent Edit a file in /tmp/foo.md → same prompt.

Expected

acceptEdits mode should extend to all directories declared in additionalDirectories, since those directories have been explicitly opted in as trusted scope.

Actual

Edits to files in additionalDirectories still trigger per-file confirmation dialogs.

Workaround

Add explicit path-glob rules to the allow array:

"allow": [
  "Edit(/Users/me/.claude/**)",
  "Write(/Users/me/.claude/**)",
  "Edit(/tmp/**)",
  "Write(/tmp/**)"
]

This works, but raises the question: what is additionalDirectories for if not this?

Why this matters

For a user running long-lived sessions that edit many files in trusted scratch directories (e.g., ~/.claude/plans/ for plan files, /tmp/ for scratch work), dozens of permission dialogs per day appear that the user reflexively confirms without reading. The dialogs don't add safety — the agent is already authorized to read and analyze those files — but they do add friction and (when combined with #45374) cause accidental confirmations.

Either:

  1. This is intended (and additionalDirectories only governs read access), in which case the docs should make this very clear and recommend the path-glob workaround for write access; or
  2. This is a gap where the two settings should compose, and acceptEdits mode should automatically extend to declared additionalDirectories.

Environment

  • Claude Code: VS Code extension, recent build (Opus 4.7 model)
  • macOS, darwin 25.5.0
  • Date observed: 2026-05-31

Related

  • #45374 — focus-stealing dialog (compounds with this; together they make Edit confirmations a meaningful source of accidental approvals)
  • #56699 — similar shape: an allow-scope ("for all projects") that doesn't extend where users expect

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗