Claude Code vs Codex CLI: channels, models, and workflow
Compare Claude Code and Codex CLI, two command-line coding agents AI in IDE supports: channel, configuration files, models, endpoints, and quota behavior.
Both are official vendor CLIs that reach AI in IDE through a base URL and a dashboard key. They are not interchangeable: a key belongs to one channel, and each CLI reads a different configuration file and uses a different endpoint family. The detailed setup lives in Configuration and Codex configuration.
At a glance
| Claude Code | Codex CLI | |
|---|---|---|
| Channel | AWSQ or CCMAX | Codex |
| Configuration | ~/.claude/settings.json | ~/.codex/config.toml plus auth.json |
| Endpoint family | Anthropic Messages (/v1/messages) | Responses (/responses); Chat Completions also available |
| Model family | Claude | GPT/Codex |
| Quota factor | 0.8× on AWSQ, 2× on CCMAX | 0.8× |
| Node.js for npm install | 22 or later; the native CLI needs no Node.js | 18 or newer |
| IDE surface | VS Code/Cursor extension, JetBrains plugin | The official VS Code Codex extension uses the same files |
Setup differences
Claude Code reads connection values from env in ~/.claude/settings.json. Set ANTHROPIC_BASE_URL to the bare host, ANTHROPIC_AUTH_TOKEN to the dashboard key, and add API_TIMEOUT_MS plus CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC for long agent turns. The VS Code and Cursor extension bundles the CLI; the JetBrains integration installs the CLI separately and points a beta plugin at it. The extension is designed around a claude.ai account, so set claudeCode.disableLoginPrompt in the editor settings.
Codex CLI reads ~/.codex/config.toml and ~/.codex/auth.json. The documented configuration sets model_provider = "aiinide", model = "gpt-6.1-sol", wire_api = "responses", and requires_openai_auth = true; the key goes in auth.json as OPENAI_API_KEY. The CLI appends /responses to the base URL. gpt-5.5 is retired.
Supported models
Claude Code (AWSQ and CCMAX):
| Model | Best for |
|---|---|
claude-opus-5-5 (alias claude-opus-5.5) | hard refactors, long agent runs |
claude-sonnet-5-5 (alias claude-sonnet-5.5) | everyday coding, the default |
claude-haiku-4-5-20251001 | fast edits, cheap verification calls |
Codex CLI (Codex channel), documented examples:
| Model | Input | Cache | Output |
|---|---|---|---|
gpt-6-astra | 8.00 | 0.80 | 40.00 |
gpt-6-sol | 1.60 | 0.16 | 8.00 |
gpt-6.1-sol | 1.60 | 0.08 | 8.00 |
gpt-6.1-terra | 0.80 | 0.04 | 4.00 |
codex-auto-review | 4.00 | 0.40 | 24.00 |
gpt-5.6-sol | 3.20 | 0.32 | 16.00 |
gpt-5.6-terra | 1.60 | 0.16 | 9.60 |
gpt-5.6-luna | 0.16 | 0.016 | 0.96 |
The table is the effective Codex-channel rate in USD per 1M tokens: the upstream rate multiplied by the channel's 0.8× factor. Prices above 272K input tokens, cache-write rules, and service tiers follow the Codex configuration guide.
What each client does differently
- Claude Code keeps the Anthropic client experience: the editor panel,
/status,/model, MCP servers added withclaude mcp add, hooks, permission rules, and subagent workflows. The AWSQ and CCMAX channels also accept OpenAI Chat Completions and Responses requests, but Anthropic Messages is the path for Claude-specific features. - Codex CLI is built around the Responses API. It supports built-in web search (billed per search after the channel factor), but file search is disabled, and hosted Code Interpreter, hosted shell, and image generation are unavailable because their fees cannot be calculated. Stored context references, historical audio IDs, and remote file or image references are rejected. For the GPT-5.6 and GPT-6 models listed above,
max_output_tokensdefaults to 32,768 and can be set up to 128,000. Forcodex-auto-review, the default is 4,096. - Both use one dashboard key per channel, share the purchased balance, and report usage in the dashboard. Neither needs an Anthropic, OpenAI, or Google account.
Which one to choose
Choose Claude Code when you want a Claude-native agent inside an editor and rely on MCP, hooks, permission rules, or the JetBrains/VS Code integrations. Choose Codex CLI when your work is GPT-based, you want the Responses API, or you need an OpenAI-compatible client. Running both is supported: create one key on each channel and keep the configuration files separate.
FAQ
Can one key call both clients?
No. A key belongs to exactly one channel. AWSQ and CCMAX keys cover Claude models; a Codex key covers GPT/Codex models.
Does a Codex key work on /v1/messages?
No. Codex keys authenticate against /responses or /chat/completions; sending one to the Anthropic endpoint returns 400.
Can Claude Code use the OpenAI-compatible path?
AWSQ and CCMAX accept /v1/chat/completions and /v1/responses, but Anthropic Messages is the endpoint for Claude-specific features. Send the full conversation on every OpenAI-compatible turn; stored context is not used there.
Which model should I use with Codex?
The documented configuration uses gpt-6.1-sol. gpt-5.5 has been retired, and the exact list for a key comes from GET /v1/models.