The first runtime Hydrate never execs.
Every other runtime works the same way: the runtime runs a Hydrate shim
binary, the shim translates an envelope on stdin, Hydrate answers on
stdout. opencode has no such hook. It runs a local HTTP service that
owns every session, so there is nothing to exec and no envelope to
translate. Hydrate talks to it as a client instead, from inside
hydrate-server.
Three legs, all wire-verified
Verified live against opencode v2.0.18 — not inferred from
documentation. There is no --force-unverified-runtime gate
on opencode: that flag guards guessed hook formats, and nothing here
was guessed.
- Inject. Recalled memory is attached as a durable,
keyed instruction entry (
api/hydrate.memory) and re-presented at every step boundary, rather than stapled to a single prompt. In the verification run a session picked up 14.7 KB of real project canon eight seconds after creation and answered from it, quoting canon entries verbatim. - Capture. Finished sessions POST to
/sessions/importwithsource=opencode, and every event carries a real working directory, so sessions land against the right project. - MCP.
hydrate install-hookswrites opencode's MCP entry;hydrate uninstall-hooksstrips it again.
Why there is no cmd/opencode-* binary
Hydrate's other integrations are envelope translators — one small binary per runtime per lifecycle event. That shape assumes the runtime will launch a process and hand it JSON on stdin. opencode never does. A long-lived client is the right shape for a service that owns its own sessions, so the opencode support lives beside the other capture clients rather than inside the shim framework. Fewer moving parts, and nothing to keep in step with a hook format that does not exist.
What this shares with every other runtime
The same local store. A decision captured in an opencode session is
recalled in Claude Code or Codex on the same machine, and the reverse.
Nothing leaves the box: ~/.hydrate/data.db is the primary
store and the hot path.
Two commands and your opencode sessions remember.
Install Hydrate, run hydrate install-hooks, and the
watcher picks up opencode sessions automatically.