Skip to content

Fixed OPENCODE_CONFIG_DIR to load config files.#4400

Merged
rekram1-node merged 1 commit into
devfrom
opencode/issue4399-20251117054639
Nov 17, 2025
Merged

Fixed OPENCODE_CONFIG_DIR to load config files.#4400
rekram1-node merged 1 commit into
devfrom
opencode/issue4399-20251117054639

Conversation

@opencode-agent
Copy link
Copy Markdown
Contributor

The fix is now complete. The change I made ensures that when OPENCODE_CONFIG_DIR is set, the code will also look for opencode.json and opencode.jsonc files in that directory, not just in directories ending with .opencode.

The key change is adding || dir === Flag.OPENCODE_CONFIG_DIR to the condition on line 78, which makes the config loading logic also apply to the flag directory.

Closes #4399

New%20session%20-%202025-11-17T05%3A46%3A38.944Z
opencode session  |  github run

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
@rekram1-node rekram1-node merged commit 3c6dcad into dev Nov 17, 2025
5 checks passed
@thdxr thdxr deleted the opencode/issue4399-20251117054639 branch February 7, 2026 06:24
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Fixed OPENCODE_CONFIG_DIR to load config files. (anomalyco#4400)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
Fixed OPENCODE_CONFIG_DIR to load config files. (anomalyco#4400)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPENCODE_CONFIG_DIR does not read custom config file.

1 participant