fix(opencode): give OPENCODE_CONFIG_CONTENT proper priority for setting config based on docs#11670
Merged
rekram1-node merged 2 commits intoanomalyco:devfrom Feb 2, 2026
Conversation
…ents and moved OPENCODE_CONFIG_CONTENT to the end for proper priority handling
…ence documentation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Collaborator
|
/review |
Contributor
|
lgtm |
opencode-agent bot
added a commit
that referenced
this pull request
Feb 1, 2026
…riority for setting config based on docs
opencode-agent bot
added a commit
that referenced
this pull request
Feb 1, 2026
…riority for setting config based on docs
opencode-agent bot
added a commit
that referenced
this pull request
Feb 2, 2026
…riority for setting config based on docs
ishaksebsib
pushed a commit
to ishaksebsib/opencode
that referenced
this pull request
Feb 4, 2026
…ng config based on docs (anomalyco#11670)
ishaksebsib
pushed a commit
to ishaksebsib/opencode
that referenced
this pull request
Feb 4, 2026
…ng config based on docs (anomalyco#11670)
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.
What does this PR do?
Fixes #11628
The
OPENCODE_CONFIG_CONTENTenv used to set the opencode config in the docs is said to have the highest priority, but it was not, as its set before the opencode.json files inside the.opencodedirectory for the project.So the fix was to move the logic mergiing configs from the env lower to give it higher prior, and also added better comments to help the next developer understand whats going on and the flow of the priorities with a link to the docs.
How did you verify your code works?
Tested with a simple repo with a theme set in the
.opencode/opencode.jsonand then passing in aOPENCODE_CONFIG_CONTENTopencode with a different theme and that new forced one is set, as it should.