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.json but 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
Description
When
~/.config/opencode/opencode.jsonis 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_directorypermission 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/, triggersexternal_directoryauthorization, 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
message=loading path=~/.config/opencode/opencode.jsonbut the resolved config is empty (all defaults)Screenshot and/or share link
No response
Operating System
macOS 26.6
Terminal
Terminal