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

  1. Enter plan mode with a custom plan file location specified in the prompt
  2. Reference a user-defined rules file that allows creating and writing .md files
  3. Assistant writes to system-designated plan file instead of user-requested location
  4. After correcting, assistant calls ExitPlanMode
  5. User selects "stay in plan mode" to provide feedback
  6. Assistant calls AskUserQuestion
  7. User provides feedback (not selecting predefined options)
  8. Assistant calls ExitPlanMode again
  9. 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