Skip to main content
Carbon ingests Codex through its built-in OpenTelemetry exporter. The @carbon-js/connect CLI points that exporter at Carbon, so every model call, its token usage and cost, and each tool execution land in your space as events — with no SDK, no daemon, and no changes to your project.

Quick setup

1

Run the interactive setup

@carbon-js/connect detects Codex, connects it, and prompts for your Carbon API key (generate one under Settings → API Keys).
npx @carbon-js/connect@latest
Prefer to skip the prompts? Pass the app and key directly — see API keys.
2

Restart Codex

Restart the app so it reloads its config and begins exporting. Run a prompt, then open Events — your activity appears within seconds.

What gets captured

Each Codex turn becomes one LLM event (model, token usage, cost, timing, status); each tool run becomes one tool event, correlated to its session and turn. Events show up under the Codex source, alongside everything else in your space.
Carbon receives dimensions only — model, usage, cost, timing, status, and the session/turn keys. Your prompts, the model’s responses, and tool input/output text are never sent. See Privacy.

Managing the connection

@carbon-js/connect makes a tagged, idempotent edit to Codex’s own ~/.codex/config.toml, touching only the keys it manages. To check status or revert:
@carbon-js/connect status              # show which apps are connected
@carbon-js/connect disconnect codex
See How it works for exactly what the edit changes, and Commands for the full CLI.