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
[BUG] plan_exit throws error when build agent is disabled #9822
When the build agent is disabled via config (agent.build.disable: true - very niche I know, but could happen), the plan_exit tool throws an error when trying to exit plan mode. The tool appears to hardcode "build" as the target agent without checking if it exists or finding an available fallback.
Expected Behavior
Should fall back to an available primary agent (like plan or another custom agent) instead of erroring out.
Actual Behavior
Throws an error when trying to switch to the disabled build agent.
The issue appears to be in /packages/opencode/src/tool/plan.ts where the target agent is hardcoded to "build" without checking if that agent is available.
changed the title [-]plan_exit throws error when build agent is disabled[/-][+][BUG] plan_exit throws error when build agent is disabled[/+]on Jan 21, 2026
Fallback should be configurable. And if it is not configured, prompt the user a selection of the primary agents with the option to save for future tasks? Because if we pic the first primary agent which is not the plan agent that might be any agent which is actually not designed to do the implementation.
Activity
[-]plan_exit throws error when build agent is disabled[/-][+][BUG] plan_exit throws error when build agent is disabled[/+]wienans commentedon Jan 21, 2026
Fallback should be configurable. And if it is not configured, prompt the user a selection of the primary agents with the option to save for future tasks? Because if we pic the first primary agent which is not the plan agent that might be any agent which is actually not designed to do the implementation.
fix(tool): use default agent fallback in plan_exit when build is disa…
github-actions commentedon Mar 28, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.