fix(config): load configs across git boundaries (#36568)

Co-authored-by: Dax Raad <thdxr@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-07-12 22:07:20 +00:00
committed by GitHub
co-authored by Dax Raad opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
parent f8f8cc9546
commit 6e55ddd078
4 changed files with 38 additions and 13 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ For project-specific TUI settings, add `tui.json` alongside it.
Place project specific config in the root of your project.
:::
When OpenCode starts up, it first looks for a config file in the current directory, then traverses up to the nearest Git directory.
When OpenCode starts up, it looks for config files in the current directory and every ancestor directory. Ancestor configs are loaded first, so configs closer to the current directory can override them. This traversal continues across Git repository boundaries.
This is also safe to be checked into Git and uses the same schema as the global one.