What
The global config directory was renamed to Redcode, but the file name inside it was not. The effective path today is:
~/.config/redcode/opencode.jsonc
A redcode directory holding an opencode.jsonc does not read as deliberate from any angle.
Side effect seen in practice
Users end up with two identical files — ~/.config/opencode/opencode.jsonc (stale) and ~/.config/redcode/opencode.jsonc (live). Editing the wrong one looks like the config silently not applying.
Product decision (decided)
Move config out of the XDG tree into the RedDB family: ~/.red/redcode/config.json (jsonc retained). Trades XDG_CONFIG_HOME coherence for coherence with ~/.red/redskilled. Data and cache directories move alongside to keep all three siblings under ~/.red/redcode/.
Scope
packages/core/src/config.ts:146 — global/project file names
packages/opencode/src/config/config.ts and packages/opencode/src/skill/index.ts reference the names
packages/core/src/plugin/skill/customize-opencode.md instructs the agent to edit ~/.config/opencode/
OPENCODE_* env family: OPENCODE_CONFIG*, OPENCODE_TEST_HOME
- Project-level
opencode.json and .opencode/ at repo root stay unchanged
Compatibility matters more than the rename. Read new path first, fall back to old.
Acceptance criteria
What
The global config directory was renamed to Redcode, but the file name inside it was not. The effective path today is:
A
redcodedirectory holding anopencode.jsoncdoes not read as deliberate from any angle.Side effect seen in practice
Users end up with two identical files —
~/.config/opencode/opencode.jsonc(stale) and~/.config/redcode/opencode.jsonc(live). Editing the wrong one looks like the config silently not applying.Product decision (decided)
Move config out of the XDG tree into the RedDB family:
~/.red/redcode/config.json(jsonc retained). Trades XDG_CONFIG_HOME coherence for coherence with~/.red/redskilled. Data and cache directories move alongside to keep all three siblings under~/.red/redcode/.Scope
packages/core/src/config.ts:146— global/project file namespackages/opencode/src/config/config.tsandpackages/opencode/src/skill/index.tsreference the namespackages/core/src/plugin/skill/customize-opencode.mdinstructs the agent to edit~/.config/opencode/OPENCODE_*env family:OPENCODE_CONFIG*,OPENCODE_TEST_HOMEopencode.jsonand.opencode/at repo root stay unchangedCompatibility matters more than the rename. Read new path first, fall back to old.
Acceptance criteria
~/.red/redcode/config.jsonfirst, thenconfig.jsonc, then~/.config/redcode/opencode.jsonc, then~/.config/redcode/opencode.json.~/.red/redcode/(siblings ofconfig.json); existing XDG locations continue to be read as fallback.OPENCODE_CONFIG,OPENCODE_CONFIG_DIR, andOPENCODE_TEST_HOMEoverride all path discovery.opencode.jsonand.opencode/at the repo root are unchanged.packages/core/src/plugin/skill/customize-opencode.mdno longer tells the agent to edit~/.config/opencode/.~/.config/redcode/opencode.jsoncas the live config path.bun typecheckand focused tests inpackages/coreandpackages/opencodepass.