This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Repository navigation
Commit 2a79f91
feat(config): add configBoundary option for parent config traversal
Adds a configBoundary field to control how far up the filesystem OpenCode
walks when searching for parent configs, opencode.json files, and instruction
files like AGENTS.md.
'current' (default) — stops at git worktree root, backward compatible
'home' — walks to $HOME, enables client-level MCP/AGENTS.md
'root' — walks to /
'none' — stops immediately, disables parent config inheritance
Use case: a ~/Projects/ClientA/opencode.jsonc with ASU-specific MCPs gets
picked up by all projects under ClientA/ when configBoundary is 'home' in
the global config.
Also resolves relative instruction paths (./foo.md) from the config file
directory rather than cwd, so client-level configs can reference local files.
Closes anomalyco#10707
Co-authored-by: Sisyphus <[email protected]>1 parent 1772e8e commit 2a79f91
4 files changed
Lines changed: 41 additions & 8 deletions
File tree
- packages
- core/src
- flag
- v1/config
- opencode/src
- config
- session
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
118 | 133 | | |
119 | 134 | | |
120 | 135 | | |
| |||
220 | 235 | | |
221 | 236 | | |
222 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
223 | 245 | | |
224 | 246 | | |
225 | 247 | | |
| |||
394 | 416 | | |
395 | 417 | | |
396 | 418 | | |
| 419 | + | |
| 420 | + | |
397 | 421 | | |
398 | | - | |
| 422 | + | |
399 | 423 | | |
400 | 424 | | |
401 | 425 | | |
| |||
404 | 428 | | |
405 | 429 | | |
406 | 430 | | |
407 | | - | |
| 431 | + | |
408 | 432 | | |
409 | 433 | | |
410 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments