Codex has a lineage, not one continuous identity

The statement “Codex evolved from autocomplete into an agent” is convenient and technically incomplete. OpenAI used Codex in 2021 for a family of code-specialized language models and an API. Those models powered the first GitHub Copilot technical preview and were deprecated in March 2023. In April and May 2025, the Codex name returned for an open-source local agent and a cloud software-engineering agent [6, 13].

The discontinuity matters. Today’s Codex is a product stack whose model can change. Its historical roots include the original code models, but also program synthesis, transformer language modeling, test-based search, reasoning-and-action loops, repository benchmarks, agent-computer interfaces, containers, version control, and human review.

This history is best read as changes to the computational unit:

ADVERTISEMENT
program candidatetoken completioninteractive suggestiontool-using trajectorydelegated workstream. \text{program candidate} \rightarrow \text{token completion} \rightarrow \text{interactive suggestion} \rightarrow \text{tool-using trajectory} \rightarrow \text{delegated workstream}.

Each arrow changes what the system observes, what it can do, and how success is measured.

Before language models: synthesis from formal examples

Program synthesis predates modern language models. A synthesis system searches a program space for an artifact satisfying a specification: logical constraints, input-output examples, a domain-specific language, tests, or a reference behavior. The specification narrows search and can support strong correctness claims within its formal scope.

Neural approaches changed how candidates were proposed. RobustFill, published in 2017, compared neural program synthesis and induction on string-transformation tasks under noisy input-output examples. Its synthesis model generated programs in a domain-specific language and showed how evaluation metric and application determine whether synthesis or direct induction is preferable [1].

This regime differs from today’s coding agents in three ways. The program language was narrow; examples acted as a compact specification; and search occurred against an evaluator designed with the task. The advantage was precise verification. The limitation was coverage: most real repository work cannot be expressed as a few input-output pairs in one DSL.

The enduring idea is generate and check. Modern agents broaden generation dramatically but still become reliable only when an environment can discriminate candidates.

ADVERTISEMENT
A freshly punched pattern card pressed part way down onto a brass peg bed, tilted, several pegs standing clear through their holes while one peg bears against solid unpunched card and holds that corner up
Figure 1. Narrow synthesis bought an exact check: a candidate is pressed onto the pegs and either every hole takes one or it does not, and every later gain in generality was paid for out of that certainty.Image prompt and art direction by Brecht Corbeel; image generated to that direction.

2017–2020: general sequence models and in-context tasks

The Transformer replaced recurrent sequence processing with attention-based architecture, enabling more parallelizable training and becoming the basis for later large language models [2]. Its original paper addressed machine translation, not code agents. The architectural consequence was a scalable sequence model capable of conditioning each generated token on a context of prior tokens.

An autoregressive model factorizes a sequence as

p(x1:T)=t=1Tp(xtx<t). p(x_{1:T})=\prod_{t=1}^{T}p(x_t\mid x_{<t}).

Source code can be placed in this representation alongside natural language. The model is not executing the program in this equation. It learns statistical structure over token sequences.

GPT-3 showed that scaling an autoregressive model could improve task performance specified through instructions and examples without gradient updates for each task [3]. Its 175-billion-parameter scale was historically important, but the deeper bridge to coding was interface: a task could be described in ordinary text and solved through conditional generation.

Code presents unusually rich structure for this approach. Public repositories contain code, comments, tests, documentation, issue language, and repeated APIs. Yet syntactic plausibility is not functional correctness. The gap between text likelihood and execution drove the next evaluation shift.

2021: Codex as a code-specialized model

OpenAI’s 2021 Codex paper described a GPT model fine-tuned on public GitHub code and introduced HumanEval, a set of Python synthesis tasks scored by functional tests [4]. A single evaluated model solved 28.8% under the reported single-sample setting; generating up to 100 samples raised pass coverage to 70.2%.

ADVERTISEMENT

The sampling result made the search interpretation explicit. If independent candidates have success probability pp, the chance of at least one success among kk is

pass@k=1(1p)k. \operatorname{pass@}k=1-(1-p)^k.

Real samples are not independent and the paper used estimators appropriate to its setup, but the conceptual point holds: model probability plus an evaluator can search a program space. Without a reliable selector, many candidates become review burden.

The paper also reported difficulty with long chains of operations and variable binding. HumanEval’s compact functions did not represent repository engineering. Still, functional evaluation displaced visual plausibility as the central code-model claim.

2021: autocomplete becomes a product loop

GitHub’s June 2021 Copilot preview placed Codex inside the editor. It used the code currently being written as context and suggested lines or functions while the developer remained responsible for selection, editing, and execution [5]. This was a human-in-the-loop architecture with very short feedback latency.

The product changed the division of labor. The model proposed; the developer supplied ongoing context, recognized intent, selected output, and ran tools. Autocomplete did not need autonomous planning because a person performed the loop at keystroke timescale.

OpenAI’s August 2021 Codex API launch described natural-language-to-code interfaces and emphasized using code to operate software APIs [6]. Demonstrations connected text requests to applications. This hinted at action, but the model endpoint itself remained a generator. Application developers supplied execution and safeguards.

