-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
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.
Plugins
not applicable
OpenCode version
latest, tested on dev
Steps to reproduce
- Configure build agent as disabled:
{
"agent": {
"build": { "disable": true }
}
}- Enter plan mode
- Try to exit plan mode using
plan_exit - Error is thrown
Screenshot and/or share link
Operating System
Omarchy
Terminal
Ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working