Skip to content

Opencode fails to launch if it cant write to config #8126

Closed

Description

@ShoeBoom

Description

created a fix in #8125

when opencode launches it will try to add "$schema": "https://opencode.ai/config.json" if it is not already there

If opencode is unable to write to config it crashes with this error

ran into this since my config is syslinked from nix-store and you cant write to nix-store

❯ opencode
EACCES: permission denied, open '/Users/usr/.config/opencode/opencode.jsonc'
    path: "/Users/usr/.config/opencode/opencode.jsonc",
 syscall: "open",
   errno: -13,
    code: "EACCES"

      at write (unknown:1:1)
      at load (src/config/config.ts:1167:19)
      at load (src/config/config.ts:1097:23)
      at src/config/config.ts:1064:23
      at resolveNetworkOptions (src/cli/network.ts:35:31)
      at src/cli/cmd/tui/thread.ts:119:31
      at processTicksAndRejections (unknown:7:39)

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jan 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions