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

Closed
opened 2026-02-16 18:10:17 -05:00 by yindo · 2 comments
Owner

Originally created by @AlexD17 on GitHub (Feb 4, 2026).

Originally assigned to: @adamdotdevin on GitHub.

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_
Originally created by @AlexD17 on GitHub (Feb 4, 2026). Originally assigned to: @adamdotdevin on GitHub. ### 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: ```bash 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_
yindo added the bugweb labels 2026-02-16 18:10:17 -05:00
yindo closed this issue 2026-02-16 18:10:17 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 4, 2026):

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

  • #11425: [BUG] ENOENT on first run: cache directory not created before writing version file (related to cache directory handling)
  • #10441: opencode upgrade doesn't update plugin dependencies in ~/.config/opencode/package.json (related to ~/.config/opencode plugin path)
  • #12192: Black Screen after install Oh-my-opencode Plugin (similar plugin loading issue with oh-my-opencode)
  • #9075: BunInstallFailedError for opencode-antigravity-auth@1.2.8 (related to antigravity-auth plugin issues)

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

@github-actions[bot] commented on GitHub (Feb 4, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #11425: [BUG] ENOENT on first run: cache directory not created before writing version file (related to cache directory handling) - #10441: `opencode upgrade` doesn't update plugin dependencies in ~/.config/opencode/package.json (related to ~/.config/opencode plugin path) - #12192: Black Screen after install Oh-my-opencode Plugin (similar plugin loading issue with oh-my-opencode) - #9075: BunInstallFailedError for opencode-antigravity-auth@1.2.8 (related to antigravity-auth plugin issues) Feel free to ignore if none of these address your specific case.
Author
Owner

@thdxr commented on GitHub (Feb 5, 2026):

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

@thdxr commented on GitHub (Feb 5, 2026): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8567