As of November 9, 2026, GPT-5-Codex is not a viable production choice: OpenAI’s model documentation marks it “Shut down.” Claude Code, meanwhile, is an agentic coding tool—not a single model or a direct equivalent to GPT-5-Codex. There is no current, like-for-like contest between those two names. For a production API decision, compare active model IDs and how you will run the agent; for a coding-agent decision, compare Codex with Claude Code using your own tasks.
What the names actually refer to
| Name | What it is | What that means for a production comparison |
|---|---|---|
| GPT-5-Codex | An OpenAI coding model. Its API model page says it was available only through the Responses API, but now marks the model shut down. | Don’t plan a new integration around gpt-5-codex. The page’s historical pricing does not make the shut-down model available for new use. |
| Claude Code | Anthropic’s agentic coding tool. It can run in the terminal, IDE, desktop app, and browser, and can read a codebase, edit files, and run commands. | It is an agent workflow, not a model API identifier. Its configured model can depend on the provider and model setting. |
| Codex | OpenAI’s coding-agent product, distinct from the GPT-5-Codex model. OpenAI describes Codex as its coding agent and says it is the best way to get agentic software engineering on projects. | Compare Codex with Claude Code for an agent-product decision. For an API-model decision, compare active model IDs instead. |
OpenAI’s code-generation guide separates these paths: it recommends Codex for agentic software engineering and says to start with gpt-6-astra for most API-based code generation. Those are recommendations for different workflows, not evidence that one model beats a Claude model on your tasks. (developers.openai.com)
Anthropic likewise distinguishes Claude Code’s CLI, the Agent SDK, and direct Claude API access. The Agent SDK embeds Claude Code’s agent loop and tools in a Python or TypeScript application. With direct API access, your application calls the Claude API and writes the tool loop itself—or uses the client SDK’s tool runner. (code.claude.com)
Which option fits a production workflow?
Choose a coding-agent product when you want a ready-made coding workflow. Choose a model API or agent SDK when your application needs to own orchestration and integration. A model API does not, by itself, provide the complete file-editing, command-running, permissions, and agent-loop setup of a coding agent. Anthropic’s Agent SDK provides built-in tools, an agent loop, context management, and permission controls; the direct Client SDK route leaves the tool loop to your application or its tool runner. (code.claude.com)
A practical API shortlist
These are documented alternatives to evaluate—not a claim that either is best for every coding workload. The listed identifiers, limits, and prices are provider-documented; actual access and rate limits can depend on your account or usage tier.
| API option | Exact model ID | Integration route | Documented constraints relevant to evaluation |
|---|---|---|---|
| OpenAI GPT-6 Astra | gpt-6-astra |
OpenAI API. Confirm the exact supported endpoint and tools for this model in its current model documentation before implementation; the material reviewed here does not establish that pairing. | 1,050,000-token context window; 128,000 max output tokens. Requests above 272,000 input tokens have higher per-token rates for the full request. API rate limits vary by usage tier. |
| Claude Sonnet 5.5 | claude-sonnet-5-5 |
Use the Claude API through a client SDK; for an agent with Claude Code’s tools and loop, use the Agent SDK instead. | 1M-token context window and 128K max output tokens on the models overview. Anthropic labels its comparative latency “Fast.” |
| Claude Opus 5.5 | claude-opus-5-5 |
Same direct Claude API or Agent SDK distinction. | 1M-token context window and 128K max output tokens on the models overview. Anthropic positions it for long-running agentic coding and knowledge work, with “Moderate” comparative latency. |
The Anthropic model overview lists these Claude API IDs as part of its current lineup and provides the model positioning, context limits, and prices. OpenAI’s GPT-6 Astra model page is the place to confirm its current endpoint and tool support, alongside its listed context and output limits and tier-dependent rate limits. (platform.claude.com; OpenAI GPT-6 Astra model documentation)
For a custom coding feature, verify the model-specific endpoint and tool availability before designing orchestration. The material here identifies GPT-6 Astra as an API option but does not establish its exact endpoint/tool pairing. Anthropic’s docs distinguish direct API calls—where you implement or delegate the tool loop—from the Agent SDK, which runs the Claude Code agent with built-in tools, permissions, sessions, and hooks. Don’t treat Claude Code itself as a Claude API model. (OpenAI GPT-6 Astra model documentation; code.claude.com)
API pricing: compare active models, not a shut-down SKU
GPT-5-Codex’s model page lists historical rates of $1.25 per million input tokens, $0.125 per million cached input tokens, and $10 per million output tokens, but marks the model shut down. These are not a current offer for a new integration.
For current reference rates, OpenAI lists GPT-6 Astra at $10 per million input tokens and $50 per million output tokens on its API pricing page. Anthropic lists Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens, and Claude Opus 5.5 at $4 per million input tokens and $20 per million output tokens in its models overview. The OpenAI code-generation guide’s gpt-6-astra recommendation is a starting point for API-based code generation, not a head-to-head result. (developers.openai.com)
Illustrative API-token calculation—not a benchmark: For a request using 100,000 input tokens and 20,000 output tokens, list-price arithmetic gives:
gpt-6-astra: 0.1 × $10 + 0.02 × $50 = $2.00.- Claude Sonnet 5.5: 0.1 × $2 + 0.02 × $10 = $0.40.
- Claude Opus 5.5: 0.1 × $4 + 0.02 × $20 = $0.80.
This example excludes caching, tools, and agent-loop retries. GPT-6 Astra requests over 272,000 input tokens have different rates, so the example does not apply to those larger prompts. Real task cost depends on token use and the number of steps each system takes; measure the actual workload. Keep API usage charges separate from subscriptions for coding products: an agent product and an API model are not the same purchase. (developers.openai.com)
Practical recommendation
- If you specifically need GPT-5-Codex: don’t choose it for a new production deployment; OpenAI marks it shut down.
- If you want an interactive coding agent: compare the current Codex experience with Claude Code on your repository, workflow, and permission needs. Don’t compare Claude Code directly with a model ID as though they were the same kind of product.
- If you’re building a production API feature: shortlist active model IDs such as
gpt-6-astra,claude-sonnet-5-5, orclaude-opus-5-5, then choose the integration route separately. Direct model APIs leave application-level orchestration to you; Anthropic’s Agent SDK provides Claude Code’s agent loop and tools in an application. The best fit depends on your workload and controls, not token price alone. (developers.openai.com)
A fair team evaluation
Run the same small set of real tasks through the exact products or API configurations you are considering:
- Select representative tasks—for example, a bug fix with a regression test, a scoped feature, and a code review. Use the same repository state and task instructions.
- Set acceptance criteria before running either system. Include correctness, required tests, security constraints, and reviewability.
- Record task completion, human corrections, elapsed time, and actual model/API usage. For agents, also note tool calls and retries.
- Repeat tasks when results vary, and compare cost per accepted result—not just token price or one successful run.
- Keep the agent setup consistent where possible. If products have different built-in tools or permission defaults, document that rather than attributing every difference to the underlying model.
This is a proposed evaluation method, not a report of test results. Bottom line: GPT-5-Codex versus Claude Code is not a current apples-to-apples decision. First decide whether you are selecting an agent product or an API model, then test currently available options against your own acceptance criteria.
Sources
GPT-5-Codex Model | OpenAI API
Agent SDK overview | Claude Code Docs