The punched card chain running straight and then curving back toward its own head, its last card hovering a hand's width short of lacing onto the first
Figure 2. Autocomplete predicts code once; an agent repeatedly acts, observes environmental feedback, revises state, and decides whether evidence supports stopping.Image prompt and art direction by Brecht Corbeel; image generated to that direction.

2022: search becomes a first-class system component

AlphaCode targeted competitive programming problems that require algorithmic reasoning beyond local completion. Its system sampled many programs, filtered them through behavior, and clustered candidates before submission. In simulated Codeforces evaluations it reached an average rank around the middle of the field under the study design [7].

AlphaCode demonstrated that code-model capability can be system-level: training data, model, high-volume sampling, filtering, clustering, and evaluator jointly produce the result. The unit was not one completion. This foreshadowed best-of-N agent runs, while remaining in a problem domain with formal judging and no persistent repository.

The economic limitation was equally instructive. Large sampling budgets are viable when tests cheaply identify solutions. In production engineering, hidden requirements and human review make selection more expensive.

2022–2023: language models begin to act and observe

Two research directions made the agent loop legible. ReAct interleaved reasoning traces with actions and observations, letting external interaction update plans rather than treating reasoning and action as separate [8]. Toolformer trained a model to decide whether, when, and how to call simple APIs and incorporate results [9].

An agent trajectory can be represented as

atπθ(aot,ht,g),ot+1=E(st,at), a_t\sim\pi_\theta(a\mid o_{\le t},h_t,g), \qquad o_{t+1}=E(s_t,a_t),

where the model policy chooses an action, environment EE executes it against state sts_t, and the result becomes the next observation. This closes a feedback loop absent from one-shot completion.

Tool access solves some model weaknesses and creates authority risk. A calculator can correct arithmetic; a shell can delete files. The harness, permission system, and tool schema become part of capability and safety.

2023: code models diversify and open

The original OpenAI Codex models were deprecated in March 2023, according to OpenAI’s retrospective update [6]. The broader code-model category did not disappear. Code Llama released foundation, Python-specialized, instruction-following, and infilling variants across several parameter scales, with long-context training and publicly available weights under its stated license [10].

Infilling matters for editor work because an edit is conditioned on code before and after a gap, not only a left-to-right prefix. Open-weight code models also separated the idea of a code-specialized model from one vendor’s API. By this point “Codex” was historically specific, while code generation had become an ecosystem.

2023–2024: the benchmark moves into repositories

SWE-bench constructed 2,294 tasks from GitHub issues and pull requests across 12 Python repositories. Systems receive a repository and issue, generate a patch, and are evaluated through execution [11]. The original results were low, revealing the distance between compact synthesis and multi-file maintenance.

Repository tasks add navigation, dependency understanding, environment setup, tests, and long context. They also make the harness visible. Which files enter context? How are edits expressed? Can the model run tests and recover?

SWE-agent treated that interface as an experimental object. Its custom agent-computer interface improved navigation, editing, and test execution and materially changed benchmark performance [12]. The research result was architectural: a model’s ability is mediated by the computer interface built for it.

The benchmark still has a strong oracle—tests—and selected repositories. It does not capture every dimension of software work. But it shifted expectations from “write code that looks right” to “change a real repository and demonstrate behavior.”

The underside of a comber board seen from among the warp, ranks of harness cords drawn taut through its drilled holes, one bundle still hanging slack and one cord caught halfway through its hole
Figure 3. A pattern is not yet cloth: between the punched chain and the fabric sit the pegs, the cords, the board and the warp, and the interface built between them decides what the pattern can actually do.Image prompt and art direction by Brecht Corbeel; image generated to that direction.

Why the agent product arrived years after the code model

A model capable of generating useful functions is necessary and insufficient for delegated repository work. Between suggestion and delegation sits an infrastructure stack whose components matured on different timelines.

First, the system needs a state carrier. Version control identifies a baseline, isolates diffs, and makes rollback possible. Worktrees and branches let several attempts coexist. Without this, agent actions blur into ambient developer state.

Second, it needs a reconstructable execution environment. Package managers, lockfiles, containers, setup scripts, and CI already existed, but agent products had to turn their failure modes into model-visible observations. A dependency install that hangs, a test that cannot discover a service, or a platform mismatch must be represented well enough for recovery.

Third, it needs an agent-computer interface. Raw terminal text is an inefficient and ambiguous protocol. File reads require bounds, edits need stable semantics, long command output needs truncation, and errors must remain distinguishable from success. The SWE-agent result makes this historical layer experimentally visible [12].

Fourth, it needs authority controls. A code model returns text; a repository agent invokes processes and mutates state. Filesystem sandboxing, network policy, credential separation, approval, logging, and malicious-content handling become product prerequisites.

Fifth, it needs a review surface. The user must see changed files, commands, tests, unresolved failures, and provenance at lower cost than reproducing the whole trajectory. The 2025 Codex launch foregrounded terminal and test evidence because autonomous generation without inspectable handoff would merely move work into forensic review [13].

