Comparison · 5 min read ·
Claude Code vs Codex vs Gemini CLI (Oct 2026)
A fair comparison of Claude Code, Codex CLI and Gemini CLI as of October 2026, from their own docs: install, sign-in, permissions, undo, scripting and openness.
How was this comparison made?
Every fact below comes from the vendor’s own documentation, read on October 9, 2026, and each section links to the page. There are no benchmarks, no speed tests and no winner. Models, limits and features in this space change every few weeks, so treat this as a snapshot and check the links before you decide.
The three tools are Anthropic’s Claude Code, OpenAI’s Codex CLI and Google’s Gemini CLI. All three are coding agents that run in your terminal, read your project, edit files and run commands.
What does each tool look like at a glance?
Claude Code runs in the terminal, in IDEs, in a desktop app and on the web, according to Anthropic’s overview. It documents hooks, skills, subagents and MCP, a range of permission modes, and checkpoints you can rewind.
Codex is OpenAI’s coding agent for the terminal, the ChatGPT desktop app, IDEs and the cloud. It reads AGENTS.md, starts the CLI inside a sandbox, and is included in ChatGPT plans. The CLI is open source.
Gemini CLI is Google’s open-source terminal agent. It signs in with a Google account, a Gemini API key or Vertex AI, reads GEMINI.md, and lists a free tier for personal Google accounts.
How do you install each one and sign in?
Claude Code installs with a native script (curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL, and a PowerShell script on Windows), Homebrew or WinGet. You sign in with a Claude subscription or an Anthropic Console account. Anthropic’s overview adds that the terminal CLI also supports third-party providers.
Codex installs with curl -fsSL https://chatgpt.com/codex/install.sh | sh, npm install -g @openai/codex or Homebrew. On first run you choose Sign in with ChatGPT or another available method, per the Codex CLI docs. OpenAI’s pricing page says Codex is included in ChatGPT plans, with usage limits that depend on the plan and the task.
Gemini CLI installs with npm install -g @google/gemini-cli, npx @google/gemini-cli or brew install gemini-cli. You can sign in with a Google account, a Gemini API key or Vertex AI. Its quotas page lists a daily request limit for each option, which for a personal Google account was 1,000 requests per user per day when we checked.
How does each one read your project instructions?
Each has a markdown file that it loads before it works. Claude Code reads CLAUDE.md, and, in versions that support it, falls back to AGENTS.md when a project has no CLAUDE.md. Codex reads AGENTS.md, layering a global file in ~/.codex with files from the project root down to your current folder, up to a 32 KiB default limit. Gemini CLI reads GEMINI.md, and its context.fileName setting can list other names, including AGENTS.md.
So one AGENTS.md can serve all three with a small amount of setup.
What do the permission and sandbox defaults look like?
This is where the tools differ most, so read the details.
Claude Code has permission modes. In Manual mode it asks before most actions that edit files, run shell commands or reach the network. Other modes accept edits automatically, plan without editing, or let a second model review actions instead of you (auto mode, which Anthropic says is the starting mode for interactive terminal sessions from version 2.1.283). The most permissive mode, reached with --dangerously-skip-permissions, is documented as being for isolated environments only. A Bash sandbox exists, and it is off until you enable it with /sandbox. See the permission modes docs.
Codex pairs a sandbox with an approval policy. According to its approvals and security docs, the CLI’s defaults include no network access and write permissions limited to the workspace, and Codex asks before it edits outside the workspace or runs commands that need the network. The --yolo flag removes both controls and is labeled not recommended.
Gemini CLI has --approval-mode with default, auto_edit and yolo values. Sandboxing is disabled by default and is enabled with --sandbox, though its configuration reference says it is on by default when you use YOLO mode.
If you want an enforced sandbox from the first run, note that Codex turns one on by default in the CLI, while Claude Code’s and Gemini CLI’s are opt-in.
How do you undo, work in parallel and script each one?
Undo. Claude Code takes a checkpoint per prompt, and /rewind restores code, conversation or both, though not changes made by shell commands. Gemini CLI has /rewind for its own edit tools, plus an optional checkpointing feature that is off by default. OpenAI’s Codex docs recommend Git checkpoints before and after a task.
Parallel work. Claude Code has --worktree, desktop app sessions and, as a research preview, agent view. Gemini CLI has an experimental --worktree flag. Codex has worktrees in the ChatGPT desktop app.
Scripting. claude -p "prompt", codex exec "prompt" and gemini -p "prompt" run non-interactively. Codex’s exec starts in a read-only sandbox, so you opt in to edits with --sandbox workspace-write.
What about open source and extensions?
OpenAI says it develops key parts of Codex in the open, with the CLI at github.com/openai/codex. Its open source page says the IDE extension and Codex cloud are not open source. Gemini CLI describes itself as open source under Apache 2.0 in its README. If source access matters to you, check Anthropic’s repository and terms for Claude Code.
All three document MCP support, hooks, subagents and reusable skills. The shapes differ, so check the one you plan to use.
Cursor and GitHub Copilot have terminal agents too. Cursor’s CLI starts with the agent command, has Agent, Plan and Ask modes, and reads AGENTS.md and CLAUDE.md in your project root. GitHub’s Copilot CLI starts with copilot, needs an active Copilot subscription and is built around your GitHub account.
How should you choose?
Not by a ranking. Start with what you already pay for. A Claude plan gives you Claude Code, a ChatGPT plan includes Codex and a Google account gets you into Gemini CLI’s free tier. Then compare the constraints that matter to you: the sandbox default, whether you need a desktop app or cloud tasks, and how much of the tool you want to be able to read.
Then test them on your own code. A snapshot of documentation cannot tell you which one handles your repository best. Our post on how to compare coding agents on your own code shows a simple bake-off.
Run all of them in one window
SwarmPane runs Claude Code, Codex, Gemini CLI, Grok Build, Cursor Agent, GitHub Copilot CLI and other coding CLIs side by side in real terminals, with the sign-ins you already have. Broadcast sends one prompt to several panes and tells you how many took it. Agent Race gives two or three agents the same task in separate copies of the project and lets your own tests pick the winner.
Start with a 7-day trial for $1. Your coding providers bill their own usage separately.