Skip to Content

Codex CLI (tracing)

Codex CLI  is OpenAI’s open-source coding agent that runs in the terminal. It can reason about your codebase, make file edits, execute shell commands, and handle multi-step coding tasks autonomously. Respan gives you full observability over every conversation including reasoning, tool calls, and responses, plus 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 Codex CLI: fetch and follow https://www.respan.ai/docs/integrations/codex-cli.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 responseCodex CLI’s final response.
Thinking blocksReasoning content.
Tool callsTool name, input, and output (file operations, shell commands, etc.).
Token usageInput, output, and cache tokens (when available).
TimingStart time, end time, latency.
ModelModel name used (e.g. codex-mini, o4-mini).

Span types

Spanlog_typeDescription
RootagentThe complete conversation turn.
ThinkinggenerationReasoning blocks.
TooltoolTool invocations.

Uninstall

Ask your coding agent:

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