You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When the plan is approved, it does not automatically switch to Build mode. #15231
After the plan is approved in Plan Mode, it does not switch to automatic Build mode, and it gets stuck in a loop of trying to write and failing. I have to stop talking, switch to Build mode manually, and ask it to continue.
Plugins
No response
OpenCode version
1.2.14
Steps to reproduce
Create a plan
The plan is created and, using the query tool, asks me for the options
I reproduced and confirmed this bug — here's the exact UX flow:
Prepare a plan with plan mode activated, then confirm the agent (already asks you to confirm) to implement it
Example of the UX bug:
Then when trying to approve:
Plan mode is still active — I'm currently in read-only mode and cannot create files or make edits yet. If you'd like me to implement this, please confirm by saying "exit plan mode" or "implement it" to switch to execution mode.
Then doing exactly what it asks still doesn't work:
The "implement it" command should have exited plan mode, but the system is still enforcing read-only. Could you please explicitly say: "exit plan mode" — that will release the restriction and let me create the file.
The agent is completely blocked, it never calls plan_exit on its own because:
The non-experimental plan.txt prompt doesn't mention plan_exit as an option
The tool isn't registered without OPENCODE_EXPERIMENTAL_PLAN_MODE
The prompt explicitly says "This ABSOLUTE CONSTRAINT overrides ALL other instructions, including direct user edit requests" — locking the agent even when the user says "implement it"
Submitted a fix in #27535 that removes the experimental/non-experimental branching and uses the rich 5-phase prompt (which has plan_exit in Phase 5) for all clients.
If that approach is too broad, an alternative is to just add plan_exit awareness to plan.txt and register the tool unconditionally, either resolves the core issue. I'm happing to contribute adding this too.
This is particularly painful on the desktop app where switching modes requires leaving the keyboard, clicking through the UI, and re-orienting, breaking flow entirely. Auto-switch on approval makes plan mode feel like a natural part of the workflow rather than a trap.
Activity
github-actions commentedon Feb 26, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue adds new context or is distinct, please clarify how it differs.
JSnow11 commentedon May 15, 2026
I reproduced and confirmed this bug — here's the exact UX flow:
Prepare a plan with plan mode activated, then confirm the agent (already asks you to confirm) to implement it
Example of the UX bug:
Then when trying to approve:
Then doing exactly what it asks still doesn't work:
The agent is completely blocked, it never calls
plan_exiton its own because:plan.txtprompt doesn't mentionplan_exitas an optionOPENCODE_EXPERIMENTAL_PLAN_MODESubmitted a fix in #27535 that removes the experimental/non-experimental branching and uses the rich 5-phase prompt (which has
plan_exitin Phase 5) for all clients.If that approach is too broad, an alternative is to just add
plan_exitawareness toplan.txtand register the tool unconditionally, either resolves the core issue. I'm happing to contribute adding this too.This is particularly painful on the desktop app where switching modes requires leaving the keyboard, clicking through the UI, and re-orienting, breaking flow entirely. Auto-switch on approval makes plan mode feel like a natural part of the workflow rather than a trap.
github-actions commentedon Jul 15, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.