Skip to content
coden

Claude Code vs Codex vs OpenCode: which AI coding agent to choose

Three terminal coding agents side by side: models, pricing, open source, project instructions and skills. Plus how to share one AGENTS.md between all three.

6 minutes Matěj Žalmánek 2026-10-26

Three terminal agents that read code, edit files and run commands: Claude Code from Anthropic, Codex from OpenAI and the open-source OpenCode. At first glance they do the same thing. The differences are in which models they use, what they cost, how tightly they tie you to one vendor, and what they offer beyond writing code. Here is Claude Code vs Codex vs OpenCode, side by side.

1. The short answer

  • Claude Code — the most complete set of features around the agent (skills, hooks, subagents, MCP, Remote Control) on Claude models. Pick it if you want a polished tool and Claude models suit you.
  • Codex — included with ChatGPT plans, strong at delegating tasks to the cloud and integrated with the OpenAI ecosystem. Pick it if you already pay for ChatGPT.
  • OpenCode — open source under the MIT license, with any model provider, local models included. Pick it if you do not want to be locked into one vendor.

2. Claude Code

Claude Code is Anthropic's agent. It runs in the terminal, in your IDE, in the desktop app and in the cloud. It works with Claude models, and you sign in either with a subscription (Pro, Max, Team, Enterprise) or an API key.

  • Project instructions live in CLAUDE.md.
  • Skills for repeatable procedures, hooks for automatic actions around tool calls, subagents for work in a separate context, MCP for connecting other services.
  • Permission modes from manual approval to plan mode, where the agent only proposes and changes nothing.
  • From your phone via Remote Control or cloud sessions in the Claude app — more in Claude Code on mobile: how to use it from your phone.

The catch: you are tied to Claude models. If you want a different model, you need a different tool.

3. OpenAI Codex

Codex is OpenAI's agent. Besides the terminal Codex CLI it has an IDE extension and cloud tasks (codex cloud) that run in a configured environment and whose result you then apply to your local repository. The CLI is open source.

  • Access is included with paid ChatGPT plans; an API key works too.
  • Project instructions live in AGENTS.md — the /init command creates it.
  • Sandbox and permissions are set with /permissions: when it may edit files and run commands without asking.
  • Skills are supported as well.

The catch: you are tied to OpenAI models. But if you pay for ChatGPT anyway, it is an agent that comes “for free”.

4. OpenCode

OpenCode is an open-source agent under the MIT license. It runs in the terminal, as a desktop app and as an IDE extension. Its main advantage: it does not choose the model for you. Connect it to any provider you have an API key for, including models running locally.

  • Project instructions also live in AGENTS.md (/init).
  • Two modes: Build changes code, Plan only proposes. Switch with the Tab key.
  • OpenCode Zen is a curated set of models the OpenCode team has tested — a good start if you do not want to research providers.
  • Skills following the Agent Skills standard.

The catch: freedom has a price. Results depend on the model you pick and how well OpenCode works with it, and there is more to configure.

5. Claude Code vs Codex vs OpenCode: comparison table

Claude CodeCodexOpenCode
Made byAnthropicOpenAIcommunity and Anomaly
ModelsClaudeOpenAIany, including local
Open sourcenoCLI yesyes (MIT)
Sign-inClaude subscription or API keyChatGPT subscription or API keywith your chosen provider
Project instructionsCLAUDE.md (or AGENTS.md)AGENTS.mdAGENTS.md
Skillsyesyesyes
Pricefrom the Pro planfrom the Plus planfree, you pay for the model

We deliberately leave out benchmarks. The ranking changes with every new model version and different tests disagree. Better than someone else's table: try all three on the same task from your own project.

6. One AGENTS.md for all three agents

Codex and OpenCode read AGENTS.md. Recent versions of Claude Code read it too — but only when the project has no CLAUDE.md. If you want both (shared rules plus a few Claude-specific ones), you still do not have to maintain two copies. Put an import in CLAUDE.md:

CLAUDE.md

@AGENTS.md

Claude Code loads the contents of AGENTS.md as if they were written in CLAUDE.md, and below the import you can add anything that applies to Claude Code only. Skills that follow the Agent Skills standard carry over between tools in a similar way — see Claude Code skills.

7. Which AI coding agent to choose

  • Pay for ChatGPT and mainly want to send tasks to the cloud? Codex.
  • Want to pick the model, save money or run a model locally? OpenCode.
  • Want the most features around the agent and Claude models? Claude Code.

And if you work with Claude Code and want to drive it from your phone — assign tasks, approve commands, commit and try the result while the agent works on your computer — that is what we built coden for. It does not support the other agents yet.

Do you see it differently? Write to support@coden-app.com.

An Agent on your computer, driven from your phone