Codex
Codex maintenance backlog piling up? Start with one small cleanup prompt, then scale it the way OpenAI did
An OpenAI engineer shared the short Codex prompts their team used to remove dead code, clean up stale feature flags, and speed up CI, plus a cost comparison showing GPT-6.1 Sol got close to GPT-6 Astra for far less. Start with one small task and widen it.
What changed
Rodrigo Roim (@rrroim), an engineer on OpenAI's Core Experimentation team, published a write-up on how the team uses Codex for maintenance work, and OpenAI Developers shared it on October 16. The main change Roim describes: a few months ago, Codex had to be pointed at exactly where dead code lived. With GPT-6 Astra, the team gave it a short, loose request instead, and it checked past PRs, Slack threads, project trackers, and production profiling data on its own before proposing deletions, with a reason for each one.
Roim reports that five engineers ran variations of that prompt part-time over two weeks and merged more than 1,400 PRs that removed over 800k lines. One service's container image dropped from 3.31GB to 1.72GB. A separate CI prompt led to about 30 PRs that cut median CI time from roughly 10 minutes to 4.5.
The post also compared models on the same stale-experiment cleanup. GPT-6.1 Sol Ultra found 131 issues for $15.12 in API cost, against 142 for $109.06 on GPT-6 Astra Ultra. GPT-6.1 Sol Medium found 86 for $5.27.
Who is affected
Teams using Codex on a large or aging codebase with unused code, old feature flags, flaky tests, or slow CI. The prompts work best when Codex can reach the evidence it needs, such as your feature flag tool, Slack, CI history, or production telemetry, through connected tools.
What to do now
- Start with one small task: a bit of unused code, one stale flag, or one flaky test. Ask Codex to find an instance, gather evidence that it's safe, and open one small draft PR.
- Spell out the safeguards. The stale-flag prompt in the post says to keep production behavior unchanged, leave kill switches and safety flags alone, check live flag config and git history, and make one small draft PR per cleanup.
- Run the same small task on a cheaper model and effort before scaling. In the post's test, Sol Medium was enough for many findings at a fraction of the cost.
- After you review the PRs, ask Codex to fold your review comments into the next prompt, then widen the scope to a subdirectory and later the whole repo.
- For CI, try asking Codex to list ideas for reducing CI load and rank them by estimated minutes saved per day from the repo's CI history. For flaky tests, use /goal and tell it to fix only clear, simple cases.
- Ask for a prioritized report before deleting at scale. The post notes the model can find more cleanups than a team can review, and some proposals added more complexity than they were worth.
What is not confirmed
These numbers come from one OpenAI team on its own codebases and internal tools. DotsFeed hasn't reproduced them. Costs are at standard API pricing, so they won't map directly to a ChatGPT plan allowance. Your results will depend on how much evidence Codex can reach in your setup.
Sources
- Rodrigo Roim on X: https://x.com/rrroim/status/2111171952849334585
- OpenAI Developers on X: https://x.com/OpenAIDevs/status/2111213093577691337
- OpenAI Developers blog, "Maintaining software with the GPT-6 family": https://developers.openai.com/blog/maintaining-software-with-the-gpt-6-family
Sources
Get updates like this every morning
- ① Email
- ② Card on Stripe
- ③ 7 days free
Then $2/month · cancel anytime in one click