How OpenAI uses Codex
by OpenAI · 2026-01-14
✓ Opened with WebFetch on 2026-10-15
Read the original ↗OpenAI's internal guide lists seven Codex use cases; one engineer points it at low-coverage modules overnight and reviews runnable test PRs in the morning.
- Teams use Codex for code understanding, migrations, performance, tests, scaffolding and drive-by fixes.
- Recommends asking for a plan first, writing prompts like a GitHub issue and keeping AGENTS.md current.
- Uses the task queue as a backlog and Best-of-N to compare attempts.
“I point Codex at low‑coverage modules overnight and wake up to runnable unit‑test PRs.”— OpenAI, Company guide
Summary written by Agent Cookbook. See the original for the full context.
Adapted by us from what the source described. Fill in the [BRACKETS].
The prompt
Set it up
- List your 5 lowest-coverage modules.
- Queue one Codex task per module before you log off.
- In the morning, review each PR's tests and output; merge the good ones.
Common failures
- Tests that only assert current behavior can lock bugs in. Read the assertions.
- Missing env setup causes flaky runs. Fix the environment script once.
Variations
- Ask for property-based tests on pure utilities.
- Use Best-of-N and keep the strongest test file.