Plan mode creates endless loop when ExitPlanMode is repeatedly rejected
Resolved 💬 3 comments Opened Mar 13, 2026 by htcxy009 Closed Mar 17, 2026
Description
When in plan mode, I experienced an endless loop where the assistant could not break out of the planning workflow.
Steps to reproduce
- Enter plan mode with a custom plan file location specified in the prompt
- Reference a user-defined rules file that allows creating and writing .md files
- Assistant writes to system-designated plan file instead of user-requested location
- After correcting, assistant calls
ExitPlanMode - User selects "stay in plan mode" to provide feedback
- Assistant calls
AskUserQuestion - User provides feedback (not selecting predefined options)
- Assistant calls
ExitPlanModeagain - Loop continues indefinitely
Expected behavior
- Assistant should respect user-specified plan file location from the start
- There should be a way to break out of the loop without approving the plan
- User feedback should be actionable without cycling back to the same tools
Actual behavior
- Forced into AskUserQuestion → ExitPlanMode → AskUserQuestion cycle
- No escape mechanism when neither tool achieves the user's goal
- System plan file location overrides user's custom rules
Environment
- Claude Code CLI in VSCode extension
- Plan mode active
- OS: Linux 6.17.0-14-generic x86_64 (Ubuntu)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