[BUG] Claude Code self-approves under plan mode

Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Jul 5, 2025 · closed Feb 3, 2026

Environment

  • Platform (select one):
  • [ x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <1.0.43>
  • Operating System: <WSL cursor on Windows 11>
  • Terminal: <Cursor>

Bug Description

Claude Code self-approves under plan mode

Steps to Reproduce

  1. Turn on plan mode
  2. GIve it a task

Expected Behavior

Previousl, it creates a plan, waits for me to approve

Actual Behavior

I quoted claude code's own summary :

'Looking at the system reminder, it explicitly tells me:

"When you're done researching, present your plan by calling the exit_plan_mode tool, which will prompt the user to confirm the plan"

So I called exit_plan_mode because the system instructions told me that's how to present a plan to you for approval in plan mode. But clearly that's not working correctly - the tool is supposed to "prompt the user to confirm the plan" but instead it's just auto-approving without any user interaction.

The system expects me to use exit_plan_mode to show you the plan and get your approval, but the tool itself is broken and not actually prompting you properly.

You're right that I shouldn't be able to exit plan mode myself - that defeats the purpose of having you control when execution happens. This definitely seems like a bug in how the plan mode system works.'

And aside from self-approving"
" 1. Plan mode is working (system reminders active)

  1. exit_plan_mode tool is working (I can call it)
  2. But the UI element - the highlighted plan box - is not rendering
  3. This means you can't see/approve the plan properly

● Interesting! You've turned plan mode off, but I'm still getting the system reminders saying "Plan mode is active" and telling me not to make edits."

" This confirms there's a bug - the system is out of sync:

  • Your UI: Plan mode is off
  • My internal state: Still receiving plan mode restrictions

This explains the inconsistent behavior we saw earlier. The plan mode system isn't properly synchronizing between the user interface and the backend restrictions."

Additional Context

This didn't occur until today. Not sure if it's caused by me tinkering with the settings like permissions, but seems unlikely.

View original on GitHub ↗

8 Comments

registered2nd · 1 year ago

Ok Can confirm. Local permission settings could mess with plan mode. I am able to enter it properly after deleting the local settings. I'll tinker to see how I can properly keep the settings though.

jontaxproduction · 1 year ago

I've identified and fixed the root cause of this bug on Claude Code v2.0.9. The issue
affects all reported versions.

### Root Cause

ExitPlanMode was in the allow array of ~/.claude/settings.json (global settings). This
pre-approved the tool, completely bypassing the mandatory user approval dialog.

Why this breaks Plan Mode:

  • Tools in the allow list are pre-approved and skip permission dialogs
  • ExitPlanMode MUST show a UI dialog by design (to display the plan for user review)
  • Pre-approval bypasses this critical safety feature
  • Tool returns "User has approved your plan" immediately without user interaction

### The Fix
Edit ~/.claude/settings.json and remove "ExitPlanMode", from the allow array:

Before:
"allow": [
"Task",
"TodoWrite",
"ExitPlanMode",
"WebFetch",
...
]

After:
"allow": [
"Task",
"TodoWrite",
"WebFetch",
...
]

Restart Claude Code completely (settings load at startup)

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

SDpower · 10 months ago

I believe the issue isn't related to permissions, but rather to the system design's prompt mechanism. It misinterprets keywords as commands, and editing ~/.claude/settings.json reveals a clear design flaw.

sdhjl2000 · 9 months ago

same problem ,claude code generate plan and display "exit plan mode,start do XXX",but don't do anything

github-actions[bot] · 8 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 8 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 8 months ago

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.