ExitPlanMode auto-rejected after repeated user rejections, trapping user in plan mode
Bug Description
After a user rejects ExitPlanMode several times (to provide iterative feedback on the plan), the permission system begins auto-rejecting all subsequent ExitPlanMode calls without showing the user the approval dialog. This permanently traps the user in plan mode with no way out except manually toggling it off.
Steps to Reproduce
- Enter plan mode (
/plan) - Let Claude build a plan and call
ExitPlanMode - Reject the
ExitPlanModecall to provide feedback (e.g., "add X to the plan") - Repeat steps 2-3 approximately 4 times with legitimate plan feedback
- On the ~5th
ExitPlanModecall, the approval dialog is no longer shown — the call is auto-rejected
Expected Behavior
Each ExitPlanMode call should present the approval dialog to the user, regardless of how many times it was previously rejected. Plan iteration (reject → give feedback → update plan → re-submit) is a normal workflow.
Actual Behavior
After ~4 rejections, ExitPlanMode is silently auto-rejected. The rejection message changes from including user feedback ("the user said: ...") to a generic "STOP what you are doing and wait for the user to tell you how to proceed" with no user input appended. Response times drop from minutes (user reading/typing) to 1-3 seconds (instant auto-rejection).
Evidence from Conversation Logs
Extracted from session 09709606 (Claude Code 2.1.73):
| Call # | Timestamp | Result | Response Time |
|--------|-----------|--------|---------------|
| 1 | 22:34 | User rejected with feedback | ~2 min |
| 2 | 22:51 | User rejected with feedback | ~4 min |
| 3 | 22:57 | User rejected with feedback | ~2 min |
| 4 | 22:59 | User rejected with feedback | ~2 min |
| 5 | 23:03 | Auto-rejected, no user feedback | 89 sec |
| 6 | 23:05:28 | Auto-rejected, no user feedback | 3 sec |
| 7 | 23:06:00 | Auto-rejected, no user feedback | 1 sec |
| 8 | 23:06:03 | Auto-rejected, no user feedback | 2 sec |
The user explicitly confirmed they did not reject calls 5-8: "I did not [reject it], I think you just failed to leave plan mode"
Even after Claude used AskUserQuestion and the user selected "Looks good, proceed," the immediately following ExitPlanMode was still auto-rejected in 3 seconds.
Environment
- Claude Code version: 2.1.73
- OS: Linux (WSL2)
- Model: claude-opus-4-6
- Plugins installed: groundwork (not related — plan mode instructions are CC built-in)
Workaround
User must manually toggle plan mode off via the UI when stuck in this loop.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