Make the allowance last
Operate Codex in production
PLOperating Codex after rollout means watching four signals: usage against plan allowances (/status, /usage and OpenTelemetry from the [otel] config table), install health (codex doctor), the performance of the code Codex ships, and the security of that code. Each signal has an owner and a page, so nobody has to watch sessions.
This hub is for developers and tech leads who own Codex for a team after the first month. The weekly allowance runs out on Wednesday, one teammate’s sessions behave differently from everyone else’s, and a security reviewer asks what the agent changed last week. CLI commands on this page were checked against Codex CLI 0.157.1 on 2026-09-26.
Which Codex operate page answers your question?
Section titled “Which Codex operate page answers your question?”| Your question | Page |
|---|---|
| Where do credits and allowances go, and how do I make them last? | Codex credits, usage limits and cost optimization |
| How do I find and fix a slow endpoint or query with Codex? | Performance optimization with Codex |
| How do I audit a codebase for vulnerabilities with Codex? | Security scanning with Codex |
| How do Codex Security findings reach a tested, merged fix? | Codex Security and the agents command center |
Telemetry that covers every agent lives in observing the agents. Spend policy across vendors lives in cost governance, and model prices live on the models hub.
How do you set an operating baseline for Codex?
Section titled “How do you set an operating baseline for Codex?”Do this once per team, before you tune anything.
-
Check every install. In a terminal, run
codex --versionandcodex doctor --summary.codex doctorchecks the installation, config, auth, connectivity and runtime health;--jsonemits a redacted report you can attach to a support ticket or collect from each machine. Record the version, because defaults change between releases. -
Read your own usage. In a session,
/statusshows estimated thread credits or cost for eligible workspaces (since CLI 0.148.0), and/usageshows account usage and offers a usage-limit reset (since 0.156.0). Allowances run on five-hour and weekly windows. -
Export telemetry to your collector, not only to OpenAI. Add an
[otel]table to the user config (~/.codex/config.toml) or the system config (/etc/codex/config.toml):[otel]environment = "prod"log_user_prompt = false # the default; prompts stay out of the export[otel.exporter.otlp-http]endpoint = "http://localhost:4318/v1/logs"protocol = "binary"Codex ignores
otelin a repository’s.codex/config.toml(project-local deny list, 0.157.1), so a cloned repository cannot redirect it. The exporter defaults to none. The full event list and alert rules are in advanced Codex setups. -
Bound every unattended run.
codex exechas no spend-cap flag in 0.157.1 (checked withcodex exec --helpon 2026-09-26). Bound CI runs with the job timeout, one task per run, and--ephemeralso sessions are not persisted. In GitHub Actions, settimeout-minutes: 20on the job that runscodex exec --ephemeral. -
Keep one model policy. GPT-6.1 Sol is the bundled default since CLI 0.159.1 and runs at
loweffort by default. Raisemodel_reasoning_effortbefore you switch model, and move routine jobs to GPT-6 Luna only when your own evals say the result holds. Prices are on the models hub.
How do you know Codex is operating well without watching sessions?
Section titled “How do you know Codex is operating well without watching sessions?”Read owned signals, not transcripts. Open a session only when a signal points at it.
| Signal | Where it comes from | What healthy looks like | Owner |
|---|---|---|---|
| Usage | /status, /usage, and your OpenTelemetry collector | Nobody hits the weekly window before the week ends; every developer shows up in the collector | Tech lead |
| Install health | codex doctor --json after each upgrade | No failed checks; one CLI version across the team | Each developer |
| Performance of shipped code | Your application’s traces and benchmarks | No regression after a Codex change; see performance optimization | On-call engineer |
| Security of shipped code | @codex security review (GitHub trigger verified 2026-08-28), your scanners, and an exploit test per fix | Every high finding has a failing-then-passing test or a documented dismissal | Code owner |
The stage before this one is review and ship with Codex. Team-wide policy, requirements.toml and audit evidence are in Codex enterprise governance.
What breaks when Codex runs every day?
Section titled “What breaks when Codex runs every day?”| Symptom | Cause | Recovery |
|---|---|---|
| The weekly allowance runs out mid-week | Broad exploratory tasks, a long AGENTS.md, or effort raised for every task | Check /status per thread, split tasks, trim AGENTS.md, and set effort per job; see cost optimization |
| The collector shows nothing from one developer | An [otel] table in /etc/codex/config.toml is only a default: the developer’s ~/.codex/config.toml overrides it. Or no exporter was ever set. | Compare the developer’s ~/.codex/config.toml [otel] table with /etc/codex/config.toml; run codex doctor only to catch startup warnings such as ignored project-local keys; reconcile collector coverage against seats monthly |
| One teammate gets a different model or behaviour | Different CLI versions: GPT-6.1 Sol is the default only from 0.159.1 (GPT-6 Astra from 0.153.4 until then) | Compare codex --version; run codex update |
| A CI job runs far longer than planned | codex exec has no spend cap in 0.157.1 | Add a job timeout and fail the job when it trips; keep one task per run |
| A vulnerability ships in a Codex-written change | Security review ran only when someone remembered | Make @codex security review and an exploit test a merge gate; see Codex Security |
When an agent run causes a production incident, follow agent incident response: revoke its credentials first, then investigate.
Where to go next with operating Codex
Section titled “Where to go next with operating Codex”Observe the agents
Set team policy
Across all tools
For other agents, see operate Claude Code and operate Cursor.