Skip to main content
Trace Oh My Pi (omp) terminal coding sessions, model calls, tool usage, and token costs with Arize AX for full observability.
Oh My Pi (omp) is a terminal coding agent that loads its extensions in-process inside its Bun runtime. The Arize Coding Harness Tracing instruments omp lifecycle events and exports OpenInference spans to Arize AX. Each agent run is captured as a trace with model calls, tool invocations, and inline token usage.

Launch Arize AX

To get started, sign up for a free Arize AX account and get your Space ID and API Key:
  1. Log in at app.arize.com
  2. Click Settings and copy the Space ID
  3. Open the API Keys tab and create or copy an API key

Install

Curl installer

macOS / Linux:
curl -sSL https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.sh | bash -s -- omp
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.bat -OutFile $env:TEMP\install.bat
& $env:TEMP\install.bat omp

Local clone

git clone https://github.com/Arize-ai/coding-harness-tracing.git
cd coding-harness-tracing
./install.sh omp           # macOS / Linux
install.bat omp            # Windows
The installer prompts for your backend and project name, writes credentials to ~/.arize/harness/config.json, copies the hook shim into ~/.omp/extensions/arize-tracing.ts, and registers the shim’s absolute path in the extensions array of ~/.omp/agent/settings.json. omp does not auto-discover an extensions directory, so this explicit registration is required — the installer handles it for you. Open a new omp session after install so the extension loads.

Configuration

Credentials live in ~/.arize/harness/config.json. Environment variables override values in config.json and can be set in your shell profile before launching omp.
export ARIZE_API_KEY="<your-api-key>"
export ARIZE_SPACE_ID="<your-space-id>"
export ARIZE_PROJECT_NAME="omp"
export ARIZE_TRACE_ENABLED="true"
VariablePurpose
ARIZE_TRACE_ENABLEDToggle tracing on or off
ARIZE_PROJECT_NAMEDestination project name (defaults to omp)
ARIZE_DRY_RUNRun the hook without sending spans, for validation
ARIZE_USER_IDAttribute traces to a specific user
ARIZE_VERBOSELog routine handler activity (event dispatch, span emits, state transitions)
ARIZE_TRACE_DEBUGDump raw event payloads under ~/.arize/harness/state/debug/ for inspection
See the main README’s Environment variables section for the full list of runtime overrides.

Redaction controls

Each ARIZE_LOG_* flag accepts "true" or "false" and defaults to "true". Set to "false" to opt out per category:
export ARIZE_LOG_PROMPTS="false"
export ARIZE_LOG_TOOL_DETAILS="false"
export ARIZE_LOG_TOOL_CONTENT="false"
FlagRedacts
ARIZE_LOG_PROMPTSUser prompt and assistant response text
ARIZE_LOG_TOOL_DETAILSTool names and arguments
ARIZE_LOG_TOOL_CONTENTTool call output content

Observe

Once tracing is enabled, omp activity is streamed to Arize AX. There is one trace per agent run — a user prompt through the agent’s internal turn/tool-use loop to its final answer. Each trace is a tree:
  • Turn traces — the root span for each agent run, with the user prompt as input and the final assistant message as output
  • LLM spans — one per model call in the loop, with model name, provider, prompt/completion/reasoning token counts, cache read/write tokens, and cost
  • Tool spans — one per tool call, pairing the tool invocation with its result and recording name, input args, and output
  • Session grouping — all runs from the same session grouped by session.id
Token usage is captured directly on each LLM span — omp surfaces cumulative usage inline on assistant messages, so prompt, completion, reasoning, cache, and cost values are available on every model call.

Spans Captured

omp exposes rich, once-fired lifecycle events that already carry final, structured data. The Arize AX hook forwards a small whitelist of them and emits the following spans:
SpanKindDescription
TurnCHAINRoot span for the agent run. Input is the user prompt (before_agent_start); output is the final assistant message.
LLM: <model>LLMChild of Turn. One per turn_end, carrying model info, token counts, cache tokens, and cost.
<tool>TOOLChild of Turn. One per tool result in a turn_end, paired with its originating tool call by id and recording input args and output.
Lifecycle events forwarded: before_agent_start, turn_end, agent_end, and session_shutdown.

Verifying tracing

Run any omp session as you normally would. omp loads the registered extension on startup and forwards lifecycle events to the Arize AX hook.
  • Errors and handler stderr land in ~/.arize/harness/logs/omp.log. Set export ARIZE_VERBOSE=true before launching omp to also see routine handler activity.
  • Set export ARIZE_TRACE_DEBUG=true to dump the raw event payloads under ~/.arize/harness/state/debug/ for inspection.
  • Confirm spans appear in your configured project in Arize AX.

Reference

For the full list of environment variables, default file paths, and troubleshooting steps, see the omp tracing README.

Uninstall

curl -sSL https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.sh | bash -s -- uninstall omp
Uninstall removes the shim’s path from the extensions array in ~/.omp/agent/settings.json, deletes the hook file at ~/.omp/extensions/arize-tracing.ts (only if it carries the Arize header marker, so your own extensions are left alone), and removes the harnesses.omp block from ~/.arize/harness/config.json.

Resources

Arize Coding Harness Tracing

OpenInference

Oh My Pi