Skip to content

Conversation

@OpeOginni
Copy link
Contributor

What does this PR do?

Fixes #11628

The OPENCODE_CONFIG_CONTENT env 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 .opencode directory 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.json and then passing in a OPENCODE_CONFIG_CONTENT opencode with a different theme and that new forced one is set, as it should.

…ents and moved OPENCODE_CONFIG_CONTENT to the end for proper priority handling
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

Hey! Your PR title Fix(opencode): give OPENCODE_CONFIG_CONTENT proper priority for setting config based on docs doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@OpeOginni OpeOginni changed the title Fix(opencode): give OPENCODE_CONFIG_CONTENT proper priority for setting config based on docs fix(opencode): give OPENCODE_CONFIG_CONTENT proper priority for setting config based on docs Feb 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

lgtm

opencode-agent bot added a commit that referenced this pull request Feb 1, 2026
opencode-agent bot added a commit that referenced this pull request Feb 1, 2026
opencode-agent bot added a commit that referenced this pull request Feb 2, 2026
@rekram1-node rekram1-node merged commit f02499f into anomalyco:dev Feb 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPENCODE_CONFIG_CONTENT does not have highest precedence config loading

2 participants