[BUG] Session permission mode 'acceptEdits' not persisting - repeated Edit permission prompts on Linux
STDIN
Bug Description
When selecting "Yes, and accept all for this session" for Edit operations, Claude Code continues to request permission for every subsequent Edit operation instead of honoring the session-level permission mode.
Environment
- Version: Claude Code 2.0.49
- Platform: Linux (Fedora)
- Installation: Native
Steps to Reproduce
- Start Claude Code session
- Perform an Edit operation
- When prompted, select "Yes, and accept all for this session"
- Perform another Edit operation on the same or different file
- Permission prompt appears again (should not happen)
Expected Behavior
After selecting "accept all for this session", all subsequent Edit operations in the same session should execute without permission prompts. The acceptEdits mode should persist for the entire session.
Actual Behavior
Every Edit operation triggers a new permission request, despite the mode being set to acceptEdits after each approval.
Evidence from Debug Logs
The debug logs clearly show the pattern:
2025-11-21T09:14:31.598Z [DEBUG] executePermissionRequestHooks called for tool: Edit
2025-11-21T09:14:33.695Z [DEBUG] Applying permission update: Setting mode to 'acceptEdits'
2025-11-21T09:14:46.526Z [DEBUG] executePermissionRequestHooks called for tool: Edit
2025-11-21T09:14:49.583Z [DEBUG] Applying permission update: Setting mode to 'acceptEdits'
2025-11-21T09:14:56.259Z [DEBUG] executePermissionRequestHooks called for tool: Edit
2025-11-21T09:14:58.697Z [DEBUG] Applying permission update: Setting mode to 'acceptEdits'
The mode is being SET after each approval but NOT CHECKED before the next permission request.
Root Cause Analysis
The executePermissionRequestHooks function is being called for every Edit operation without first checking if the current permission mode (acceptEdits) allows the operation. The session state is being updated but not consulted.
Impact
- Severe productivity impact when making multiple file edits
- User frustration with repetitive permission dialogs
- Defeats the purpose of "accept all for this session" option
Related Issues
- #7104 - Similar Windows-specific bug (fixed in v1.0.105, but potentially regressed in v2.0.x for Linux)
- #11073 - Feature request for cycleable permission scopes (related workflow)
Suggested Fix
Before calling executePermissionRequestHooks for Edit operations, check if the current session permission mode is acceptEdits. If so, skip the permission request and allow the operation.
Configuration Details
Global settings (~/.claude/settings.local.json):
{
"permissions": {
"defaultMode": "acceptEdits"
}
}
The defaultMode: "acceptEdits" setting also appears to be ignored at session startup.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]
Same here for macOS as well. It's so annoying und makes the permission system completely useless. For every batch command, which is allowed in the .claude/settings.local.json, Claude Code asks EVERY time, when it wants to execute it.
How on earth can this not be fixed for three weeks?! This makes Claude UNUSABLE!!
Running into this a lot today too.
@bcherny Is this in development? It seems like the old issue is was automatically closed due to inactivity (https://github.com/anthropics/claude-code/issues/11206)
Same problem on Windows. Makes Claude Code CLI almost usable. I have to babysit every single edit on text files for example