[BUG] Task-specific auto-approval incorrectly persists globally to subsequent unrelated tasks
Description
When a user approves automatic completion of remaining edits in a multi-step task (e.g., "yes, make the remaining changes automatically"), Claude Code incorrectly persists that automatic approval mode to subsequent unrelated tasks instead of reverting back to requiring approval after the current task completes.
This is distinct from explicitly setting global auto-approve mode via SHIFT-TAB.
Expected Behavior
Two different approval modes should exist:
- Global mode (SHIFT-TAB): User explicitly switches to automatic mode, which persists across all tasks until user changes it again
- Task-specific mode (approve remaining): User approves automatic completion of just the remaining steps in the current task, then reverts to requiring approval for the next task
Current (Buggy) Behavior
When user approves "make the remaining changes automatically" in response to Claude's prompt, Claude Code treats it the same as SHIFT-TAB (global mode) and continues making automatic changes to subsequent unrelated tasks without asking for approval.
Steps to Reproduce
- Start a task requiring multiple file edits (e.g., 6 edits across different files)
- Approve the first 2 edits manually
- When prompted for the 3rd edit, respond: "yes, make the remaining changes automatically"
- Claude completes edits 3-6 automatically ✅ (expected)
- Ask a new, unrelated question that requires file edits
- Claude immediately makes edits without asking for approval ❌ (bug - should ask for approval)
Impact
This bug can cause significant damage:
- Unintended file modifications
- File deletions
- Lost work
- Breaking changes committed without review
In our session, this led to deletion of a critical template file when the user expected to be prompted before changes.
Related Issues
This appears to be the inverse of several existing permission persistence issues:
- #12070 - Session permission mode 'acceptEdits' not persisting (opposite problem - doesn't persist when it should)
- #9348 - "Allow all edits" setting not respected (doesn't persist when it should)
- #2988 - Auto-Accept Mode automatically enabling from Plan Mode (similar unwanted persistence)
- #7148 - Claude ignoring auto accept mode
- #20401 - Claude commits without approval despite warnings
Proposed Solution
Task-specific auto-approval (from user responding to a prompt) should:
- Only apply to completing the current task
- Automatically revert to the previous approval mode when the task is complete
- Be distinct from global SHIFT-TAB mode switching
Environment
- Platform: macOS
- Version: Current latest
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