Skip to content

Opencode will not launch if you set Agent permissions as True/False instead of Allow/Deny #7810

Closed as not planned

Description

@ManningWorks

Description

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 agent
mode: subagent
tools:
  read: true
permission:
  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:

ERROR 2026-01-11T15:28:47 +11ms service=default e=ConfigInvalidError exception

Screenshot and/or share link

N/A

Operating System

Ubuntu 22.04.5 (Windows WSL2)

Terminal

Windows Terminal


My Ask

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.

Activity

  1. github-actions commented on Jan 11, 2026

    @github-actions
    Contributor

    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.

  2. itstrivial commented on Jan 11, 2026

    @itstrivial

    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.

  3. ManningWorks commented on Jan 11, 2026

    @ManningWorks
    Author

    I am personally fine with either:

    1. Your Fix
    2. Better outputs to help diagnosis

    If we can get both, great. If we can get your PR fix, great.

  4. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions