Harnesses

OpenCode

XDG paths on every platform including Windows, one SQLite database for sessions, JSON or JSONC config at four locations, its own MCP dialect.
getHarness
getHarness("opencode")
binary
opencode
invoke modes
2 of 6 · official
model listing
no
mcp config
json · opencode
agents file
~/.config/opencode/AGENTS.md

OpenCode is the tidy one. Config is opencode.json or .jsonc at the user level under ~/.config/opencode/ and at the project level either in the root or under .opencode/. Everything it writes goes into one SQLite database under ~/.local/share/opencode/, through Drizzle, and the same paths hold on Windows, which the notes say so nobody adds an %APPDATA% variant.

MCP servers use the opencode dialect, which nests entries differently from the standard family; the library normalizes both directions. opencode run is the headless mode, --format json the structured one. No advisor and no sandbox, and it reads .claude/skills/ and ~/.agents/skills/ beside its own.

Capabilities and invocation

mcp: yesvision: yesaudio: novideo: notools: yesstreaming: yes

Binary opencode, evidence official. Model selection appends --model {model}.

advisor

{}

rejected

advisor · json

{ structured: true }

rejected

read-only

{ readOnly: true }

rejected

read-only · json

{ readOnly: true, structured: true }

rejected

agent

{ tools: true }

run {prompt}

agent · json

{ tools: true, structured: true }

run --format json {prompt}

Paths

Templates as the registry stores them. ~, ${HOME} and %VAR% expand in resolve(); entries tagged with a platform are dropped on the others. Open in the explorer to see them expanded for a home directory of your choice.

config

  • ~/.config/opencode/opencode.jsoncuser · official · allXDG-based, same path on all platforms.
  • ~/.config/opencode/opencode.jsonuser · official · all
  • opencode.jsoncproject · official · all
  • opencode.jsonproject · official · all
  • .opencode/opencode.jsoncproject · official · all
  • .opencode/opencode.jsonproject · official · all

sessions

  • ~/.local/share/opencode/opencode.dbdata · official · allSQLite database with sessions, messages, and parts. XDG-based, same path on all platforms.

instructions

  • AGENTS.mdproject · official · all
  • CLAUDE.mdproject · official · allSupported for Claude Code compatibility.
  • ~/.config/opencode/AGENTS.mduser · official · allGlobal user-level instructions.

skills

  • .opencode/skills/project · official · all
  • .claude/skills/project · official · allClaude Code compatible.
  • .agents/skills/project · official · all
  • ~/.claude/skills/user · official · allClaude Code compatible.
  • ~/.agents/skills/user · official · all

empty

commandshooks No known location. That is not the same as the feature being missing.

MCP servers

~/.config/opencode/opencode.jsonuser · json · opencode · mcp
opencode.jsonproject · json · opencode · mcp

Detection

envVars

None. Detection is by project markers only.

projectMarkers

.opencodeopencode.jsoncopencode.json

Persistence

  • JSON/JSONC - Config files. (official)
  • SQLite - Session and message storage via Drizzle ORM. (official)

syncAgentsFiles links ~/.config/opencode/AGENTS.md to the master bundle.

@agntn/harnesses·MIT license· Paths follow the upstream CLIs and carry their evidence level. This site reads nothing from your machine.