Documentation Index
Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Trace Codex CLI agent turns, tool calls, and API requests in Arize AX for full observability.Codex is OpenAI’s open-source CLI coding agent. The Arize Coding Harness Tracing instruments Codex
notify hook events and exports OpenInference spans to Arize AX or Phoenix. Each agent turn is captured as an LLM span with tool calls, token usage, and API request details.
Launch Arize AX
To get started, sign up for a free Arize AX account and get your Space ID and API Key:- Log in at app.arize.com
- Click Settings and copy the Space ID
- Open the API Keys tab and create or copy an API key
Install
Curl installer
macOS / Linux:Local clone
Configuration
Credentials live in~/.arize/harness/config.yaml. To override per category, set environment variables in ~/.codex/arize-env.sh — the notify hook sources this file automatically. Env values take precedence over config.yaml.
Phoenix (self-hosted)
Arize AX (cloud)
Redaction controls
EachARIZE_LOG_* flag accepts "true" or "false" and defaults to "true". Set to "false" to opt out per category:
| Flag | Redacts |
|---|---|
ARIZE_LOG_PROMPTS | User prompt and assistant response text |
ARIZE_LOG_TOOL_DETAILS | Tool names and arguments |
ARIZE_LOG_TOOL_CONTENT | Tool call output content |
Observe
Once tracing is enabled, Codex activity is streamed to Arize AX. You’ll see:- Turn traces — each agent turn (user prompt to assistant response) as a parent LLM span
- Tool call spans — one per tool decision and result pair
- API request spans — one per API or WebSocket request
- Session grouping — all turns from the same session grouped by
session.id - Token usage — prompt, completion, and total token counts on every turn span
Hooks Captured
Codex emits a singlenotify event with subtypes for each lifecycle stage. The Arize AX hook fans them out into the spans listed above.
| Notify subtype | Span Kind | Description |
|---|---|---|
agent-turn-start | LLM | Parent turn span starts; records the user prompt |
agent-tool-call | TOOL | Tool invocation, records name + input + result |
agent-api-request | LLM | One span per API / WebSocket request to the model |
agent-turn-complete | LLM | Turn span ends; records output and token counts |
agent-session-complete | CHAIN | Session teardown, state file cleanup |