Skip to content
AI & Tools

Terminal AI Coding Agents Compared: Claude Code, Codex CLI, Gemini CLI, Aider and OpenHands

AIDToolStack EditorialNovember 7, 20267 min read
AI CodingClaude CodeCodexGemini CLIAiderCLI
Share:Twitter

A year ago, picking a terminal coding agent mostly meant picking a model. In November 2026 the more useful questions are duller: how do you pay, what does it do before asking, what stops a bad shell command, and which instruction file does it read. Those differ more between tools than the demos suggest, and two of the five tools people usually list are no longer what older tutorials describe.

This is a side-by-side of Claude Code, OpenAI's Codex CLI, Gemini CLI, Aider and OpenHands, built only from each project's own docs, repos and release pages. I'm not ranking them on output quality. The public benchmarks change monthly, and none of these vendors' docs give a like-for-like comparison worth repeating.

Status check first

Before comparing features, make sure the tool is the one you think it is.

  • Claude Code ships constantly. The GitHub releases page shows v2.1.319 on November 6, 2026, two days after v2.1.318.
  • Codex CLI is on 0.167.0 (stable, November 6, 2026) per its releases. Its docs moved: developers.openai.com/codex now redirects to learn.chatgpt.com.
  • Gemini CLI is on v0.67.0 stable (November 4, 2026), but its audience shrank. The README says free individual access and Google AI Pro/Ultra "moved to Antigravity CLI on June 18, 2026." It's now aimed at Gemini Code Assist Standard and Enterprise customers, plus paid API and Vertex keys.
  • Aider is still installable and Apache-2.0, but quiet. The newest release on PyPI is 0.86.2 from February 12, 2026.
  • OpenHands CLI is effectively retired. The installation docs say "The OpenHands CLI is no longer actively maintained" and point to Agent Canvas instead.

That last one changes the comparison. OpenHands as a project is alive; its terminal client isn't the recommended way in anymore.

Install, billing and default model

InstallHow you payDefault model
Claude Codecurl -fsSL https://claude.ai/install.sh | bash, Homebrew, WinGet, apt/dnf/apk, npmPro, Max, Ultra, Team, Enterprise or Console API; also Bedrock, Google Cloud, FoundryOpus 5.5 on Anthropic plans
Codex CLIcurl -fsSL https://chatgpt.com/codex/install.sh | sh, npm, HomebrewChatGPT plan (Plus and up for the CLI) or API key at API ratesNot named; config examples use gpt-6.1-sol
Gemini CLInpm install -g @google/gemini-cli, Homebrew, MacPortsCode Assist licence, paid Gemini API key or Vertex AIauto
Aidercurl -LsSf https://aider.chat/install.sh | sh, pipx, uvYour own provider keyWhatever you pass to --model
OpenHandsAgent Canvas: npm install -g @openhands/agent-canvasYour own LLM keyConfigured on first run

A few details behind that table. Claude Code's setup page says the free claude.ai plan doesn't include it; Anthropic's pricing page lists Pro at $20 billed monthly ($17 a month annually), Max at $100 and Ultra at $200. The model config page puts the default at Opus 5.5 for Pro through Enterprise and the API, Sonnet 4.5 on Microsoft Foundry.

For Codex, the pricing page lists Plus at $20 a month with the CLI, IDE extension and web included, Pro from $100, and Business at $20 per user per month billed annually. Free and Go get GPT-6 Luna in the desktop app "subject to rollout", which is not the CLI. With an API key you pay API rates and lose cloud features such as GitHub code review. The models page says Codex picks "a recommended model" if you don't set one and lists gpt-6-astra, gpt-6.1-sol, gpt-6.1-terra and gpt-6-luna.

Gemini CLI's CLI reference gives -m a default of auto with aliases pro, flash and flash-lite. Its docs also warn that it "has not been optimized for Gemini 4 Argon" and send you to Antigravity CLI for that model.

Aider and OpenHands don't sell you anything: you bring a provider key and pay that provider. Aider's install page shows the pattern, for example aider --model sonnet --api-key anthropic=<key>.

What runs before it asks

This is where the tools really differ, and it's the row I'd read first.

Matrix comparing default guardrails for Claude Code, Codex CLI, Gemini CLI and Aider across file edits, shell sandbox and network access
Matrix comparing default guardrails for Claude Code, Codex CLI, Gemini CLI and Aider across file edits, shell sandbox and network access

Claude Code starts in default mode, shown as Manual, where only reads run without asking. Shift+Tab cycles through acceptEdits and plan, and there's an auto mode where a classifier reviews actions. Per the permission modes page, bypassPermissions is meant for isolated containers or VMs only. The OS-level Bash sandbox is off until you run /sandbox; the sandboxing docs say it uses Seatbelt on macOS and bubblewrap on Linux and WSL2, routes network through a proxy whose allowedDomains "start empty," and doesn't exist on native Windows. One honest caveat from those docs: reads still cover most of the machine, including ~/.ssh.

Codex CLI flips the defaults. Its approvals and security page says version-controlled folders get the Auto preset, --sandbox workspace-write --ask-for-approval on-request: Codex edits and runs commands inside the workspace without asking, and the OS sandbox is on from the start (Seatbelt, bwrap plus seccomp, or MXC on Windows). Network is off by default. Folders without version control start read-only.

Gemini CLI has --approval-mode values default, auto_edit, yolo and plan; the old --yolo flag is deprecated. Sandboxing is opt-in with -s, GEMINI_SANDBOX or tools.sandbox, and the sandbox docs list Seatbelt profiles, Docker or Podman, gVisor, LXC and a native Windows mode.

Aider works differently. Its git docs say "Whenever aider edits a file, it commits those changes," after first committing any dirty files separately. Your guardrail is git: /undo discards the last change. Its docs don't describe an OS sandbox, so run it in a container if that matters.

