Skip to content

COMPARISONS

Best Terminal AI Coding Agent: A Measured Three-Way

The best terminal AI coding agent depends on where your config lives. We ran one repo through Claude Code, Codex CLI and Antigravity CLI: one surface of six survives all three.

The best terminal AI coding agent is the one whose configuration model matches how your team works, because on capability the three leading options have converged and nobody can rank them honestly without running all three on the same task set. What can be measured is lock-in. We ran this site's repository through a configuration audit against Claude Code, Codex CLI and Antigravity CLI on 2026-08-13: of six configuration surfaces, exactly one survives a move to all three, and none of the three would read a single byte of this repo today.

Key takeaways

  • Only 1 of 6 configuration surfaces — project instructions — survives a move to all three agents, and even that one requires a rename.
  • Antigravity CLI is the cheapest destination from a Claude Code repo (5 of 6 concepts survive), Codex CLI next (4 of 6), Aider by far the most expensive (1 of 6).
  • Codex CLI is the only one of the three that defaults your real configuration out of the repository and into your home directory.
  • Codex CLI silently truncates project instructions at 32,768 bytes; the other two document no cap at all, which is not the same as having none.
  • Every failure in this comparison is silent. No agent tells you it found no instructions — it just behaves like a tool that disagrees with all your conventions.

The short answer

If you want the recommendation before the evidence:

  • Choose Codex CLI if you run agents unattended or need to read the source to trust the defaults. OS-level sandboxing and an Apache-2.0 licence are things the other two cannot offer.
  • Choose Claude Code if your agent configuration is committed and read by a team. The project-root .mcp.json, project subagents, and an uncapped instruction file all assume that.
  • Choose Antigravity CLI if you were on Gemini CLI, whose consumer access ended 2026-06-18. From a Claude Code repo it is the cheapest migration we measured — but see the reported quota and cost regressions in our Antigravity CLI comparison first.

If you are choosing a category rather than a terminal agent specifically, the best AI coding assistants comparison puts all of these against Cursor and Copilot on the where-do-you-work question, which is the decision that comes before this one.

What we can measure and what we cannot

Only Claude Code (v2.1.229) is installed on the machine this was written on. Codex CLI and Antigravity CLI are not, and we are not going to fabricate a benchmark to fill the gap.

That constraint is more useful than it sounds. A capability ranking between these three has a half-life of about a quarter — all three ship models and harness changes continuously, and any article claiming a durable winner on output quality is describing a week in the past. Published benchmark scores do not close that gap either: the filter that builds SWE-bench instances keeps roughly 2.5% of the pull requests it sees, and a score is a statement about a model plus a scaffold plus that surviving 2.5%. Configuration architecture moves far more slowly, and it is the thing that actually costs you a day when you switch.

So this comparison measures inputs: which files each agent reads, whether git carries them, and what has to change for the same repository to work under a different tool. Every Claude Code figure below is first-hand and reproducible. Every Codex CLI and Antigravity CLI figure comes from vendor documentation or source, cited inline.

The portability matrix

Terminal
npm run check:portability -- --matrix
Output, 2026-08-13
  CONCERN                   PRESENT     CODEX CLI         ANTIGRAVITY CLI   AIDER
  Project instructions      8,189 B     rename            rename            declare
  Path-scoped instructions  absent      none              rewrite           none
  MCP servers               284 B       rewrite           copy              none
  Subagents                 2,443 B     rewrite           rename            none
  Permissions / approvals   4,263 B     none              none              none
  Skills                    absent      rewrite           rename            none

  Concept survives                      4 / 6             5 / 6             1 / 6
  Ports without editing the file        0 / 6             1 / 6             1 / 6
  Config lives in the repo              no                yes               yes
  Instruction file auto-discovered      AGENTS.md         AGENTS.md         none
  Documented instruction byte cap       32,768 B          not documented    not documented

  Surfaces that survive all 3 targets: 1 of 6 — project instructions.
  Of this repo's 4 present surfaces, 10,916 B is committed and 1 is machine-local.

  What each would read from this repo today:
    Codex CLI        nothing
    Antigravity CLI  nothing
    Aider            nothing, and no rename would change that

