anomalyco / anomalyco/opencode
Global config silently ignored when ~/.config/opencode/opencode.json is a symlink (stow/dotfile managers broken since ~v1.18.x)
@kitlangton is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When ~/.config/opencode/opencode.json is a symlink (e.g. managed via GNU Stow or similar dotfile managers), the config is silently ignored and opencode falls back to defaults. No error or warning is logged.
This worked correctly before the external_directory permission system was introduced (~v1.18.x). It appears the new permission system creates a chicken-and-egg problem: when loading the global config file, opencode resolves the symlink, detects the real path is outside ~/.config/opencode/, triggers external_directory authorization, but has no config loaded yet to evaluate the permission — so it silently discards the file.
Plugins
@mohak34/opencode-notifier@latest
OpenCode version
1.18.5
Steps to reproduce
- Place your opencode.json in a different directory, e.g. ~/dotfiles/opencode/.config/opencode/opencode.json
- Create a symlink: ln -sf ~/dotfiles/opencode/.config/opencode/opencode.json ~/.config/opencode/opencode.json
- Run: opencode debug config --print-logs
- Observe: logs show
message=loading path=~/.config/opencode/opencode.jsonbut the resolved config is empty (all defaults) - Compare: OPENCODE_CONFIG=~/dotfiles/opencode/.config/opencode/opencode.json opencode debug config → config loads correctly
Screenshot and/or share link
No response
Operating System
macOS 26.6
Terminal
Terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.