> ## Content Index
> Fetch the complete content index at: https://www.implicator.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# Claude Code, Codex, and Gemini CLI Are Converging. The Gaps Matter More
- URL: https://www.implicator.ai/claude-code-codex-and-gemini-cli-are-converging-the-gaps-matter-more/
- Published: 2026-03-22T22:49:58.000Z
- Updated: 2026-03-22T22:50:55.000Z
- Description: Claude Code, Codex CLI, and Gemini CLI share commands like /clear, /model, and @ file references. But similar commands behave differently across tools, context windows range from 192K to 1M tokens, and each company's strategic divergence tells a sharper story than the shared vocabulary.
- Author: Marcus Schuler
- Tags: Tools & Workflows

[Claude Code](https://computingforgeeks.com/claude-code-cheat-sheet/?ref=implicator.ai), [Codex CLI](https://computingforgeeks.com/codex-cli-cheat-sheet/?ref=implicator.ai), and Gemini CLI now share a core set of terminal-agent patterns as of March 2026, according to documentation from Anthropic, OpenAI, and Google. Commands like `/clear`, `/model`, and `/plan` exist in all three. So do `@` file references, `!` shell passthrough, and project instruction files that tell the agent how to behave. The convergence is real. The sameness is not.

That distinction matters more than any feature table. All three start from the same premise. Developer types a request. Agent handles the rest. Nobody coordinated this convergence. The problem's constraints forced it. Three companies built the same cockpit because the aircraft has the same flight controls. But the autopilot in each works differently, and the differences are more revealing than the overlap.

This guide maps what transfers between the three CLIs, where equivalent commands behave differently, and where each company's strategic bets show through.

The Breakdown

- Claude Code, Codex, and Gemini CLI share core patterns like /clear, /model, /plan, and @ file references across all three tools.
- Similar commands behave differently: /clear resets history in Claude, starts a fresh chat in Codex, clears the display in Gemini.
- Context windows range from 192K tokens (Codex) to 1M (Gemini), but management commands matter more than raw size.
- Strategic divergence: Claude bets on orchestration, Codex on sandboxing, Gemini on free-tier access and Google Search.

## One word gets you in

`claude` launches Claude Code. `codex` launches Codex CLI. `gemini` launches Gemini CLI. Each opens a conversational interface where natural language prompts trigger the agent to read codebases, edit files, run shell commands, and explain what it changed. Getting in looks the same everywhere. One word.

Claude Code gives Max and Team Premium users Opus 4.6 as the default. Pro and Team Standard start with Sonnet 4.6\. Haiku 4.5 is there for quick questions. Codex CLI runs GPT-5.4 and GPT-5.4-mini, plus GPT-5.3-Codex for specialized coding work. Switch between them with `/model`. Gemini CLI routes requests automatically. Simple prompts go to 2.5 Flash. Complex ones land on 3 Pro when enabled, 2.5 Pro otherwise. Developers never touch a model selector unless they want to.

All three support `/model` for switching models mid-session. Claude Code and Codex open a selection menu. Gemini CLI uses `/model set <name>` for explicit selection. Small syntax variation, same outcome.

Some keyboard shortcuts overlap. `Ctrl+C` cancels the current operation in all three. `Ctrl+L` clears the terminal screen. Claude Code and Codex both support `Ctrl+G` to open the prompt in an external editor. Gemini uses `Ctrl+X` for a similar function when editing plans. `Ctrl+D` exits Claude Code. Codex and Gemini rely on `/exit` or `/quit`.

## Context management separates beginners from power users

Every CLI agent runs inside a context window, a buffer holding conversation history, file contents, tool outputs, and system instructions. When that buffer fills, the agent compresses earlier turns into lossy summaries or stops tracking details. Context management is the skill that separates productive sessions from frustrating ones. Most developers learn this the hard way.

Gemini CLI documents a [1M-token context window](https://inventivehq.com/blog/gemini-vs-claude-vs-codex-comparison?ref=implicator.ai) as standard. Claude Code offers 200K on most plans, with a 1M beta on some. Codex's session-window size is less prominently documented in official sources, though third-party references cite 192K. Raw numbers matter less than knowing how to manage context. All three CLIs provide overlapping tools, though those tools work differently under the surface.

`/clear` resets the conversation in all three, but the mechanics differ. Claude Code wipes conversation history and reloads system instructions. Codex starts a fresh chat within the same session. Gemini clears the visible terminal display. Similar intent, different scope.

`/compact` summarizes the conversation to free space in Claude Code and Codex. Gemini calls the equivalent `/compress` and describes it as replacing the entire chat context with a summary. Claude Code accepts a focus parameter: `/compact authentication logic` preserves auth-related context while discarding the rest.

Session resumption exists in all three but takes different forms. Claude Code offers `/resume` as an interactive slash command. Gemini CLI also has `/resume`, with tagged checkpoints and export to Markdown. Codex handles it through CLI subcommands, `codex resume` and `codex exec resume`, rather than as a slash command inside the session.

Usage tracking varies too. Claude Code has `/cost`. Codex exposes token counts within `/status`. Gemini CLI offers `/stats` with session, model, and tool subviews. Different interfaces, same habit: check consumption before starting a complex task, not after the agent starts hallucinating.

A practical rule applies across all three. One file read can eat a thousand tokens or fifty thousand, depending on size. Verbose shell output from build logs eats even more. Targeted file reads keep the window lean. Broad operations fill it fast, and once compression kicks in, fine-grained details from earlier turns vanish without warning.

## Two characters do most of the work

Two prefix characters show up across all three tools and handle a surprising share of daily usage.

`@` references a file. Type `@src/server.js` and the agent loads that file into conversation context. Tab completion fills in paths. This is how developers point the agent at specific code without it scanning the entire repository.

Stay ahead of the curve

Strategic AI news from San Francisco. No hype, no "AI will change everything" throat clearing. Just what moved, who won, and why it matters. Daily at 6am PST.

Email address 

Subscribe 

Check your inbox. Click the link to confirm.

No spam. Unsubscribe anytime.

`!` runs a shell command directly. Type `!npm test` and the results appear in the conversation. The agent sees the output and can respond. Build failures, test results, log tails. All accessible without breaking flow.

Both prefixes become second nature fast. Developers who have used any one of these CLIs for a few weeks reach for `@` and `!` without thinking about it. That muscle memory carries over completely.

`/copy` puts the agent's last response on the clipboard in all three. `/plan` switches to read-only exploration mode in all three. `/diff` shows what files changed in Claude Code and Codex, but does not appear in Gemini's documented command list.

Double-pressing `Esc` triggers something in each tool, but not the same thing. Claude Code rewinds through conversation history. Codex opens the previous message for editing and lets you walk further back. Gemini clears the current prompt or browses previous interactions. Family resemblance, not equivalence.

## Teaching the agent about a project

Every CLI agent loads a project instruction file at session start. The filenames differ. The function is the same.

Claude Code reads `CLAUDE.md`. Codex CLI reads `AGENTS.md`. Gemini CLI reads `GEMINI.md`. Each file sits in the project root and tells the agent how to behave: which testing framework to use, which directories matter, what coding conventions to follow, how deployment works.

`/init` generates this file automatically in all three tools. The agent looks at the project and drafts a starter config based on what it finds. Run it. Look at what it wrote. Commit if it makes sense. Team members using the same CLI get consistent agent behavior without manual setup.

Each tool supports at least two configuration tiers. A personal tier handles global preferences: Claude Code reads `~/.claude/CLAUDE.md`, Codex supports both `~/.codex/AGENTS.md` and `~/.codex/config.toml`, Gemini reads `~/.gemini/GEMINI.md`. A project tier lives in version control. Clone the repo and the agent already knows the rules.

Claude Code adds path-specific rules in `.claude/rules/*.md` that activate in matching directories. Codex and Gemini each have their own granular configuration mechanisms, but the implementations differ enough that drawing clean symmetry would overstate the case.

Custom commands extend built-in slash commands in each tool, though the extension mechanisms differ. Claude Code stores them in `.claude/commands/`. Codex uses skills in `.agents/skills/` with `$skill-name` invocation. Gemini CLI defines commands in TOML files under `.gemini/commands/` with colon namespacing (`/git:commit`). Shared concept, different implementations.

## Where the three split apart

The shared patterns cover daily operations. Same cockpit, same flight controls. But the autopilot works differently in each aircraft, and the gaps expose what each company is nervous about.

**Claude Code** invested in orchestration, emboldened by the highest first-pass correctness rates among the three. Experimental Agent Teams spin up coordinated sub-agents across isolated git worktrees, with dependency tracking and inter-agent messaging. The bundled `/batch` skill runs changes across 5 to 30 parallel worktrees. For large refactors, this architecture justifies the higher token cost. Claude Code consumes [3 to 4 times more tokens than Codex](https://www.morphllm.com/comparisons/codex-vs-claude-code?ref=implicator.ai) on identical tasks, but correctness runs higher and manual intervention drops close to zero.

**Codex CLI** invested in safety, cautious about what happens when agents run without a human watching. Commands run inside an OS-native sandbox by default, Seatbelt on macOS, Bubblewrap on Linux. Three modes control the blast radius: read-only for exploration, workspace-write for normal coding, danger-full-access for system administration. Developers can bypass sandboxing with `--yolo`, but the default posture is containment. OpenAI designed this for [environments where agents operate with minimal human oversight](https://arstechnica.com/ai/2026/01/openai-spills-technical-details-about-how-its-ai-coding-agent-works/?ref=implicator.ai), including cloud workflows where containers run asynchronously with network access disabled.

**Gemini CLI** invested in reach, impatient with the price tags and token ceilings that kept competitors gated. Google Search grounding pulls live web information into conversations, something neither Claude Code nor Codex offers natively. Extensions connect to Google Workspace, Redis, Hugging Face, Monday.com, and other services through installable packages. Automatic model routing handles switching between Flash and Pro without developer input. Free usage is available through Google account authentication, though the model tier and context window depend on the authentication method.

## The convergence will accelerate

MCP support. Session persistence. Project context files. Custom commands. Plan mode. File references. Shell passthrough. Context compression. Permission systems. Non-interactive scripting modes. A dozen shared patterns today, and each new feature one company ships creates pressure on the other two to match.

Gemini CLI added plan mode after Claude Code and Codex had offered it for months. Claude Code adopted hooks after Codex proved event-driven automation worked. The feedback loop tightens with every release cycle.

What stays different matters more than what converges. Claude Code's orchestration layer and Codex's sandbox represent opposing theories about where coding agents create value. Google took a third path, choosing distribution and platform integration over either approach. Those bets play out over the next twelve months as enterprises move from individual developers experimenting to entire teams adopting CLI agents as infrastructure.

The practical takeaway is straightforward. The cockpit is converging. Learn the shared patterns, pick the tool whose autopilot fits your workflow. Switching later costs less than most developers expect.

Frequently Asked Questions

Can I use the same project instruction file across all three CLIs?

No. Claude Code reads CLAUDE.md, Codex reads AGENTS.md, Gemini reads GEMINI.md. The format differs for each tool. However, the content structure is similar enough that adapting takes minutes. Each tool supports /init to auto-generate a starter config from your codebase.

Which CLI has the largest context window?

Gemini CLI leads at 1M tokens standard. Claude Code offers 200K on most plans with a 1M beta on some. Codex is less documented, with third-party sources citing 192K. Context management matters more than raw size.

Is Codex CLI's sandbox mandatory?

By default, yes. Codex runs commands inside OS-native sandboxing (Seatbelt on macOS, Bubblewrap on Linux). Developers can disable it with --yolo. Three modes exist: read-only, workspace-write, and danger-full-access.

What does /compact do versus /clear?

/clear wipes the entire conversation and starts fresh. /compact (or /compress in Gemini) summarizes the conversation to free token space while preserving key context. Claude Code lets you focus the summary on a specific topic like /compact authentication logic.

Do keyboard shortcuts transfer between the three CLIs?

Partially. Ctrl+C and Ctrl+L work in all three. Ctrl+G opens an external editor in Claude Code and Codex, but Gemini uses Ctrl+X instead. Ctrl+D exits Claude Code only. The overlap is real but incomplete.

[What Builders Are Making With Claude Code, Codex, and Gemini CLIThree terminal tools now let developers build entire applications through conversation. Anthropic's Claude Code, OpenAI's Codex CLI, and Google's Gemini CLI each take a different approach to the same The Implicator![](https://www.implicator.ai/content/images/2026/02/2026-02-20-10.35.05-ai_coding_showcase@2x.webp)](https://www.implicator.ai/what-builders-are-making-with-claude-code-codex-and-gemini-cli/)

[Anthropic's Cowork Strips the Developer Costume Off Claude CodeSimon Willison has been saying it for months. Claude Code, the terminal-based agent that Anthropic marketed to programmers, was never really a coding tool. It was a general-purpose agent that happenedThe Implicator![](https://www.implicator.ai/content/images/2026/01/2026-01-12-16.54.20-claude_cowork_anthropic@2x.webp)](https://www.implicator.ai/anthropics-cowork-strips-the-developer-costume-off-claude-code/)

[Simon Willison Ships Rodney v0.4.0, a Browser Automation CLI Built for Coding AgentsSimon Willison released Rodney v0.4.0 this week, adding Windows support, a JavaScript assertion engine, and directory-scoped sessions to his CLI tool that lets AI coding agents drive a real browser. TThe Implicator![](https://www.implicator.ai/content/images/2026/02/willision_rodney.png)](https://www.implicator.ai/simon-willison-ships-rodney-v0-4-0-a-browser-automation-cli-built-for-coding-agents/)