claude-code - 💡(How to fix) Fix `acceptEdits` mode does not extend to `additionalDirectories` (Edit/Write still prompt per-file)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Fix Action

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?

Code Example

{
  "permissions": {
    "defaultMode": "acceptEdits",
    "additionalDirectories": [
      "/Users/me/.claude/plans",
      "/tmp"
    ]
  }
}

---

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

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix `acceptEdits` mode does not extend to `additionalDirectories` (Edit/Write still prompt per-file)