Description
When modifying either the global opencode.json or a project-level opencode.json, OpenCode continues to use the initial configuration loaded at startup. The cache does not refresh, causing outdated settings to persist.
Steps to Reproduce
Initialize a project with opencode.json
Start OpenCode (or run any process that loads config)
Modify values inside:
global opencode.json or
project root opencode.json
Re-run OpenCode or trigger config usage
Expected Behavior
OpenCode should:
Detect changes in config files, or
Reload configuration on each run, or
Provide a mechanism to invalidate/refresh cache
Actual Behavior
Old configuration is still used
Changes in opencode.json are ignored
Cache appears to persist from first initialization
Impact
Makes configuration updates ineffective
Causes inconsistent behavior during development
Forces manual restarts or cache clearing (if possible)
Environment
OS: (macOS / Linux )
OpenCode version: 1.14.33
Runtime: (Node.js : v25.9.0)
Possible Causes
Config loaded once and stored in memory without invalidation
Missing file watcher or hash-based reload mechanism
Cache layer not tied to file modification timestamps
Suggested Fix
Implement file watching (e.g. fs.watch / notify)
Add config hash comparison before reuse
Provide explicit --reload-config flag or cache invalidation API
Additional Context
This behavior is especially problematic in workflows where config is dynamically updated or generated.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
When modifying either the global opencode.json or a project-level opencode.json, OpenCode continues to use the initial configuration loaded at startup. The cache does not refresh, causing outdated settings to persist.
Steps to Reproduce
Initialize a project with opencode.json
Start OpenCode (or run any process that loads config)
Modify values inside:
global opencode.json or
project root opencode.json
Re-run OpenCode or trigger config usage
Expected Behavior
OpenCode should:
Detect changes in config files, or
Reload configuration on each run, or
Provide a mechanism to invalidate/refresh cache
Actual Behavior
Old configuration is still used
Changes in opencode.json are ignored
Cache appears to persist from first initialization
Impact
Makes configuration updates ineffective
Causes inconsistent behavior during development
Forces manual restarts or cache clearing (if possible)
Environment
OS: (macOS / Linux )
OpenCode version: 1.14.33
Runtime: (Node.js : v25.9.0)
Possible Causes
Config loaded once and stored in memory without invalidation
Missing file watcher or hash-based reload mechanism
Cache layer not tied to file modification timestamps
Suggested Fix
Implement file watching (e.g. fs.watch / notify)
Add config hash comparison before reuse
Provide explicit --reload-config flag or cache invalidation API
Additional Context
This behavior is especially problematic in workflows where config is dynamically updated or generated.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response