feat(config): add OPENCODE_DISABLE_GLOBAL_CONFIG env var#10013
Open
kynnyhsap wants to merge 3 commits intoanomalyco:devfrom
Open
feat(config): add OPENCODE_DISABLE_GLOBAL_CONFIG env var#10013kynnyhsap wants to merge 3 commits intoanomalyco:devfrom
kynnyhsap wants to merge 3 commits intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
This was referenced Jan 22, 2026
0424cfa to
66a8f5e
Compare
Add environment variable flag to disable loading global user configuration, mirroring the existing OPENCODE_DISABLE_PROJECT_CONFIG feature. When set, this skips: - ~/.config/opencode/ (global config directory) - ~/.opencode/ (user home .opencode directory) - Global rule files (AGENTS.md, CLAUDE.md) Useful for running multiple opencode processes with different versions where global config conflicts with local agent development.
…ig disabled OPENCODE_CONFIG_DIR is an explicit override and should always be respected, even when OPENCODE_DISABLE_GLOBAL_CONFIG is set. This ensures consistency with how config.ts handles OPENCODE_CONFIG_DIR.
7522885 to
c968e61
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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