Plan mode violation: Edit tool executed despite plan mode being active
Resolved 💬 3 comments Opened Sep 27, 2025 by Mgabr90 Closed Oct 1, 2025
Issue: Claude Code executed an Edit tool while in plan mode, violating the plan mode restrictions.
Details:
- Plan mode was active with explicit instructions to not execute non-readonly tools
- System provided multiple reminders about plan mode restrictions
- Despite this, the Edit tool was successfully executed on file: /root/learnhouse/apps/web/components/Resume/combobox.tsx
- The edit modified line 109:
onSelect={(selectedValue) => {toonSelect={(selectedValue: string) => { - System reminder only appeared AFTER the edit was completed
Expected Behavior:
Plan mode should prevent execution of non-readonly tools before they complete, not just show warnings after
Actual Behavior:
Edit tool executed successfully, then system reminder appeared explaining the violation
Impact:
User noticed the violation and requested this report
Session Context:
- User was in plan mode requesting analysis of final TypeScript error
- Claude should have used ExitPlanMode tool instead of directly editing
- The edit was technically correct but violated the plan mode protocol
Suggestion:
Implement pre-execution validation to block non-readonly tools during plan mode rather than relying on post-execution warnings.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