Skip to main content
OpenCode is a terminal-based AI coding agent that supports a wide range of models — both local (Ollama, LM Studio) and cloud (OpenAI, Anthropic, Google, etc). This makes it a great choice if you want to use models that aren’t available through the other agents. OpenCode uses a plugin bridge instead of OTLP telemetry. A small JavaScript plugin runs inside OpenCode and sends real-time events to Termix over HTTP.

Setup

1

Install the plugin

Copy the Termix bridge plugin to OpenCode’s plugin directory:
mkdir -p ~/.config/opencode/plugins
cp "$(npm root -g)/termix-cli/termix-bridge.js" ~/.config/opencode/plugins/
If you installed Termix with npx instead of globally, you can find the plugin in the Termix package directory and copy it manually.
2

Launch an OpenCode session

Click OpenCode in the session launcher. The plugin connects to Termix automatically.
This is a one-time setup. The plugin stays in place across OpenCode and Termix updates.

What the Plugin Does

The Termix bridge plugin sends events to http://localhost:4000/opencode-events when:
EventWhat Termix Gets
session.status (busy/idle)Working/idle status indicator
message.part.updatedLive message preview in sidebar
session.updatedSession title and ID for resume
session.createdInitial session connection
The plugin doesn’t modify OpenCode’s behavior or read your prompts. It only observes status changes and output text.

Session Resume

OpenCode supports session resume. Termix captures the session ID from plugin events and uses opencode --session <sessionId> to reconnect to previous sessions. Session IDs in OpenCode look like ses_ followed by alphanumeric characters (e.g., ses_abc123xyz).

How It Differs from OTLP Agents

AspectOTLP (Claude/Codex/Gemini)Plugin (OpenCode)
Status detectionI/O heuristics (byte rates)Explicit busy/idle events from plugin
Message previewTerminal output buffer parsingDirect text from plugin events
Session ID captureOTLP log attributesPlugin event payload
SetupEnv vars or config fileCopy plugin file
The plugin approach gives more accurate status information since OpenCode explicitly reports when it’s busy or idle, rather than Termix having to guess from output patterns.
If OpenCode releases a major update that changes its plugin API, the bridge plugin may need updating. Check for the latest Termix version with npm update -g termix-cli.