-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Bug Description
When a user message is prefixed with [[PLAN]], the agent is supposed to only analyze the codebase, ask clarifying questions, and write a plan to plan.md — without making any code changes.
However, during a recent session, the agent implemented the full feature (edited source files, created configuration, ran tests) while still in Plan Mode.
Steps to Reproduce
- Send a message prefixed with
[[PLAN]]describing a new feature request. - The agent correctly creates
plan.mdand inserts todos into the SQL database. - The agent then proceeds to implement the feature (edits files, runs tests, marks todos as
done) without the user switching out of Plan Mode or explicitly saying "start" / "implement it".
Expected Behavior
In Plan Mode, the agent should:
- Analyze the codebase
- Ask clarifying questions if needed
- Write the plan to the session plan file
- Stop — and wait for the user to explicitly trigger implementation (e.g., by switching out of Plan Mode with Shift+Tab and saying "start")
Actual Behavior
The agent created the plan and immediately implemented it within the same Plan Mode turn, making edits to:
src/config/environment.jssrc/services/ReverseGeocoder.js.env.env.example
It also ran tests and marked all todos as done — all while still in [[PLAN]] mode.
Session Context
- Agent version: 0.0.416
- Model: Claude Sonnet 4.6 (
claude-sonnet-4.6) - Trigger: The user replied "Implement the new feature and configure .env file" to the plan summary prompt (via the
exit_plan_modetool's feedback mechanism), which the agent interpreted as permission to implement rather than staying in plan mode and letting the user switch modes manually.
Notes
The root cause may be that the exit_plan_mode tool's "User feedback" path allowed the agent to interpret inline feedback as an out-of-plan-mode instruction. The plan mode instructions state:
Do NOT start implementing unless the user explicitly asks (e.g., "start", "get to work", "implement it"). When they do, suggest switching out of plan mode with Shift+Tab (if still in plan mode), and read plan.md first.
The agent received "Implement the new feature" as feedback on the plan approval and acted on it immediately instead of suggesting the user switch modes first.