Repository navigation
Edit tool prompts for permission despite bypassPermissions mode + --dangerously-skip-permissions flag #37181
Description
Bug Description
The Edit tool intermittently prompts for permission ("Do you want to make this edit?") despite all permission bypass settings being correctly configured. This happens mid-conversation — permissions work correctly at the start, then at some point switch to "acceptEdits" mode.
Critical observation: When this switch happens in one terminal window, it happens across ALL open Claude Code windows simultaneously shortly after, suggesting a shared runtime state issue rather than a per-session problem.
Environment
- Claude Code version: 2.1.81
- OS: macOS (Darwin 24.6.0)
- Shell: zsh
- CLI flag:
--dangerously-skip-permissions
Configuration (verified correct on all 3 levels)
Global (~/.claude/settings.json)
{
"permissions": {
"allow": ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "WebFetch", "WebSearch", "Agent", "NotebookEdit", "Skill", "mcp__comet-bridge__*", "mcp__firefoxbrowser__*"],
"defaultMode": "bypassPermissions"
},
"skipDangerousModePermissionPrompt": true,
"skipAutoPermissionPrompt": true,
"hooks": {
"PermissionRequest": [{
"hooks": [{
"type": "command",
"command": "bash ~/.claude/hooks/auto-approve-all.sh"
}]
}]
}
}Project (.claude/settings.json) — same allow list + bypassPermissions
Project-local (.claude/settings.local.json) — same allow list + bypassPermissions + same hook
auto-approve-all.sh hook
#!/bin/bash
cat > /dev/null &
echo '{"hookSpecificOutput":{"hookEventName":"PermissionRequest","permissionDecision":"allow","permissionDecisionReason":"auto-approved by hook"}}'
exit 0Reproduction
- Open multiple Claude Code sessions with
--dangerously-skip-permissions - All tools (Bash, Write, Read, Glob, Grep, Agent, TaskCreate, etc.) work without permission prompts
- At some point during a conversation, the Edit tool starts showing "Do you want to make this edit?" with options:
-
- Yes
-
- Yes, allow all edits during this session (shift+tab)
-
- No
-
- Shortly after this happens in one window, ALL other open Claude Code windows also start prompting for Edit permissions
Expected Behavior
Edit tool should never prompt for permission when bypassPermissions is the defaultMode, Edit is in the allow list, --dangerously-skip-permissions is active, and the PermissionRequest hook returns allow.
What I've Verified
- No managed/enterprise settings overriding
- No project-level settings in
~/.claude/projects/ - Settings files are NOT being modified at runtime (checked timestamps)
- All other tools bypass correctly — only Edit is affected
- Context window usage was only ~24% when the issue occurred (not context compression)
- This is NOT a one-time issue — it happens reproducibly in every longer session
Screenshot
The Edit tool prompting despite bypass mode:
(Edit tool showing "Do you want to make this edit?" dialog with 3 options while running in --dangerously-skip-permissions mode)
Activity
Kretsche49 commentedon Mar 21, 2026
Additional Critical Detail
The issue is worse than initially described:
Selecting option 2 ("Yes, allow all edits during this session") does NOT persist. The user reports that after selecting this option, another permission prompt appears ~10 seconds later for the next Edit call, and then another, and another — in an endless loop. The "allow all edits during this session" setting is effectively ignored or constantly reset.
This means:
bypassPermissionsmode is ignored--dangerously-skip-permissionsflag is ignoredEditin the allow list is ignoredallow) is ignoredThe user has to manually approve every single Edit call, making Claude Code essentially unusable for any task involving file modifications.
Combined with the cross-window synchronization of the bug (when it starts in one terminal, all terminals are affected simultaneously), this suggests the permission state is being actively overwritten by some internal process at runtime.
github-actions commentedon Mar 21, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Kretsche49 commentedon Mar 21, 2026
Screenshot
Here is the bug in action — Edit tool prompting for permission on
test_stp_manager.pydespite--dangerously-skip-permissionsflag being active (visible in all terminal tabs):Note: The
--dangerously-skip-permissionsflag is visible in multiple terminal tabs at the top of the screen. Yet the Edit tool still shows "Do you want to make this edit to test_stp_manager.py?" with the 3-option dialog.ddarbyson commentedon Mar 22, 2026
Similar reported bug - #11380 (comment)
Seems to be recent as of the last week or so.
Steviey commentedon Apr 4, 2026
+1 Rightsmanagement is an absolute mess. If this is security then...good luck!
github-actions commentedon May 15, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Jul 5, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.