Codex or Claude Code: comparing console agents
Both live in the terminal and edit code, but they are built differently. The differences that show up in use.
2 min · · Updated · codex · claude-code · choosing a model · cli
Both tools do the same thing: read a project, edit files, run commands. The differences start where descriptions rarely go — in the protocol, the approval model and how each spends context.
Protocol and setup
Claude Code speaks the Anthropic-compatible format. The base URL takes no /v1 suffix — the client appends the path itself:
ANTHROPIC_BASE_URL=https://api.zukko.pro
ANTHROPIC_AUTH_TOKEN=fetch_your_keyThe variable is specifically ANTHROPIC_AUTH_TOKEN. With ANTHROPIC_API_KEY the client decides you are talking to Anthropic directly and demands a login.
Codex speaks the OpenAI-compatible format through the Responses API. The provider lives in ~/.codex/config.toml, the key separately in ~/.codex/auth.json:
model = "gpt-5.6-sol"
model_provider = "zukko"
[model_providers.zukko]
name = "zukko"
base_url = "https://api.zukko.pro/v1"
wire_api = "responses"Here the /v1 suffix is required. This is the most common cause of a 404 on first run with either tool — the rule is easier remembered as: Anthropic-compatible without the suffix, OpenAI-compatible with it.
How changes get approved
Claude Code shows a diff and asks permission to write. How strict it is can be configured, but by default the agent does not touch files silently.
Codex works in modes, from fully manual approval to autonomous execution in a sandbox. The autonomous mode suits tasks where tests verify the result, and is dangerous where nothing verifies it.
The practical conclusion is the same for both: start strict on an unfamiliar codebase and relax as trust builds.
Token spend
Both are agents, which means input tokens dominate: the context is resent at every step.
Claude Code keeps read files and the accumulated step history in context. Over a long session the volume grows noticeably, and clearing context saves more than switching models.
Codex manages context itself and additionally spends on reasoning when that level is enabled. The model_reasoning_effort setting maps directly onto the bill: on simple tasks a high level does not pay for itself.
One rule applies to both: watch the input token price, not the output. The number comes back in the usage field of every response.
Which to choose
Claude Code suits people who work through dialogue: discuss, review a plan, agree, see the diff. It is strong on reading unfamiliar code and multi-file edits.
Codex suits people who want autonomy: set a task, walk away, come back to a result with tests already run.
Keeping both is normal practice rather than a compromise. They configure against the same key and the same balance, so the choice is made per task rather than once and for all. The model catalogue is shared: you can put an Anthropic model in Codex, and remap Claude Code's slots to something cheap for routine work.
The current model list is at GET https://api.zukko.pro/v1/models; prices and context are at GET /v1/models/info or on the Models page in the dashboard at zukko.pro.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- opencode agents: setting up roles, models and toolsA custom agent in opencode is a role, a model and a set of permissions. A working config where a cheap model handles routine work and a stronger one edits code.
- OpenAI API Keys in the Open: Why You Should Not Use ThemWhere free keys on GitHub come from, why using them is dangerous for you and for the owner, and how to protect your own key from the same leak.
- GLM API Errors: Why the Request Fails and How to Fix ItA wrong model id, an overflowing 128K context, the key, the balance, limits: the typical causes of GLM API errors and a quick way to find yours.
- Plan mode in Claude Code: plan first, then edit the codeIn plan mode Claude Code reads your code and proposes a plan but edits nothing until you agree. How to enable it, use it and what it costs.