Description
In V2, editing the target of a symlinked global opencode.json leaves the running shared service using the old model limits. Touching the symlink itself with touch -h makes the new values take effect without restarting or explicitly reloading.
Expected: edits to the configuration's resolved target should trigger automatic reload.
Plugins
Custom plugins: chat-notify, current-time, rename-self, provider-loader. Not yet reproduced with custom plugins disabled.
OpenCode version
2.0.24 (latest channel)
Steps to reproduce
- Use a symlinked global config:
~/.config/opencode/opencode.json -> ~/dotfiles/opencode/opencode.json. The parent config directory is not itself a symlink.
- Start the shared service, then edit the target file. In the observed case, add
provider.openai.models["gpt-6.1-sol"].limit with {"context":1050000,"input":922000,"output":128000} (the existing config uses the compatible singular provider key).
- Query the effective model:
opencode api get /api/model |
jq '.data[] | select(.providerID == "openai" and .id == "gpt-6.1-sol") | {id, limit}'
It continues returning {"context":400000,"input":272000,"output":128000}.
- Without editing the file again or restarting the service, run:
touch -h ~/.config/opencode/opencode.json
- Repeat the query. It now returns
{"context":1050000,"input":922000,"output":128000}.
The symlink-touch comparison was performed once. A similar stale-config symptom was observed with another model; opencode api post /api/location/reload applied that change successfully. Logs show a directory watcher subscription for ~/.config/opencode. A symlink-target detection issue is suspected, but the implementation-level cause has not been confirmed.
Related: #39738 concerns initial config loading in V1, rather than this V2 hot-reload behavior.
Screenshot and/or share link
Not applicable; effective API values and commands are included above.
Operating System
macOS, Darwin 25.6.0, arm64
Terminal
tmux (TERM=xterm-256color, COLORTERM=truecolor)
Description
In V2, editing the target of a symlinked global
opencode.jsonleaves the running shared service using the old model limits. Touching the symlink itself withtouch -hmakes the new values take effect without restarting or explicitly reloading.Expected: edits to the configuration's resolved target should trigger automatic reload.
Plugins
Custom plugins:
chat-notify,current-time,rename-self,provider-loader. Not yet reproduced with custom plugins disabled.OpenCode version
2.0.24 (latest channel)
Steps to reproduce
~/.config/opencode/opencode.json -> ~/dotfiles/opencode/opencode.json. The parent config directory is not itself a symlink.provider.openai.models["gpt-6.1-sol"].limitwith{"context":1050000,"input":922000,"output":128000}(the existing config uses the compatible singularproviderkey).{"context":400000,"input":272000,"output":128000}.touch -h ~/.config/opencode/opencode.json{"context":1050000,"input":922000,"output":128000}.The symlink-touch comparison was performed once. A similar stale-config symptom was observed with another model;
opencode api post /api/location/reloadapplied that change successfully. Logs show a directory watcher subscription for~/.config/opencode. A symlink-target detection issue is suspected, but the implementation-level cause has not been confirmed.Related: #39738 concerns initial config loading in V1, rather than this V2 hot-reload behavior.
Screenshot and/or share link
Not applicable; effective API values and commands are included above.
Operating System
macOS, Darwin 25.6.0, arm64
Terminal
tmux (
TERM=xterm-256color,COLORTERM=truecolor)