[PR #4400] Fixed OPENCODE_CONFIG_DIR to load config files. #10956

Closed
opened 2026-02-16 18:15:43 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4400

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4400 **State:** closed **Merged:** Yes --- 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 <a href="https://opencode.ai/s/4cg2iZKz"><img width="200" alt="New%20session%20-%202025-11-17T05%3A46%3A38.944Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI1LTExLTE3VDA1OjQ2OjM4Ljk0NFo=.png?model=opencode/glm-4.6&version=1.0.68&id=4cg2iZKz" /></a> [opencode session](https://opencode.ai/s/4cg2iZKz)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/sst/opencode/actions/runs/19419738479)
yindo added the pull-request label 2026-02-16 18:15:43 -05:00
yindo closed this issue 2026-02-16 18:15:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10956