Finally, the economics had to support extended inference. Longer context, tool loops, retries, and multiple candidates use more compute than one completion. Product packaging, caching, model routing, and asynchronous UX turned that cost into a workflow users could tolerate.

These prerequisites explain why “the model could write code in 2021” did not imply “the product could own a repository task in 2021.” Agentic capability is co-produced by model and infrastructure.

2025: Codex returns as an agent product

OpenAI’s April 2025 Codex CLI and May cloud-agent launch reused the name for a different object. The cloud product assigned tasks to isolated environments preloaded with repositories, allowed file edits and command execution, returned terminal/test evidence, and supported pull-request workflows [13]. The local CLI provided agentic work on the developer machine.

A clean break in the punched card chain where several cards are missing, the chain resuming beyond in a heavier card of different pitch, with one card falling through the gap
Figure 4. The Codex name spans a discontinuity: the 2021 code-model family was deprecated, then the name returned for a broader agent product in 2025.Image prompt and art direction by Brecht Corbeel; image generated to that direction.

The reuse joined lineage and discontinuity. Like the 2021 model, the product translated language into code. Unlike that model, the product owned an iterative execution loop, repository state, tools, environment, permissions, and presentation of evidence. Its underlying policy was described as codex-1, an o3-derived model optimized for software engineering, not a continuously served snapshot of the deprecated 2021 family.

This distinction guards against false history. The 2025 product did not appear solely because a code model became larger. It depended on mature container infrastructure, version-control integration, executable benchmarks, tool-use research, reasoning models, and user interfaces for review.

Late 2025: pairing and delegation converge

OpenAI’s September 2025 GPT-5-Codex and product update unified terminal, IDE, cloud, and GitHub surfaces and emphasized both interactive pairing and longer independent execution. The CLI added images, task tracking, search, MCP, clearer diffs, and approval modes; cloud added environment automation and browser-based visual verification [14].

The technical unit became portable state across surfaces. A developer could begin near the code, delegate to cloud, and review a result later. This required context compaction, environment reconstruction, authorization, and evidence handoff—problems outside the base model.

Code review also became an explicit agent role. Generation and evaluation began sharing infrastructure, raising a new concern: an agent reviewing its own assumptions is not fully independent. Reliable systems need evaluator diversity and human accountability even when review is automated.

2026: from one agent to an orchestration layer

The February 2026 Codex app launch framed the bottleneck as supervising multiple long-running agents. It organized parallel threads by project, used worktrees to isolate file changes, supported skills and automations, and provided diff review [15]. Subsequent product evolution continued, but this launch marks a conceptual transition from “agent does task” to “human coordinates agent portfolio.”

Parallelism does not eliminate coordination. Worktrees prevent direct file collision while agents can still violate shared interfaces, duplicate effort, or overload review. Orchestration moves decomposition and integration into the foreground.

The app also broadened the claim beyond code generation: skills could package scripts and workflows for documents, data, deployment, and external tools. Code became a general action medium. This increases utility and expands the security perimeter.

Capability horizon becomes a historical metric

As agents became capable of multi-step work, static benchmark scores offered weak intuition about duration. METR proposed the 50%-task-completion time horizon: the human time associated with tasks a system completes at 50% probability. Its July 2026 paper revision reports a historical exponential trend on studied software tasks and emphasizes external-validity limits [16].

This metric supplies a way to quantify the transition from seconds-long completions to longer trajectories, but it does not turn history into destiny. Tasks differ in tacit context, consequence, and verifiability. Progress can slow when bottlenecks move from local reasoning to institutions or physical systems.

Five technical transitions, not one

The history can be summarized by five independent transitions.

1. From formal search to broad learned priors

Neural and language models expanded the candidate space from narrow DSLs to general-purpose code. They weakened formal guarantees and gained coverage.

2. From likelihood to executable evaluation

HumanEval, competitive judges, and repository tests made functional behavior central. Evaluation became part of the system.

3. From one output to iterative trajectories

Sampling and filtering explored alternatives; tool loops let environmental observations alter the next action; retries and recovery extended tasks.

4. From model context to engineered state

Repositories, instruction files, retrieval, compaction, sessions, worktrees, and environment manifests determined what the policy knew and changed.

5. From suggestion to delegated authority

Autocomplete left action with the developer. Agents received bounded file, shell, network, and service capabilities. Security and human review became architecture, not usage advice.

What did not change

At every stage, the system proposes a program or action under incomplete specification. Correctness still comes from the relationship among intent, artifact, environment, and evaluator. A fluent model does not know an organization’s unwritten requirement. A passing test does not cover unmeasured behavior. A longer run does not grant legitimacy.

The durable pattern is generate, observe, check, and authorize. Modern Codex has made each term richer: powerful model generation, broad tools, real environments, layered checks, and human review. Its history is therefore not a story of autocomplete waking up. It is the engineering history of wrapping probabilistic code policies in increasingly capable feedback and control systems.