Integration · OpenCode · T5 (stable v0.6.0)

Sync OpenCode Sessions Across Devices | Reinstate

OpenCode reaches T5 in stable v0.6.0: encrypted same-vendor session sync, on top of T3 native resume and fork, T4 structured handoff destination, and T2 handoff source. Certified by native Windows x64 tagged-artifact acceptance PASS under the single-platform waiver in ADR 0005; Apple Silicon macOS acceptance is deferred to #403. 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
Release status
v0.6.0 stable · native Windows x64 tagged-artifact acceptance PASS (215/215 required rows, docs/testing/results/2026-09-09-windows-v060rc8.md) under the single-platform waiver (ADR 0005) · Apple Silicon macOS acceptance deferred to #403 · supersedes v0.5.1

OpenCode support at a glance

Tier
T5 Encrypted sync
Release
Stable v0.6.0 (native Windows x64 certified, macOS deferred #403)
Session direction
OpenCode → OpenCode
Storage family
F3 embedded SQLite session store
Tested version
1.18.21–1.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 stable v0.6.0.

OpenCode's T5 encrypted sync, T4 handoff destination, and T3 native resume and fork all ship in stable v0.6.0, certified by native Windows x64 tagged-artifact acceptance PASS under the single-platform waiver in ADR 0005; Apple Silicon macOS acceptance is deferred to #403. Earlier stable releases (v0.5.1 and before) had OpenCode at T2 only. 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, stable v0.6.0's tagged-artifact acceptance for OpenCode's new T5 tier is native Windows x64 only (PASS); Apple Silicon macOS is deferred to #403 until that hardware returns, and no document here claims macOS verification for this release. See theOpenCode storage page, the compatibility record, and the tier matrix.