Skip to content

[Desktop v21] Plugin loading path changed from ~/.config/ to ~/.cache/, breaking plugins with data files #12222

Closed

Description

@AlexD17

Description

Description

OpenCode Desktop (v21) changed the plugin loading path from ~/.config/opencode/ to ~/.cache/opencode/, causing plugins like opencode-antigravity-auth to fail because they can't find their data files.

Environment

  • OpenCode Version: Desktop v21
  • OS: macOS
  • Affected Plugins: opencode-antigravity-auth, oh-my-opencode

Current Behavior

After updating to v21, OpenCode Desktop now loads plugins from ~/.cache/opencode/node_modules/ instead of ~/.config/opencode/node_modules/.

This causes issues because:

  1. Plugin data files (e.g., antigravity-accounts.json) are stored in ~/.config/opencode/
  2. When plugins run from ~/.cache/opencode/, they look for their data files in the wrong location
  3. Results in authentication failures and broken plugin functionality

Expected Behavior

According to XDG Base Directory specification:

  • Config files should be in ~/.config/opencode/ (✅ currently correct)
  • Plugin data should also be in ~/.config/opencode/ or follow the same location as config
  • Cache (~/.cache/opencode/) should only contain regenerable data like downloaded packages and temporary files

Workaround

Manually copying plugin data files from ~/.config/opencode/ to ~/.cache/opencode/ temporarily fixes the issue:

cp ~/.config/opencode/antigravity-accounts.json ~/.cache/opencode/

### Plugins

oh-my-opencode

### OpenCode version

V1.1.51

### Steps to reproduce

1、Have plugins installed in ~/.config/opencode/node_modules/ (previous behavior)
2、Update to OpenCode Desktop v21
3、Observe that plugins are now loaded from ~/.cache/opencode/node_modules/
4、Plugins that store data in ~/.config/opencode/ fail to find their configuration files

### Screenshot and/or share link

1、Keep plugin loading in ~/.config/opencode/ (previous behavior), OR
2、Ensure plugins can correctly locate their data files regardless of where node_modules/ is located

### Operating System

MACOS 26

### Terminal

_No response_

Activity

  1. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

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

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

  2. thdxr commented on Feb 5, 2026

    @thdxr
    Member

    tried to look into this - it seems like it's a bit of confusing behavior

    the data files were always in ~/.cache - we occasionally push versions that wipe the cache which is why you maybe saw the issue

    unfortunately we do not control where plugins write data files so we can't tell them to write them to a different place

  3. added a commit that references this issue on Feb 5, 2026
    3f90ffa
  4. added a commit that references this issue on Sep 19, 2026
    06e13e6
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 workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions