# Coding-agent runtime telemetry Telemio can observe coding-agent and agentic runtimes through OpenTelemetry without requiring a proprietary wrapper around every harness. Start by detecting installed harnesses: ```bash telemio detect agents telemio setup agent auto ``` Then generate runtime-specific setup: ```bash telemio setup agent claude-code telemio setup agent codex telemio setup agent hermes telemio setup agent loki telemio setup agent gemini telemio setup agent copilot ``` ## Privacy default Agent telemetry is metadata-first. Keep prompts, responses, retrieved content, tool arguments, tool output, raw API bodies, credentials, and source content disabled unless an explicit policy requires them. Prefer these fields instead: - runtime and version - session, conversation, turn, run, and workflow identifiers - model/provider identity - model latency, status, retries, token counts, and cost metadata - tool and MCP identity, duration, status, and approval outcome - subagent and handoff relationships - queue, durable-workflow, checkpoint, and resume correlation - release/environment/service identity ## Claude Code Claude Code exposes native OpenTelemetry metrics and events and can export distributed traces when enhanced telemetry tracing is enabled. Configure its OTLP endpoint and headers directly and keep all content capture flags disabled by default. ```bash telemio setup agent claude-code ``` The resulting trace can connect an interaction to model requests, tools, approval wait/execution, hooks, and subagents. ## OpenAI Codex Codex supports independent OTLP log, trace, and metric exporters in its user-level configuration. ```bash telemio setup agent codex ``` The setup keeps user prompts, final responses, and Guardian assessment text disabled and adds Telemio runtime identity to spans. ## Hermes Agent Hermes exposes lifecycle observer hooks and the `hermes_otel` plugin maps sessions, LLM/API calls, tools, approvals, skills, and subagents into OTLP traces, metrics, and logs. ```bash telemio setup agent hermes ``` Telemio configures the plugin with `content_capture: off` rather than its content-capturing default. ## Gemini CLI Gemini CLI exposes native OpenTelemetry but its documented telemetry settings do not expose an arbitrary OTLP authentication-header field. Telemio therefore recommends a loopback OpenTelemetry Collector: Gemini sends to localhost, and the Collector adds the Telemio API key on egress. ```bash telemio setup agent gemini ``` Prompt logging is disabled in the generated setup. ## GitHub Copilot CLI Copilot CLI can export OpenTelemetry traces, metrics, and events directly over OTLP with authentication headers and GenAI content capture disabled. ```bash telemio setup agent copilot ``` ## Loki Agent Loki's CLI, TUI, desktop, messaging, tools, MCP, and subagents share an agent core. Instrument that core once so all surfaces contribute to the same runtime model. ```bash telemio setup agent loki ``` Until Loki publishes a native OTLP exporter, instrument the common core with standard OpenTelemetry and use `@telemio/sdk` only where Telemio-specific agent or business context adds value. ## Cursor, OpenCode, and Windsurf These runtimes have version/product-specific native telemetry and hook surfaces. Telemio does not assume a particular signal exists merely because hooks are available. ```bash telemio setup agent cursor telemio setup agent opencode telemio setup agent windsurf ``` Prefer verified native OpenTelemetry when present. Otherwise create lifecycle spans from supported hooks and send them through a local Collector. ## Correlation model A useful coding-agent trace looks like: ```text agent interaction -> model request -> tool / shell / file operation -> MCP call -> approval wait + decision -> child/subagent handoff -> model request -> result ``` When the agent launches an instrumented service, script, worker, or MCP server, propagate W3C trace context where the runtime supports it so the work can stay connected to the agent turn.