OpenCode Plugin: OpenClaw Model Provider Support
Adds OpenCode model provider support to OpenClaw, enabling native session detection, transcript browsing, and session adoption via ACP. For developers integrating OpenCode with OpenClaw.
Read this when
- You are installing, configuring, or auditing the opencode plugin
OpenCode plugin
OpenClaw gains OpenCode model provider support through this plugin.
Distribution
- Package:
@openclaw/opencode-provider - Installation: npm; also available on ClawHub:
clawhub:@openclaw/opencode-provider
Surface
providers: opencode; contracts: mediaUnderstandingProviders
Native sessions
On the Gateway and any paired nodes, OpenClaw automatically finds the opencode CLI. Detected sessions show up under the OpenCode group in the sessions sidebar, and you can browse transcripts using the official opencode --pure db ... --format json and opencode --pure export commands. For local entries, a Continue option appears, which spins up an OpenClaw session whose initial turn resumes the original OpenCode session over ACP. The full server-side model context stays with OpenCode, and the catalog viewer keeps displaying that history. OpenClaw also pulls the recent native history into the adopted session's transcript. When transcripts are extremely long, only the latest 200 entries come over, capped by a 512 KiB budget for serialized items. Rows on paired nodes are view-only.
Project plugins cannot be loaded during catalog browsing, and unrelated Gateway credentials are not inherited, thanks to the restricted environment and --pure mode.
To stop discovery entirely, turn off OpenCode Session Catalog under Config > Plugins > OpenCode. This setting defaults to on.