Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds-triageMaintainer needs to evaluateMaintainer needs to evaluate
Description
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 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_HOME- Project-level
opencode.jsonand.opencode/at repo root stay unchanged
Compatibility matters more than the rename. Read new path first, fall back to old.
Acceptance criteria
- Global config is read from
~/.red/redcode/config.jsonfirst, thenconfig.jsonc, then~/.config/redcode/opencode.jsonc, then~/.config/redcode/opencode.json. - When a legacy file is found at one of the fallback paths, the app moves it to the new path on next run (or links it) so users do not silently lose settings.
- Data and cache directories live under
~/.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. - Project-level
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/. - README no longer references
~/.config/redcode/opencode.jsoncas the live config path. -
bun typecheckand focused tests inpackages/coreandpackages/opencodepass.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-triageMaintainer needs to evaluateMaintainer needs to evaluate
Activity
filipeforattini commentedon Aug 18, 2026
dev triagekept this issue inneeds-triagebecause it is not yet safe forready-for-agent.Missing: missing acceptance-criteria section.
Add a machine-checkable acceptance criteria section. Each item should name a verifiable artifact: a test, command, fixture, or pinned observable behavior.
Template:
filipeforattini commentedon Aug 18, 2026
dev triagekept this issue inneeds-triagebecause it is not yet safe forready-for-agent.Missing: acceptance criteria item is not machine-checkable: README is updated; the half-truth about the renamed config is removed..
Add a machine-checkable acceptance criteria section. Each item should name a verifiable artifact: a test, command, fixture, or pinned observable behavior.
Template:
filipeforattini commentedon Aug 18, 2026
Fixed by #46. Moving the config to ~/.red/redcode/config.jsonc with XDG fallback for compatibility, and adding config.json[c] as the new primary name (redcode.json[c] and opencode.json[c] still read as fallbacks).
fix(core): move global config to ~/.red/redcode/config.json[c]
fix(core): move global config to ~/.red/redcode/config.json[c] (#46)
fix(opencode): honor configured model in ACP default selection (#53)