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
Opencode will not launch if you set Agent permissions as True/False instead of Allow/Deny #7810
Started using opencode for the first time. Tried migrating some agents I had in Claude Code. Didn't read the documentation properly and set permissions as boolean true/false instead of allow/deny like the documentation states. Once I did that and saved my agent file, opencode just straight up refused to launch, but gave zero indication as to why.
Plugins
None
OpenCode version
1.1.13
Steps to reproduce
You can reproduce with this markdown:
---description: Test agentmode: subagenttools:
read: truepermission:
write: false---# Test Agent
This is a minimal test agent to debug the loading issue.
Save this to .opencode/agent/testing.md then try to launch opencode in your project directory.
Launching opencode just hangs here forever:
luke@wsl-desktop:~/projects/myproject$ opencode --print-logs --log-level DEBUG
INFO 2026-01-11T15:28:46 +361ms service=default version=1.1.13 args=["--print-logs","--log-level","DEBUG"] opencode
INFO 2026-01-11T15:28:46 +2ms service=config path=/home/luke/.config/opencode/config.json loading
INFO 2026-01-11T15:28:46 +1ms service=config path=/home/luke/.config/opencode/opencode.json loading
INFO 2026-01-11T15:28:46 +3ms service=config path=/home/luke/.config/opencode/opencode.jsonc loading
Logging unfortunately gave me nothing of note other than this one line:
I've figured this out - so I'm good for now. However I really wish there was a clearer indication of the problem here so I wasn't scratching my head and going off down rabbit holes trying to figure this out.
Both issues describe ConfigInvalidError exceptions that prevent OpenCode from launching due to invalid configuration. Your issue involves invalid permission format (true/false instead of allow/deny), which appears to be a schema validation problem similar to these reported cases.
Feel free to ignore if your issue involves a distinctly different aspect or if these don't match your specific error.
My PR fixes the crash for true/false, but error messages for other invalid config values still don't display clearly.
One potential solution would be to enhance the worker thread error handlers in packages/opencode/src/cli/cmd/tui/worker.ts to format errors using FormatError() and display them via console.error():
process.on("unhandledRejection", (e) => {
const formatted = FormatError(e)
Log.Default.error("rejection", {
e: e instanceof Error ? e.name : e,
formatted,
})
if (formatted) console.error(formatted)
})
process.on("uncaughtException", (e) => {
const formatted = FormatError(e)
Log.Default.error("exception", {
e: e instanceof Error ? e.name : e,
formatted,
})
if (formatted) console.error(formatted)
})
However, I'm not sure if maintainers would prefer this approach, so I did not implement it.
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues describe ConfigInvalidError exceptions that prevent OpenCode from launching due to invalid configuration. Your issue involves invalid permission format (true/false instead of allow/deny), which appears to be a schema validation problem similar to these reported cases.
Feel free to ignore if your issue involves a distinctly different aspect or if these don't match your specific error.
itstrivial commentedon Jan 11, 2026
My PR fixes the crash for
true/false, but error messages for other invalid config values still don't display clearly.One potential solution would be to enhance the worker thread error handlers in
packages/opencode/src/cli/cmd/tui/worker.tsto format errors usingFormatError()and display them viaconsole.error():However, I'm not sure if maintainers would prefer this approach, so I did not implement it.
ManningWorks commentedon Jan 11, 2026
I am personally fine with either:
If we can get both, great. If we can get your PR fix, great.
thdxr commentedon Mar 25, 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.