Skip to main content
AI coding agents like Claude Code, Cursor, and Codex run as autonomous loops in your terminal and IDE: they read your prompt, call the model, run tools, and iterate. The Arize Coding Harness Tracing instruments these agents and streams OpenInference traces to Arize AX, so you can see exactly what your coding agents are doing, how much they cost, and where they get stuck. This guide walks through setting up tracing for any supported coding agent. No application code changes are required — the toolkit hooks into each agent’s own extension points. We’ll go through the following steps:

High Level Concepts

Set up Arize AX

Install tracing for your agent

Run your agent and observe

Control what gets captured

Next steps

High Level Concepts

A coding agent (or “harness”) wraps a model in a loop that submits prompts, calls tools, and reacts to the results. The Coding Harness Tracing toolkit registers hooks in each agent’s own configuration. When a hook fires — a session starts, a prompt is submitted, a tool runs — a small adapter builds OpenInference spans and exports them to Arize AX. There is no background service to manage, and tracing fails open: if the adapter errors, your agent keeps running. The toolkit supports these coding agents:
Coding agentSetup guide
Claude Code (CLI and Agent SDK)Claude Code tracing
OpenAI CodexCodex tracing
Cursor (IDE and CLI)Cursor tracing
GitHub CopilotCopilot tracing
Gemini CLIGemini CLI tracing
KiroKiro tracing
OpenCodeOpenCode tracing
Regardless of which agent you use, the captured spans follow the same OpenInference shape:
  • Sessions group every turn from a single coding session.
  • Turn traces capture one user prompt and the agent’s response.
  • LLM spans record each model call with model name, provider, and token counts.
  • Tool spans capture each tool invocation — shell commands, file edits, MCP calls — with inputs, outputs, and duration.

Set up Arize AX

Sign up for a free Arize AX account, then grab the two credentials you’ll need:
  1. Log in at app.arize.com.
  2. Click Settings and copy your Space ID.
  3. Open the API Keys tab and create or copy an API key.
The installer in the next step prompts you for these and stores them for you.

Install tracing for your agent

Every agent installs the same way — run the installer with your agent’s key. It detects the agent, prompts for your Arize AX credentials and project name, writes them to ~/.arize/harness/config.yaml, and registers the hooks in the agent’s config.
# Replace `claude` with your agent: codex, cursor, copilot, gemini, kiro, or opencode
curl -sSL https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.sh | bash -s -- claude
Claude Code can also be installed as a Claude Code plugin from the marketplace. For agent-specific install paths and configuration files, follow the setup guide for your agent.

Run your agent and observe

Start your coding agent the way you normally would and complete a few turns. Traces stream to your configured project in Arize AX, grouped by session. You’ll see each turn as a trace, with nested spans for the model’s response, every tool call, and any subagents the coding agent spawns.
Coding agent session view in Arize AX showing multiple traces grouped by session ID
Drill into any turn to inspect the full span tree, including model generations, tool inputs and outputs, and token costs.
Coding agent trace view in Arize AX showing the trace tree, inputs, outputs, and nested spans
If you don’t see traces, tail the log at ~/.arize/harness/logs/<agent>.log, or set ARIZE_VERBOSE=true before launching the agent to see routine tracing activity.

Control what gets captured

All agents share a common set of environment variables. Set them in your shell profile, or for Claude Code in the env block of ~/.claude/settings.json. Environment variables take precedence over ~/.arize/harness/config.yaml. Toggle tracing without uninstalling:
export ARIZE_TRACE_ENABLED="false"   # disable hooks; set to "true" to re-enable
export ARIZE_DRY_RUN="true"          # build spans but don't send them (useful for testing)
Redact sensitive content — each flag defaults to "true"; set to "false" to opt out per category:
FlagRedacts
ARIZE_LOG_PROMPTSUser prompt and assistant response text
ARIZE_LOG_TOOL_DETAILSTool names and arguments
ARIZE_LOG_TOOL_CONTENTTool call output content
Attribute sessions to a user or add custom span attributes — set ARIZE_USER_ID, or add an attributes map in ~/.arize/harness/config.yaml to tag every span (for example with team or environment):
attributes:
  team: payments
  environment: prod
To remove tracing, run the installer with uninstall and your agent’s key:
curl -sSL https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.sh | bash -s -- uninstall claude

Next steps

  • Follow the dedicated setup guide for your coding agent to see the exact hooks captured and any agent-specific behavior.
  • Browse all tracing integrations to instrument the rest of your stack.
  • Once traces are flowing, evaluate your agent to measure quality and catch regressions.

Resources

Arize Coding Harness Tracing

OpenInference