Codex Model Regression Test: Compare Upgrades on Real Tasks

Updated
8 min read
Two Codex model runs converge on one regression checklist.
TL;DR

Use matched tasks, fresh checkouts, and the same acceptance tests to see whether a Codex model upgrade works for your team.

A Codex model regression test starts with a task you already know how to grade. If a model update feels worse on a repository, pick a few old tickets and give both configurations the same starting commit and acceptance tests. Then inspect the resulting patches. That evidence gives you something to act on when a token chart looks odd.

The concern behind this article came from Codex GitHub issue #30364. In June 2026, a user reported repeated reasoning-token counts at fixed values in GPT-5.5 telemetry and asked whether a budget, routing or reporting behavior was involved. The issue was closed in August. The public data shows the pattern the reporter measured. It leaves the cause, and any effect on your own tasks, open.

Pick a few tickets you can grade the same way

Use tasks your team actually does. One might be a regression in a data importer, another a small API change, and a third a refactor constrained by existing tests. For each, preserve the pre-fix commit and write down the observable result you expect. Keep the accepted patch out of the agent’s context. If the solution is visible in a later commit, use a clean copy or a synthetic equivalent.

Write the checks before the first run. A good task card includes the reproduction steps, the relevant existing test command, and a short list of files or interfaces that should stay untouched. For a regression fixture, check that it fails on the original commit for the intended reason. The AI agent TDD skill has a worked example of preserving that failure through a fix.

Compare fresh runs and keep the harness fixed

Use the same Codex client version, repository instructions, permissions, tools and dependencies. Start every trial from a clean checkout. Record the displayed model and reasoning effort from your environment. If the available effort levels differ, call out that you are comparing two configurations. OpenAI’s Codex model selection docs explain where to choose these options.

Repeat a few runs for each task and alternate the order so one configuration does not always go first. A short first pass can reveal a failure worth investigating. Add runs before generalizing from a few examples. OpenAI’s guide to evaluating agent skills shows how to define success and save artifacts for comparison. Our Codex harness checklist covers how to make those checks reproducible in a real repository.

Look at accepted patches before looking at tokens

Click any column to sort
4 rows
Acceptance checks and scopeWhether the patch solved the task without unrelated edits
Reviewer reworkWhether someone had to repair the implementation or rewrite a weakened test
Elapsed time and usageWhat the accepted fix cost in time and available usage metrics
Repeated failure categoryWhich kind of task is worth investigating next

If a patch breaks a test, keep the failure and diff. If two patches both pass, have a reviewer look at them under neutral names. A one-line fix and a broad rewrite may get the same test result while costing very different amounts of review. See our cost per accepted fix comparison for a practical way to account for failed attempts and rework.

Use reasoning-token counts to flag cases for a closer look. OpenAI’s reasoning model guide describes how the API reports usage. Write down which client or endpoint produced your numbers. Different surfaces can expose different telemetry.

Build a task deck with checks the agent cannot change

For a comparison you plan to repeat, give every task an ID, a starting commit, a short issue brief, and a way to grade the result. Put the instructions in a place where the test runner can track changes to them. Keep the scoring rules outside the editable agent checkout. Otherwise an agent can inadvertently change the test harness while solving the problem it is supposed to measure.

For the importer bug, the task card might say that a malformed row should return a named validation error and that good rows must still load. The scoring script checks both cases. A separate review field can record whether the agent touched dependencies or broadened the change. A test suite that is green after a model changed the suite itself warrants a closer look. Keep the comparison anchored to the original checks.

Sample across risks the team knows. Include an issue that spans two files and one whose expected change fits in a small diff. If the codebase has a migration workflow that usually needs human review, include it as a separate task category. The objective is to see how a candidate handles the team's work, so keep the easy tickets and the difficult ones distinguishable in the results.

Prevent environment differences from deciding the result

Run the task from the same starting state each time. Use the same package versions and tooling. An install cache or a different interpreter can change the time it takes to run a test. Record either a common setup or the difference. The time you spend validating the environment is part of understanding the result, especially if one configuration tends to trigger more setup work.

Decide how to handle continued conversations. Fresh trials are easier to compare because they begin with the same issue text. If your real workflow includes a review round, run a separate experiment that gives each configuration the same reviewer feedback. Keep those results distinct. A strong second attempt is useful, but it answers a different question from success on the first try.

