You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: global config only loads when cwd is $HOME, not subfolders #36485
The global config file (~/.config/opencode/opencode.jsonc) is only loaded when running opencode2 from $HOME. When running from any subfolder (e.g. $HOME/dev, $HOME/dev/project), the global config is ignored and no MCP servers, instructions, or other settings are applied.
Environment
opencode version: 0.0.0-next-15355 (next channel)
OS: Darwin 25.5.0, arm64 (macOS, Apple Silicon)
Terminal: xterm-256color with truecolor support
Shell: /bin/zsh
Install/channel: mise-managed, opencode2 binary via Node, next channel
Active plugins: None configured
Reproduction
Place a valid config at ~/.config/opencode/opencode.jsonc with MCP servers defined (e.g. chrome-devtools, github_grep).
Open a terminal in $HOME and run opencode2.
Run /status — confirms 2 MCP servers connected.
Close opencode, cd ~/Developer, run opencode2 again.
Run /status — shows "No MCP Servers".
Expected Behavior
The global config at ~/.config/opencode/opencode.jsonc should be loaded regardless of the current working directory, so MCP servers and other settings work in any subfolder.
Actual Behavior
Only $HOME triggers global config loading. All subfolders get an empty config state.
Additional Context
No opencode.json or opencode.jsonc exists in ~/Developer or its parents between $HOME and ~/Developer (confirmed via fd).
opencode2 in $HOME
opencode2 in $HOME/Developer
Output of fd opencode showing there is no config file overwriting the global one
Nevermind, it only works on non-git subfolders and I believe the commit above had nothing to do with it.
Won't reopen because #36539 already explains the current behavior.
Activity
diegoquiroz commentedon Jul 12, 2026
Probably the bug was introduced in one of today's releases (July 11th) because it was working earlier
opencode-agent commentedon Jul 12, 2026
Could you share the output of the following from both
$HOMEand$HOME/Developer? Please redact anything sensitive.Also, does the following load the global config correctly from
$HOME/Developer?This will tell us whether a relative config-directory override is being resolved against the current working directory.
diegoquiroz commentedon Jul 12, 2026
No, still opens without loading the config. I tried to also set manually the value of
$OPENCODE_CONFIG_DIRand had no effect.diegoquiroz commentedon Jul 13, 2026
Fixed on #36577
diegoquiroz commentedon Jul 14, 2026
Nevermind, it only works on non-git subfolders and I believe the commit above had nothing to do with it.
Won't reopen because #36539 already explains the current behavior.