OpenCode installs npm plugins automatically from your
opencode.json; you do
not need to add this package to your app’s dependencies.Install
Add the plugin to your OpenCode config, either in your projectopencode.json
or globally at ~/.config/opencode/opencode.json.
opencode.json
Configure
Set your Catalyst OTLP token. Recording turns on automatically when the token is present.What Gets Recorded
Every turn, meaning one prompt and the agent’s response to it, becomes a trace in Catalyst. Spans carry the OpenCodesession.id, so all turns from the same
coding session can be grouped together.
- The
AGENTroot span records session id, service identity, call counts, stop reason, and error status. LLMspans record model/provider details, finish reason, prompt/cache/completion/reasoning tokens, and cost.TOOLspans record shell, file, and MCP tool calls with timing and error status.
CATALYST_REDACT_CONTENT=true to keep spans metadata-only.
Configuration Reference
The plugin uses the same Catalyst tracing env-var convention as the TypeScript and Python tracing SDKs.| Environment variable | Default | Description |
|---|---|---|
CATALYST_OTLP_TOKEN | - | Catalyst ingest token. Recording starts when this is set. |
CATALYST_OTLP_ENDPOINT | https://telemetry.inference.net | OTLP/HTTP trace ingest endpoint. |
CATALYST_SERVICE_NAME | opencode | Stable OTel service.name, also used as the OpenCode agent id. |
TRACE_TO_CATALYST | on when a token is set | Set false to disable. Set true only for tokenless custom collectors with an explicit non-hosted endpoint. |
CATALYST_REDACT_CONTENT | false | Set true to keep prompts, model outputs, tool arguments, and tool outputs off traces. |
CATALYST_ADDITIONAL_METADATA | - | JSON object attached to each turn’s metadata. |
CATALYST_DEBUG | false | Verbose plugin logging through OpenCode’s log API. |
Local Collector
To export to a local collector without an auth token, set both an explicit endpoint andTRACE_TO_CATALYST=true.
Privacy
By default the plugin records prompts, model output, file content read or written by tools, and shell command output. SetCATALYST_REDACT_CONTENT=true when you want metadata-only traces.
Troubleshooting
If no traces appear, check:CATALYST_OTLP_TOKENis set in the environment that launches OpenCode.CATALYST_SERVICE_NAMEis the value you are filtering for in Catalyst.CATALYST_OTLP_ENDPOINTishttps://telemetry.inference.netunless you are intentionally using a custom collector.- OpenCode has restarted after you added the plugin to
opencode.json.