In OpenAI's own testing, one run of GPT-5-Codex kept going for more than seven hours on a single large task: writing an implementation, running the tests, reading the failures, and rewriting until they passed — with no human turning the crank between steps. That one detail is the whole story of the September 15, 2025 Codex upgrade, and it is worth being precise about why, because the interesting part is not the duration.
The interesting part is that the model decided to spend seven hours. Nobody set a step budget or a max-iterations flag. GPT-5-Codex is a version of GPT-5 tuned specifically for agentic coding inside Codex, and its headline change is what OpenAI calls dynamic thinking: it allocates reasoning time based on how hard the task actually turns out to be, not how hard it looked at the start.
Test-time compute, decided mid-flight
Most "smart routing" you have seen picks a compute tier up front. A cheap model for easy prompts, an expensive one for hard prompts, chosen before the first token. GPT-5-Codex moves that decision inside the task. Renaming a symbol resolves in seconds. A cross-module refactor with a failing test suite can absorb hours. OpenAI's Codex product lead framed the difference plainly:
The model can decide five minutes into a problem that it needs to spend another hour.
That is a genuinely different control loop. A router commits before it has evidence; an agent that re-budgets mid-run responds to what the codebase throws back at it — a compiler error, a red test, a type mismatch it did not anticipate. The feedback becomes the plan.
The efficiency numbers show the same behavior from the other end. On OpenAI-employee traffic, for the bottom 10% of turns ranked by tokens generated, GPT-5-Codex used 93.7% fewer tokens than GPT-5. It is not just capable of thinking longer — it is capable of thinking less, which is what makes the long runs affordable. A model that always reasons hard is expensive on trivial edits; one that spends where it matters is the only kind you would actually leave running.
On capability, the gains are concentrated where long-horizon work lives. On a code-refactoring evaluation, base GPT-5 scored 33.9%; GPT-5-Codex scored 51.3%. It also outperforms GPT-5 on SWE-bench Verified, the agentic-coding benchmark. Refactoring is the honest test here — it rewards a model that can hold a large change in its head and keep the suite green across many files, which is exactly the shape of a seven-hour task.
The bottleneck moves to verification
Here is the thesis. Once a model can produce hours of unsupervised changes, the constraint stops being generation and becomes review. Seven hours of autonomous edits are worth nothing if a human has to read every line before trusting them — you have just moved the labor, not removed it.
That is why the same release shipped a code-review model, not only a bigger coder. GPT-5-Codex was specifically trained to review code: it can be pointed at a GitHub repository, spins up a temporary container to actually run and inspect the change, and — per OpenAI — is less likely to leave comments that are incorrect or unimportant, while surfacing more high-impact ones. Reviewing your own agent's output is the load-bearing feature. Coding and reviewing are the two halves of the same loop, and shipping one without the other would just relocate the pain.
This reframes what you are buying. You are not buying a faster typist. You are buying a worker that will grind on a scoped task and a reviewer that raises its hand when the diff looks wrong — a closed loop you can point at a queue.
What it looks like in practice
Codex now runs in the same places your work already lives: a terminal via the Codex CLI, an IDE through the VS Code extension, GitHub, the cloud as an asynchronous agent, and ChatGPT (including the iPhone app). It rolled out to ChatGPT Plus, Pro, Business, Edu, and Enterprise, with API access following shortly after launch.
For a long autonomous run, the terminal is where the delegation model is clearest. You hand it a task and a definition of done, not a series of turns:
codex exec "Migrate the billing module off the legacy PaymentGateway \
interface to the new Result-returning API. Update all call sites. \
Every test in tests/billing must pass before you finish."
The phrase carrying the weight is "Every test ... must pass before you finish." That sentence is the model's stopping condition and the ground truth for its self-correction loop. Which means the leverage has quietly shifted onto your repository. Put the durable version of that instruction where Codex reads it every run:
# AGENTS.md
- Run the full suite with `dotnet test` before declaring a task done.
- Never weaken or delete a test to make it pass.
- Match the error-handling style already in the touched file.
An agent that self-corrects against your tests is only as trustworthy as those tests. A shallow suite teaches it to write shallow code that happens to be green — and it will optimize for green, because green is the target you gave it. The seven-hour run is a multiplier, and it multiplies whatever discipline your repo already had, in both directions.
The takeaway
Do not measure this release by whether the model can code for seven hours. Measure it by whether your project can be safely handed a seven-hour task — and that is a property of your codebase, not the model. Before you point an autonomous agent at anything real, spend the afternoon on the parts it will lean on: a test suite that fails loudly on a regression, an AGENTS.md that encodes your definition of done, and CI that gates the merge no matter how confident the diff looks. Get those right and the long runs earn their keep. Skip them and you have bought a very fast way to generate plausible, well-tested-looking mistakes.
Sources: Introducing upgrades to Codex — OpenAI, GPT-5-Codex and upgrades to Codex — Simon Willison, OpenAI upgrades Codex with a new version of GPT-5 — TechCrunch