The verdict vocabulary is deliberately narrow. rename means the format is identical and only the filename changes. copy means the file moves untouched. rewrite means the concept exists but you hand-translate it. declare means the file works as-is but the tool has to be told it exists. none means the concept does not exist on the far side — that is not migration work, it is a capability you lose.

Aider is in the matrix as a control rather than a contender, and it earns its place by being the outlier: one surviving concept against Antigravity's five. We take that comparison apart separately in Aider vs Claude Code.

Two more targets have been audited since, and both change the shape of this table rather than just extending it. Cline scores four of six and is the first target whose MCP config ports as a clean copy into a path outside the repository, which is a failure mode none of these three columns can express. Roo Code also scores four of six and was archived in May 2026, which is the clearest evidence available that a good portability score is not a recommendation. For the whole field rather than this three-way, the 2026 survey covers which projects are still moving at all.

Only one surface survives all three

Read down the columns and the pattern is that agreement between any two agents is common, and agreement between all three is almost absent.

SurfaceSurvives all three?Why not
Project instructionsYesRename only — every agent has the concept
MCP serversNoAider documents no MCP client
SubagentsNoAider has no equivalent
SkillsNoAider has no equivalent
Path-scoped rulesNoCodex CLI has no equivalent
PermissionsNoEvery target models trust differently

Permissions is the row worth pausing on, because it is the only one where all three targets return none, and it is not an oversight in any of them. Codex isolates at the OS level with sandbox_mode and approval_policy. Claude Code allowlists individual tool calls. Antigravity routes it through hooks. These are three genuinely different theories of how an agent should be trusted, and there is no translation between them because they are not the same idea expressed differently.

That has a practical consequence: whatever you have taught your agent to permit, you will teach again from scratch. On this repository that is 4,263 bytes of accumulated allowlist — which the matrix also reports is not in git, so it configures one machine and reaches no teammate under any of the three.

Where each agent keeps your configuration

This is the row that decides whether a migration is one commit or one commit per developer, and it splits the three cleanly.

Claude Code and Antigravity CLI both put real configuration in the workspace — .claude/ and .agents/ respectively — so a teammate who clones the repo gets your MCP servers and subagents with it. Codex CLI defaults to ~/.codex/config.toml, and reads a project-scoped .codex/config.toml only for projects you have explicitly marked trusted.

~/.codex/config.toml — per user, not per repo
[mcp_servers.roadmap]
command = "node"
args = ["scripts/mcp/roadmap-server.mjs"]

That relative path is the trap, and it is why the location question is not merely stylistic. We established by measurement that Claude Code resolves relative MCP paths against the project root. A home-directory config has no project root, so the identical string resolves somewhere else entirely — or nowhere.

None of this makes Codex wrong. Per-user configuration is the correct default if you believe an approval policy is a personal safety setting rather than a team convention, which is a defensible position and arguably the safer one. It is simply a different bet, and you should know which bet you are making before ten developers each configure the same three MCP servers by hand.

The instruction file decides your lock-in

Every other surface is recoverable with an afternoon of translation. The instruction file is the one that fails silently, and it is the one to get right first.

Codex CLI and Antigravity CLI both read AGENTS.md. Claude Code reads CLAUDE.md and documents three bridges to an AGENTS.md: a one-line @AGENTS.md import, a symlink, or /import. So the asymmetry is stark and it runs one way.

CLAUDE.md — the whole migration, in one line
@AGENTS.md

A repository standardised on AGENTS.md feeds all three agents. A repository standardised on CLAUDE.md — like this one — feeds exactly one, and the other two start with no project instructions and never mention it. Our CLAUDE.md configuration guide applies unchanged to an AGENTS.md; the format is identical and only the filename is contested.

Then there is the cap, which only one of the three documents and none of the three warn about at runtime.

Claude Code's documentation takes the opposite position explicitly, saying CLAUDE.md files "are loaded in full regardless of length." Antigravity CLI documents no cap, and we recorded that as unknown rather than as none, because an undocumented limit is exactly the kind of thing you find out about from behaviour rather than from docs. This repo's instruction file is 8,189 bytes — 25.0% of the Codex ceiling, and growing.

How to pick the best terminal AI coding agent

