Integration · OpenCode · T5 (v0.6.0-rc.6 candidate)

Sync OpenCode Sessions Across Devices | Reinstate

OpenCode reaches T5 in the v0.6.0-rc.6 release candidate: encrypted same-vendor session sync, on top of T3 native resume and fork, T4 structured handoff destination, and T2 handoff source. This is not yet a stable claim; stable remains v0.5.1, where OpenCode is T2 only. Reinstate extracts a portable document from OpenCode's embedded SQLite store and reassembles it in the destination's own store. OpenCode-to-OpenCode sync only.

Last verified
Current release
v0.6.0-rc.6
Release status
v0.6.0-rc.6 candidate · stable remains v0.5.1 · v0.6.0-rc.5 tagged Windows run (plus two same-artifact rechecks) ended FAIL (211/4/0/0 of 215), zero product defects, grok:E1-E3 live-backend-connectivity plus a grok version drift to 1.0.13 and an H7 digest-equality-unmeasurable gap the four PARTIAL rows · this candidate widens the verified Grok Build range to 1.0.13 and refines the H7 live-home check to per-file listing with attribution · native Windows tagged-artifact acceptance pending, macOS deferred

OpenCode support at a glance

Tier
T5 Encrypted sync
Release
v0.6.0-rc.6 candidate (stable remains v0.5.1)
Session direction
OpenCode → OpenCode
Storage family
F3 embedded SQLite session store
Tested version
1.18.211.18.29
Remote storage
Your S3-compatible or Cloudflare R2 bucket

OpenCode is the first embedded-SQLite agent to reach encrypted sync, alongside Claude Code and Codex CLI. T5 sits on top of the lower tiers: T1 read-only local discovery, T2rein handoff --from opencode, T3 rein resume / rein fork, and T4 rein handoff --to opencode. A version outside the tested range isUNTESTED; Reinstate permits read-only discovery but refuses export, restore, and launch.

T5 is new in the v0.6.0-rc.6 candidate, not yet a stable claim.

OpenCode's T5 encrypted sync, T4 handoff destination, and T3 native resume and fork all ship with the v0.6.0-rc.6 release candidate. Stable remainsv0.5.1, where OpenCode is T2 only, until a native Windows tagged-artifact run promotes this candidate. See the release boundary and thechangelog.

How OpenCode session sync works

OpenCode keeps every session in one embedded SQLite database rather than one file per session, so the synced unit is a portable, deterministic JSON document extracted from thesession, project, message, and parttables, with every absolute path normalized to a $${HOME} /$${REPO:<id>} token. The credential, account,control_account, and account_state tables are never opened.

  1. Export reads the session's rows through the embedded store, tokenizes every known path, and writes a single portable document as one tar entry.
  2. Restore writes that document back into the destination's own opencode.dbthrough a checkpointed working copy, fingerprint-guarded and backed up, then an atomic rename so a concurrent vendor write cannot corrupt the store.
  3. Native resume and fork call OpenCode's own continuation flags —opencode --session <id> and opencode --session <id> --fork— against the restored session, since OpenCode has no separate resume orfork verb.
  4. A handoff into or out of OpenCode starts a new session through a bounded bootstrap and a private, inspectable projection; it is never a cross-agent resume.

Structural paths are portable; transcript prose is not rewritten.

Reinstate changes known path fields needed for native resume and leaves free-form prompts, responses, and unknown fields alone. A session row OpenCode recorded without a working directory stays read-only, because OpenCode is always launched into a directory.

Security boundary

Reinstate reads the local OpenCode store and does not call a hosted OpenCode API or require OpenCode account credentials. The credential, account,control_account, and account_state tables are excluded from every export, and a round-trip test fails if a credential value appears in one. Storage credentials stay in the operating system keyring.

Session content is encrypted locally before upload. Because a transcript may contain sensitive text produced during a coding task, read thesecurity model and threat boundaries before syncing real sessions.

Current limitations

  • OpenCode assigns its own session id; a handoff into OpenCode reconciles that id after launch rather than pinning it, and is never a cross-agent resume.
  • Close OpenCode before pulling into a live store; a write in the residual window between the pre-rename fingerprint check and the rename is not detected.
  • A version outside the tested range cannot be pushed, pulled, or launched.
  • Credentials, MCP servers, skills, plugins, hooks, and agent settings are not synced.
  • Reinstate is independent of the OpenCode maintainers and is not an official OpenCode product.

Evidence

Committed fixtures live under testdata/adapters/opencode,testdata/sessionindex/opencode, and testdata/handoff/opencode. Per ADR 0005, this v0.6.0-rc.6 candidate's tagged-artifact acceptance for OpenCode's new T5 tier is native Windows x64 only; Apple Silicon macOS is deferred until that hardware returns, and no document here claims macOS verification for this candidate. See theOpenCode storage page, the compatibility record, and the tier matrix.