feat(config): add OPENCODE_DISABLE_GLOBAL_CONFIG env var #10013
+344
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add environment variable flag to disable loading global user configuration, mirroring the existing
OPENCODE_DISABLE_PROJECT_CONFIGfeature from #8093.Fixes #10021
Use Case
Running multiple opencode processes with different versions where global config (
~/.config/opencode) conflicts with local agent development.What Gets Disabled
When
OPENCODE_DISABLE_GLOBAL_CONFIG=true:~/.config/opencode/- global config directory (config files, agents, commands, plugins)~/.opencode/- user home .opencode directory~/.config/opencode/AGENTS.md- global rule file~/.claude/CLAUDE.md- claude compat rule fileBehavior Matrix
Usage
Test Plan
OPENCODE_DISABLE_GLOBAL_CONFIGOPENCODE_DISABLE_PROJECT_CONFIGtests still pass