The decision rule that follows from the measurements, in the order the questions actually matter. One question comes before all of them: whether you need a terminal agent at all rather than a chat client, which we priced at 17,709 tokens of tool surface.

  • Is your agent config a team asset or a personal setting? Team asset means Claude Code or Antigravity CLI, where the workspace directory is committable. Personal setting means Codex CLI is not a compromise but a match.
  • Do you run agents unattended? If yes, Codex CLI's OS-level sandbox is the only model here that holds when the agent is wrong about what a command does. A per-call allowlist cannot promise that.
  • Do you need to audit the licence or the defaults? Codex CLI is Apache-2.0 and readable. Claude Code and Antigravity CLI are both proprietary.
  • Were you on Gemini CLI? Then the question was decided for you in June, and Antigravity CLI is the destination — with the cost caveats we cover in the dedicated comparison.
  • Are your instruction files large? Over 32 KiB of combined instructions rules out Codex CLI silently, which is the worst way to be ruled out.

On price, all three are bundled into their vendors' subscription plans rather than sold standalone, and the figures move too often to restate here — what AI coding assistants actually cost covers the tiers and the usage-based overage that decides the real bill.

Common mistakes comparing terminal agents

  • Ranking them on a feature table. All three read repos, edit multi-file, run commands, and dispatch subagents. The table is a tie, and a tie is not a recommendation.
  • Assuming MCP is portable because the protocol is. The servers are portable; the configuration is not. Format, key names and file location all move independently.
  • Testing with an empty repo. Every one of these agents looks equivalent until it has to read your conventions. The differences are all in what loads at session start.
  • Believing "no documented cap" means "no cap." Only Codex publishes a limit, and it publishes it in the source rather than the reference.
  • Reading a comparison older than a quarter. Antigravity CLI did not exist as a shipping product before 2026-05-19, and any three-way written before that is a two-way.

Conclusion

Pick on configuration architecture, not capability: it is the axis that is measurable today and the axis that will still be true next quarter. Committed team config points to Claude Code, unattended runs and licence auditability point to Codex CLI, and a Gemini CLI history points to Antigravity CLI. Whichever you choose, rename your instruction file to AGENTS.md and leave a one-line @AGENTS.md import behind — it costs one commit, feeds all three agents, and removes the only failure here that no tool will ever report to you.

Frequently asked questions

Which is the best terminal AI coding agent in 2026?
On capability, nobody can honestly tell you without running all three on the same task set. On lock-in, which is measurable, Claude Code and Antigravity CLI keep configuration in the repository where git carries it to teammates, and Codex CLI defaults to a per-user file in your home directory. Pick Codex for OS-level sandboxing and an open licence, Claude Code for committed team config, Antigravity if Gemini CLI was already your tool.
How much configuration transfers between terminal coding agents?
Less than the feature tables imply. Measured across six configuration surfaces on one real repository, only project instructions survive a move to all three agents, and even that requires a rename. MCP servers, subagents, skills, path-scoped rules and permissions each break on at least one target, and every failure is silent.
Do Claude Code, Codex CLI and Antigravity CLI all use AGENTS.md?
Codex CLI and Antigravity CLI both read AGENTS.md. Claude Code reads CLAUDE.md and documents three bridges to an AGENTS.md — an @AGENTS.md import line, a symlink, or the /import command. So standardising on AGENTS.md feeds all three agents, and standardising on CLAUDE.md feeds exactly one.
Is there a byte limit on agent instruction files?
Codex CLI caps project instructions at 32,768 bytes and truncates past it silently. That default appears in the source rather than the published configuration reference. Claude Code documents no cap and says the files load in full regardless of length. Antigravity CLI documents no cap either, which is not evidence that none exists.
Can I run more than one terminal AI agent on the same repository?
Yes. The three read disjoint paths — CLAUDE.md and .claude/, AGENTS.md and .codex/, AGENTS.md and .agents/ — so none of them notices the others and nothing conflicts. Running two while you evaluate costs nothing but the config duplication, which an @AGENTS.md import line removes.

Muhammad Kashif

Founder and editor of Devventa, covering AI coding assistants, Next.js and the modern AI development stack.