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
A schema-invalid file in .opencode/agent/ and the same file in .opencode/mode/ produce very different results. A bad agent file throws ConfigInvalidError and breaks startup (4 different requests fail, no agent load at all). A bad mode file is silently dropped from the mode list with no error, log, or hint that anything was wrong.
Both behaviors are in packages/opencode/src/config/agent.tsload() calls ConfigParse.schema(....) which throws; loadMode() uses Schema.decodeUnkownExit and it just skips invalid entries. Ideally, as a user, both should surface an error and continue loading the rest of the files. So there's an inconsistency with the error handling of these two loading mechanisms.
Plugins
No response
OpenCode version
1.14.48 (built from source, dev branch at commit 549b146e
Steps to reproduce
Steps to Repro:
In an empty dir, create .opencode/agent/good.md and .opencode/mode/good.md with valid frontmatter (e.g temperature: 0.5).
Create .opencode/agent/broken.md and .opencode/mode/broken.md with temperature: "not a valid number".
Run bun dev <dir you added agent and mode files> or opencode <dir you added agent and mode files>.
Startup will fail with 4 of 5 requests failed: ConfigInvalidError. No agents load.
If you delete agent/broken.md and rerun. Startup succeeds, but the broken mode is missing from the mode list, it'll show a good mode due to good.md but broken mode is silently missing with no error displayed.
Expected:
I'd expect both bad files to produce a visible error; and be consistent. My personal preference would be for it load opencode, but display an error upon start showing md file xyz (in this case broken.md) is invalid and won't load.
Activity
fix(opencode): report invalid agent/mode configs instead of crashing …
github-actions commentedon Jul 13, 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.