Choose a stopping rule before you begin. Give both runs the same acceptable wall-clock budget and decide what counts as a timeout. If the old configuration can pause for approval while the new one cannot, record that fact. Both the model and the surrounding client can affect whether a task finishes. The Codex sandbox permissions guide explains the boundary you want to keep consistent across trials.

Tell failure modes apart before averaging scores

Suppose you run ten matched tasks and both configurations accept seven. One tends to leave tiny patches that miss an edge case. The other handles the edge cases and often edits outside the requested area. A single success rate misses the difference the team needs to manage. Keep a brief label and one useful artifact for each failed attempt.

5 rows · Click column to sort
Incorrect behaviorThe test passes the ordinary case but the empty input still throws.
Scope expansionThe patch changes the shared API while fixing one caller.
Verification gapThe run reports a passing check without a result the reviewer can reproduce.
Environment blockedAn approved setup dependency was missing or the sandbox denied the operation.
Time budget exceededThe run never produced a patch the reviewer could evaluate.

Some failures reflect the task environment, some the model behavior, and some the evaluator. If both configurations fail the same task for the same setup reason, fix the fixture separately and rerun the comparison. If one configuration repeatedly reaches for a different path, that may be useful evidence about how the whole setup behaves. Record it rather than quietly dropping the failing attempts.

Calculate usage in terms of finished work

Total usage for a task is easiest to compare when it includes every attempted run and any later correction required to accept the change. Report completed fixes and time spent in review alongside the usage available from your product surface. For example, a quick model with many second attempts can take more team time than a slower model that usually gets the acceptance test right. Measure it before making that judgment.

When you compare reasoning figures, check their definitions. A value reported by one client may summarize different implementation details from a value in another tool’s API response. Without comparable measures, report the figures with their source and use them to select runs for inspection. The code changes and acceptance checks remain the evidence for a performance claim about the task.

Use the trial to decide where to roll out first

Take one page to the team meeting. Include the two configurations, matched tasks, successful outcomes, common failures, and the parts of the workflow you did not study. Attach a short list of examples someone can inspect. One confirmed regression with a good reproducer is easier to investigate than several pages of impressions.

A cautious rollout might use the candidate for routine fixes and keep the known configuration for schema migrations until more data are available. If a later client update changes the environment, keep a fresh baseline. The current model choices can change quickly, while the task deck and scoring rules can survive several generations of tooling.

For the original token-count question, a relevant result would be a series of matched tasks where the reported pattern co-occurs with a particular kind of failure. Even there, keep the explanation tied to your evidence. A chart can show which runs merit another look. The reproducible patch, test, and outcome are how you describe what the team actually observed.

If the candidate handles routine fixes well but repeatedly fails your migration tasks, keep the baseline for those migrations and investigate the failing fixtures. You can revisit the choice when you have a fresh set of runs.

Frequently Asked Questions

Do repeated reasoning-token counts prove a Codex regression?

The counts identify a pattern in the reported telemetry. Match the tasks and check patch outcomes before drawing a conclusion about quality or cause.

What must stay fixed when comparing two Codex models?

Use the same starting commit, task brief, client and tools, permissions, and acceptance checks. Record reasoning settings and any differences you cannot control.

What should I count as a successful agent run?

Count a run as successful when it passes the acceptance checks, stays within the agreed scope, and produces a patch a reviewer can accept without rewriting it.

#codex#model-evaluation#reasoning-tokens#developer-tools

One AI engineering post, weekly

LLM benchmarks, prompt techniques, and token-cost breakdowns, delivered to your inbox.

What should we test or explain next?

Comments

Have a question or something to add? Sign in to join the discussion.

Mahmudul Haque Qudrati — CEO & ML Engineer at Pristren

Mahmudul Haque Qudrati

CEO & ML Engineer

Software architect, full-stack engineer, and machine learning practitioner. Founder & CEO of Pristren, CTO at Venture Kick-backed PIN Sport Application GmbH (Basel, Switzerland), Software Development Lead at DailyFrame GmbH (building Dimetra patient transport software), and creator of Zlyqor. Focused on custom workflow automation, scalable web and mobile applications, and production AI/ML systems.