OpenAI's GPT-6 maintenance playbook: 1,400 cleanup PRs, and GPT-6.1 Sol at 14% of Astra's cost
OpenAI's Core Experimentation team used GPT-6 Astra and GPT-6.1 Sol in Codex to delete over 800k lines of dead code, clear stale feature flags and halve CI time. Their head-to-head numbers show GPT-6.1 Sol Ultra finding 92% as many stale experiments as Astra for 14% of the API cost. Here are the prompts, the numbers, and how to try it on your own repo.
OpenAI published a field report from its Core Experimentation team on using the GPT-6 family in Codex for unglamorous maintenance work: deleting unused code, removing stale feature flags and experiments, and speeding up CI. The useful part for builders is not the headline count but the cost comparison between GPT-6 Astra and the cheaper GPT-6.1 Sol. (Source: OpenAI Developers Blog)
Key facts:
- Dead code: five engineers ran variations of one short prompt across repositories, part-time over two weeks, and merged more than 1,400 pull requests that deleted over 800k lines of code.
- Measured wins: one service’s container image shrank from 3.31GB to 1.72GB (48%), and about 400 visual snapshot variants were removed from the test suite.
- Model comparison: on an audit of more than 6,000 files and 1 million lines (Python, TypeScript, Go and Rust), GPT-6.1 Sol Ultra produced 92% as many findings as GPT-6 Astra Ultra at 14% of the API cost.
- CI: about 30 optimization PRs cut median CI completion time from roughly 10 minutes to 4.5 minutes, and the 90th percentile from 12.5 to 6 minutes.
The cost table that matters
The team ran the same stale-experiment prompt on three model and effort combinations and reviewed every finding by hand. The figures use standard API pricing and include research subagents and the follow-up turns Codex ran automatically:
| Model and effort | API cost | Findings | Cost per finding |
|---|---|---|---|
| GPT-6 Astra Ultra | $109.06 | 142 | $0.77 |
| GPT-6.1 Sol Ultra | $15.12 | 131 | $0.12 |
| GPT-6.1 Sol Medium | $5.27 | 86 | $0.06 |
The gap lines up with list prices. OpenAI’s model pages put gpt-6.1-sol at $2 input and $10 output per 1M tokens, versus $10 and $50 for gpt-6-astra. Both have a 1,050,000-token context window and 128,000 max output tokens. (GPT-6.1 Sol model page, GPT-6 Astra model page)
Sol’s misses had a pattern. Most of the Ultra-tier discrepancies were constant feature flags used as dependencies inside other feature flags, which Astra caught and Sol did not. The author’s advice is to find patterns like that and patch them in the prompt, then recheck those prompts when new models ship.
Prompts worth copying
The stale-flag audit and the flaky-test prompt both start with /goal, the Codex CLI command that attaches a persistent objective to a chat. Goals are capped at 4,000 characters, so long instructions belong in a file the goal points to. (Codex slash commands)
The post suggests trying these on GPT-6.1 Sol Medium first:
- Flaky tests: look at recent CI runs, find flaky tests, attempt a fix for each, and open a PR only when the fix works.
- AGENTS.md hygiene: find one instruction that misdirected an agent in your recent Codex sessions, replay the same prompt with and without it, and compare quality, tool calls, tokens, runtime and cost.
- CI load: ask for ideas to relieve CI load, ranked by estimated CI minutes saved per day from the repo’s run history. One follow-up fix, adding a missing mock, cut a 63-test resolver suite from 592.6 seconds to 29.8 seconds with all 63 tests kept.
Guardrails they kept
The stale-flag prompt told the model to preserve production behavior and killswitches, ignore SDK fallbacks, open one small draft PR per cleanup, and not modify live configurations. When Astra found a “Permanent” developer-override flag that fanned out to every feature, it flagged it for human review instead of deleting it. Removing it after review saved an estimated 0.42% CPU in the main affected service.
OpenAI also admits some proposals added more complexity than they were worth, so prioritization and measurement stayed part of the workflow.
How to start
Pick one small task, such as a single unused module, one stale flag or one flaky test. Ask Codex to find an instance, gather evidence and open a small draft PR. Run it on two models or efforts and compare cost per accepted change before scaling up to a subdirectory, then the whole repo.
For pricing context on the cheaper tier, see our GPT-6 Sol and Luna breakdown and the GPT-6 Astra availability notes. If you run these audits on a ChatGPT plan rather than the API, check the Pro 200 usage change after October 29 before launching a whole-repo sweep.
Source: OpenAI Developers Blog — Maintaining software with the GPT-6 family