← Back to articles Blog

OpenAI Codex: What It Was, What Replaced It, and What's Next for AI Coding

Emmanuel Ekunsumi · 5 min read · Jul 5, 2026

OpenAI Codex was the model that started the AI coding revolution. Released in 2021, it was the first large-scale model specifically trained for code — and it powered GitHub Copilot from launch until its deprecation in 2023.

Codex no longer exists as a standalone product, but its legacy shapes every AI coding tool available today.

What Codex was

Codex was a GPT-3-based model fine-tuned on 54 million public GitHub repositories. It could:

At the time, it scored 28.8% on HumanEval (a Python coding benchmark). Today's models score 90%+. The progress has been extraordinary.

Why Codex was deprecated

OpenAI deprecated the Codex API in March 2023 because GPT-3.5 and GPT-4 simply outperformed it on coding tasks — despite being general-purpose models. Dedicated coding models were no longer necessary when frontier models trained on diverse data became better coders than specialists.

What replaced Codex

Use caseCodex eraToday
GitHub CopilotCodexGPT-4o + Claude
Code completion APIcode-davinci-002gpt-4o, claude-sonnet
Local coding assistantN/AQwen2.5-Coder, DeepSeek-Coder
Agentic codingN/AClaude (SWE-bench leader)

The new OpenAI Codex (2026)

In 2025, OpenAI reused the Codex name for a new product: an autonomous coding agent integrated into ChatGPT and the API. This new Codex is fundamentally different from the original — it's an agent that can read repos, write code, run tests, and iterate, not just a completion model.

The new Codex is powered by a fine-tuned version of o3, OpenAI's reasoning model. It represents the shift from code completion to autonomous software engineering.

What this means for token costs

Agentic coding tools like the new Codex, Claude's computer use, and Devin make many more API calls than simple autocomplete — often dozens of calls per task as the agent reads files, writes code, runs tests, and debugs. This dramatically increases token consumption per developer task.

Teams using agentic coding tools need visibility into how many tokens each agent task actually consumes — which can be 10-100x more than expected.

Track agentic coding token costs

Tokoscope shows token usage per call and per session — so you know what each agent task actually costs.

Get started free →