Instruction files and MCP

Project instructionsMCP client
Claude CodeCLAUDE.md; reads AGENTS.md when no CLAUDE.md exists (v2.1.277+)claude mcp add, .mcp.json
Codex CLIAGENTS.md, AGENTS.override.md, 32 KiB capcodex mcp add, ~/.codex/config.toml
Gemini CLIGEMINI.md; context.fileName can add AGENTS.mdgemini mcp add, settings.json
AiderAny file loaded read-only with --read CONVENTIONS.mdNot in its docs

Claude Code's memory docs spell out the AGENTS.md rule precisely: if there's a CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your working directory or above it, Claude reads those and skips AGENTS.md. If you share a repo between tools, the clean setup is one AGENTS.md and a CLAUDE.md that imports it. Codex's AGENTS.md page concatenates files from the repo root down to your current directory, at most one per directory.

MCP support is similar across the three vendor tools: local stdio servers by command, remote servers by URL, and OAuth for remote servers. Codex shares its MCP config between the CLI, IDE extension and ChatGPT desktop app. Our MCP configuration guide covers the Claude Code side in more depth.

Headless and CI

All three vendor CLIs have a scriptable mode. Claude Code has claude -p. Codex has codex exec, and its auth docs recommend API keys for CI while warning against running Codex in untrusted or public environments. Gemini CLI has -p with --output-format json or stream-json. For CI, Codex's documented read-only preset is --sandbox read-only --ask-for-approval never, which is a sensible shape for review-only jobs in any of them.

How I'd choose

  • You already pay for ChatGPT Plus or Pro: try Codex CLI first. The sandbox is on out of the box, and the subscription covers it. Our Codex tool page and Claude Code vs Codex comparison go deeper.
  • You're on a Claude plan or want the deepest configuration (hooks, skills, permission rules): Claude Code. Turn on /sandbox on day one if you're on macOS, Linux or WSL2.
  • Your company has Gemini Code Assist Standard or Enterprise: Gemini CLI is still the supported terminal tool for you. As an individual on a free or Google AI plan, it isn't; see Gemini CLI vs Claude Code for how the two compare.
  • You want to bring any model, including local ones, and like small git commits: Aider, accepting that releases have slowed. Aider vs Claude Code covers the trade-off.
  • You want an open-source agent with a browser UI: OpenHands via Agent Canvas, not the old CLI. Its README warns that the npm install runs the agent directly on your machine with full filesystem access, so prefer the Docker route.

Whichever you pick, spend the first ten minutes on the boring part: read its permission modes, decide on the sandbox, and write the instruction file. That's where the real differences live.

AE

Written by AIDToolStack Editorial

Researched from official documentation, specifications and vendor pages, listed under Sources below. Last checked November 2026.

Sources

  1. github.com/anthropics/claude-code/releases
  2. code.claude.com/docs/en/setup
  3. code.claude.com/docs/en/model-config
  4. code.claude.com/docs/en/permission-modes
  5. code.claude.com/docs/en/sandboxing
  6. code.claude.com/docs/en/memory
  7. claude.com/pricing
  8. github.com/openai/codex
  9. github.com/openai/codex/releases
  10. learn.chatgpt.com/docs/pricing.md
  11. learn.chatgpt.com/docs/models.md
  12. learn.chatgpt.com/docs/auth.md
  13. learn.chatgpt.com/docs/agent-approvals-security.md
  14. learn.chatgpt.com/docs/agent-configuration/agents-md.md
  15. learn.chatgpt.com/docs/extend/mcp.md
  16. github.com/google-gemini/gemini-cli
  17. github.com/google-gemini/gemini-cli/releases
  18. geminicli.com/docs/cli/cli-reference/
  19. www.geminicli.com/docs/cli/sandbox
  20. aider.chat/docs/install.html
  21. aider.chat/docs/git.html
  22. aider.chat/docs/usage/conventions.html
  23. pypi.org/project/aider-chat/
  24. docs.openhands.dev/openhands/usage/cli/installation
  25. github.com/OpenHands/OpenHands

Related Posts

Explore on AIDToolStack

Discover tools and servers featured in our directory.

MCP Servers

Trigger.dev Jobs MCP ServerManage Trigger.dev background jobs from your AI coding assistant. Monitor job runs, trigger tasks manually, inspect execution logs, manage schedules, and debug failed runs. The server provides operational visibility into your background job infrastructure — see which tasks are running, queued, or failed, and take action. Your AI can help diagnose job failures from execution logs, retry failed tasks, and optimize concurrency configurations for better throughput.Tailscale Network MCP ServerManage your Tailscale mesh VPN network from your AI coding assistant. View connected devices, manage ACLs, configure exit nodes, check device status, and manage DNS settings. The server provides visibility into your Tailscale network — see which machines are online, troubleshoot connectivity issues, manage network access policies, and configure routes. Useful for developers managing distributed infrastructure where Tailscale provides secure networking between services.Portainer Docker MCP ServerManage Docker environments through Portainer's API from your AI coding assistant. Control containers, images, networks, and volumes across multiple Docker hosts and Kubernetes clusters. The server provides tools for container lifecycle management, image pulling and building, stack deployment, and resource monitoring. Portainer's multi-environment management makes this server particularly valuable for teams managing containers across development, staging, and production environments.

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Comments

Sign in to leave a comment.

No comments yet. Be the first!

Sponsor Our Newsletter

Reach thousands of developers who are actively evaluating AI tools, MCP servers, and dev infrastructure. Our weekly newsletter goes to engaged technical decision-makers.

Growing subscriber baseHigh open rates

All sponsored content is clearly labeled per our editorial policy.