anomalyco / anomalyco/opencode
Config.update() writes runtime local config to ignored project-root config.json (re-open)
@neriousy is already working on this.
Since Aug 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Runtime local config updates made through Config.update() do not round-trip through instance disposal/reload correctly.
Config.update() writes to project-root config.json, but fresh project config loading reads the normal opencode.json / opencode.jsonc paths and local .opencode/opencode.json[c] overlays instead.
Because of that mismatch, a runtime config update can appear to work immediately, then disappear after the instance is disposed and reloaded.
Related:
- Duplicate of #28966 (auto-closed after inactivity)
- Previous fix attempt PR #28967 was closed unmerged, the bug is still present on
dev
Proposed fix
Write runtime local updates to the file the loader reads last (existing .opencode/opencode.jsonc, else .opencode/opencode.json, else plain opencode.json / opencode.jsonc), merging with existing content.
Plugins
No response
OpenCode version
v1.18.2 and current dev
Steps to reproduce
- Start with a project where a runtime config update changes agent config through the config update path
- Trigger the config update
- Let the instance get disposed/reloaded
- Use the updated config again after reload
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.