Integrations
Integration

Monitor Codex with Sazabi

By Sazabi Team

Last verified on Nov 8, 2026.

Codex shows up in two places in a team's work. A developer runs it on a laptop to write code. Sazabi, an AI-native observability and security platform, can also hand it an issue to fix. The two connections are separate, and each tells you something different.

The first is a log source: what Codex did during sessions. The second is a core integration: Codex as the agent that turns an issue into a pull request.

What Sazabi reads from Codex

Session telemetry (manual log source). Codex ships a built-in OTLP exporter, off by default. You enable it with an [otel] section in ~/.codex/config.toml, and Codex pushes events to your Sazabi intake URL. Codex requires the full logs URL ending in /v1/logs and does not add the path itself. The desktop app and the IDE extension read the same file, so one section covers every client on that machine.

The Sazabi docs for this source name four events: codex.user_prompt, codex.tool_decision, codex.tool_result and codex.api_request. Records carry prompt, model, conversation.id, user.email and originator. The originator value names the client: codex_cli_rs for the CLI, codex_vscode for the IDE extension.

codex.tool_result also carries arguments and output. For a shell command, arguments holds cmd and workdir. Codex's own docs describe codex.tool_decision as approved or denied, and say whether the decision came from config or from the user.

Only log events are ingested. Codex metrics are not stored by this source.

Fix handoff (core integration). After you connect Codex under Settings > Integrations, you choose Fix on an issue and pick Codex. It works in your repository and opens a pull request. Sazabi follows progress, questions and the pull request in the issue thread. You connect with a ChatGPT sign-in, or with an OpenAI API key plus an environment key. The GitHub App gives Codex its repository access.

Questions it answers

  • Which shell commands did Codex run in a given working directory yesterday?
  • Which tool calls were denied, and who or what denied them?
  • How many model requests did one conversation.id make?
  • Are sessions arriving from the IDE extension as well as the CLI?
  • Which developers send prompt text, and which have it redacted?
  • Which issue fixes did Codex take on, and what did it open?

A worked example: reading a tool result

Prompt redaction is a setting you control. Tool content is not. Here is one made-up codex.tool_result record, using only attributes from the Sazabi page.

{
  "event.name": "codex.tool_result",
  "conversation.id": "conv-4b9c",
  "originator": "codex_cli_rs",
  "user.email": "dev@example.com",
  "model": "gpt-5.5",
  "arguments": {
    "cmd": "cat config/staging.env",
    "workdir": "/home/dev/payments-api"
  },
  "output": "DATABASE_URL=postgres://app:...@db.example.com/payments (truncated)"
}

The record shows a command and the text it printed. If that file holds a credential, the credential is now in your logs, whatever log_user_prompt says. In a thread you can ask the Sazabi agent: "Show Codex tool results from the last 24 hours where arguments mention .env, with the user and workdir." The answer lists who ran what and where.

The next step is practical. Rotate anything the output exposed. Then decide whether developers should keep Codex away from those paths, or whether an organization-wide requirements.toml is the right place to fix the setting. Codex applies values from that file over each developer's own [otel] settings, so nobody can point the export elsewhere.

Rolling it out

OpenAI documents that administrators can enforce OpenTelemetry settings in requirements.toml. The Sazabi page lists the file location for macOS, Linux, Windows and MDM delivery. Use log_user_prompt = false there unless your policy allows storing prompts.

How it fits with other integrations

Codex sits beside Claude Code and oh-my-pi in the coding agents category. The export is plain OTLP, so the OpenTelemetry integration covers the protocol. The Fix handoff uses the same repository access as the GitHub integration, and pricing explains how log volume is counted.

Log sources

  • Codex (manual log source, coding agents): Add an [otel] section to your Codex config to ship session telemetry — prompts, tool calls, and model API requests — to Sazabi via Codex's built-in OTLP exporter.

Frequently Asked Questions

Does turning off log_user_prompt hide everything sensitive?

No. It keeps prompt text out of the logs. The Sazabi docs state that tool-call content is exported either way: every codex.tool_result event carries the tool's full arguments and its output, truncated at about 2 KB. Codex has no flag to switch that off.

Where does the Codex config go?

In ~/.codex/config.toml in your home directory. Codex ignores an [otel] section in a project's .codex/config.toml. The CLI, the desktop app and the IDE extension all read the same file.

Are Codex metrics stored in Sazabi?

No. Only OTLP log events from Codex are ingested. Leave the metrics exporter at its default.

What does the core integration do?

You choose Fix on an issue and pick Codex. Codex works in your repository and opens a pull request, and Sazabi follows its progress, questions and pull request in the issue thread.

Sources

  1. Codex has two connection methods: a manual log source and a core integration where Fix hands an issue to Codex, which opens a pull request that Sazabi follows in the issue thread (accessed Nov 8, 2026)
  2. Event names, the arguments and output attributes on codex.tool_result, originator values, the /v1/logs URL requirement, requirements.toml rollout and logs-only ingestion (accessed Nov 8, 2026)
  3. OpenTelemetry export is off by default and opts in through [otel]; the exporter choices; log_user_prompt redacts prompts by default; the event types Codex emits (accessed Nov 8, 2026)
  4. Administrators can enforce OpenTelemetry settings in requirements.toml (accessed Nov 8, 2026)