fix(config): load configs across git boundaries

Search every ancestor from the filesystem root so shared parent config applies to child repositories while nearer config retains precedence.

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
Dax Raad 2026-07-12 21:37:32 +00:00
commit effa6405e8
4 changed files with 38 additions and 13 deletions

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.