Summary
I noticed a mismatch between the published config docs and the current implementation.
The docs currently describe config precedence as:
- remote config
- global config
- custom config
- project config (
opencode.json in project)
.opencode directories — agents, commands, plugins
- inline config
That wording makes .opencode sound directory-only, not file-based.
But the implementation in packages/opencode/src/config/config.ts explicitly loads:
.opencode/opencode.jsonc
.opencode/opencode.json
as part of config precedence.
Evidence
In packages/opencode/src/config/config.ts:
// 5) .opencode directories (.opencode/agents/, .opencode/commands/, .opencode/plugins/, .opencode/opencode.json{,c})
and later:
if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) {
for (const file of ["opencode.jsonc", "opencode.json"]) {
result = mergeConfigConcatArrays(result, await loadFile(path.join(dir, file)))
}
}
But the public docs at packages/web/src/content/docs/config.mdx only say:
.opencode directories - agents, commands, plugins
Why this matters
Tooling and contributors can reasonably read the docs and conclude that .opencode/opencode.json is not an officially supported config file location.
That makes it harder to know whether behavior around .opencode/opencode.json is intentional API surface or just incidental implementation detail.
Suggested fix
Clarify the docs so step 5 explicitly mentions .opencode/opencode.json{,c} if that support is intentional.
If it is not intended to be supported, then the implementation and/or comments should be tightened instead.
Summary
I noticed a mismatch between the published config docs and the current implementation.
The docs currently describe config precedence as:
opencode.jsonin project).opencodedirectories — agents, commands, pluginsThat wording makes
.opencodesound directory-only, not file-based.But the implementation in
packages/opencode/src/config/config.tsexplicitly loads:.opencode/opencode.jsonc.opencode/opencode.jsonas part of config precedence.
Evidence
In
packages/opencode/src/config/config.ts:// 5) .opencode directories (.opencode/agents/, .opencode/commands/, .opencode/plugins/, .opencode/opencode.json{,c})and later:
But the public docs at
packages/web/src/content/docs/config.mdxonly say:Why this matters
Tooling and contributors can reasonably read the docs and conclude that
.opencode/opencode.jsonis not an officially supported config file location.That makes it harder to know whether behavior around
.opencode/opencode.jsonis intentional API surface or just incidental implementation detail.Suggested fix
Clarify the docs so step 5 explicitly mentions
.opencode/opencode.json{,c}if that support is intentional.If it is not intended to be supported, then the implementation and/or comments should be tightened instead.