Use this to observe your own OpenCode usage — reviewing sessions, debugging a
tool call, or tracking model cost. To trace an agent you are building for your
own users, start with the Quickstart and the
SDK integrations instead.
Install
Add the plugin to your OpenCode config, eitheropencode.json in your project or
~/.config/opencode/opencode.json globally. OpenCode installs it from npm on the
next launch.
opencode.json
Configure
Set your Catalyst API key. Recording turns on automatically once a key is present.What gets recorded
Every turn — one prompt you send and the agent’s full response — becomes a trace in Catalyst, tagged with the OpenCode session id so all of a session’s turns stay grouped together. Each trace captures:- The prompt you sent and the agent’s final reply.
- An LLM span for each model call in the turn, with token usage — including prompt-cache read and write and reasoning tokens — and the cost of the call.
- A tool span for each
bash,read,edit, and MCP tool call, with its arguments and output.
Configuration
Configure the plugin with environment variables or acatalyst.json file.
Precedence, from lowest to highest, is built-in defaults, the global
~/.config/opencode/catalyst.json, the project .opencode/catalyst.json, then
environment variables.
| Environment variable | catalyst.json key | Default | Description |
|---|---|---|---|
CATALYST_API_KEY | api_key | — | Catalyst ingest token. Recording starts when this is set. |
TRACE_TO_CATALYST | trace_to_catalyst | on when a key is set | Force recording on or off. |
CATALYST_OTLP_ENDPOINT | endpoint | https://telemetry.inference.net | OTLP/HTTP ingest endpoint. |
CATALYST_PROJECT | project | opencode | Project name your sessions are grouped under. |
CATALYST_REDACT_CONTENT | redact_content | false | Record metadata only — models, tokens, cost, tool names, and timing. |
Privacy
By default the plugin records full content, including your prompts, the model’s output, file contents it reads or writes, and shell command output. If you would rather keep that off your traces, setCATALYST_REDACT_CONTENT=true to record
metadata only — models, tokens, cost, tool names, and timing.