Skip to Content

OpenCode (tracing)

OpenCode  is an open-source terminal-based AI coding assistant. It supports multiple LLM providers, can edit files, run commands, and handle multi-step coding tasks directly from your terminal. Respan gives you full observability over every conversation including thinking, tool calls, and responses, and gateway routing through the OpenAI-compatible Respan endpoint.

Set up Respan

Create an account at platform.respan.ai  and grab an API key .

For application setup, follow Agent setup.

Setup

Paste this into your coding agent:

Help me set up Respan tracing for OpenCode: fetch and follow https://www.respan.ai/docs/integrations/open-code.md

The agent checks your credentials, configures tracing, and verifies that a session reached Respan. Include your project, customer identifier, and preferred configuration scope in the request if needed.

Configuration

Ask your coding agent to adjust the existing tracing configuration for your project, customer identifier, workflow name, or custom attributes. It should preserve unrelated agent settings and verify the result with Respan traces or logs.

Captured data

DataDescription
User promptThe user’s input text.
Assistant responseOpenCode’s final response.
Thinking blocksThinking / reasoning content.
Tool callsTool name, input, and output.
Token usageInput, output, and cache tokens.
TimingStart time, end time, latency.
ModelModel name (varies by configured provider).

Span types

Spanlog_typeDescription
RootagentThe complete conversation turn.
ThinkinggenerationThinking / reasoning blocks.
TooltoolTool invocations.

Uninstall

Ask your coding agent:

Remove Respan tracing from OpenCode, preserving unrelated agent settings and provider configuration.