Skip to content
ML2

Coding Agents Compared: Claude Code vs Codex CLI vs opencode and More

A coding agent reads your repository, edits files across it and runs your commands until a task is done. The seven local agents in our directory all run that loop, but they differ in what matters day to day: which models you can use, how safe they are out of the box, which rules file they read and what you need to pay before the first prompt. Below: which one to pick, a side-by-side table, a minimal setup from each project's own docs, and when a cloud agent is the better choice. Every version and feature links to an official source.

Published Last verified

Which coding agent should you use?

  • Claude Code if you want the most configurable agent with a strong default model, and you're happy to pay for a Claude plan.
  • Codex CLI if you already pay for ChatGPT and want an open-source agent that is sandboxed with network off by default.
  • Gemini CLI if your team has a Gemini Code Assist licence or a paid Gemini API key on Google Cloud.
  • opencode if you want a polished open-source terminal agent that works with any model, including local ones.
  • Cline if you want the agent inside VS Code or JetBrains and to approve each edit and command before it runs.
  • Aider if you want every change as a git commit, full control over files and model, and the lowest overhead.
  • goose if you want one open agent with a desktop app for coding and the automation around it.

Would rather review pull requests than watch a terminal? See the cloud agents in our directory.

What sets coding agents apart

The agent loop (read, plan, edit, run, check) is the same in every tool here, and when the model is held fixed, the harness mostly changes the bill rather than the result. So the useful questions are practical:

  • Whose models? Claude Code, Codex CLI and Gemini CLI are each built around their maker's models. opencode, Cline, Aider and goose let you bring any provider, including local models.
  • How safe by default? Codex CLI starts in an OS sandbox with network off. Claude Code and Gemini CLI have sandboxes you switch on. The rest rely on approvals, permission rules or git.
  • Where you work. Terminal first (Claude Code, Codex CLI, Gemini CLI, opencode, Aider), inside the editor (Cline), or a desktop app (goose, and apps from Claude Code, Codex, opencode and Cline).
  • What you pay before the first prompt. A subscription or licence (Claude Code, Codex CLI, Gemini CLI) or nothing but model tokens (the open-source, bring-your-own-key tools).

Sources: Codex approvals and security (opens in new tab), Claude Code sandboxing (opens in new tab), Gemini CLI status notice (opens in new tab).

Coding agent comparison table

Versions are the latest release on each package registry or repository on 10 Nov 2026. Each tool's section below links the source for every cell.

  • Claude Code

    Anthropic · 2.1.322

    Interface
    Terminal CLI, plus IDE extensions, a desktop app and the web
    Licence
    Proprietary
    Models
    Claude only, through Anthropic or Amazon Bedrock, Google Cloud and Microsoft Foundry
    Rules file
    CLAUDE.md; reads AGENTS.md only when there is no CLAUDE.md
    Default safety
    Permission prompts and modes; the OS sandbox for shell commands is off until you run /sandbox
    Scripts & CI
    claude -p "…" and GitHub Actions
    What you need
    Paid Claude plan (Pro, Max, Team, Enterprise) or a Console API account; the free plan excludes it
  • Codex CLI

    OpenAI · 0.167.0

    Interface
    Terminal CLI, plus an IDE extension and desktop app
    Licence
    Apache-2.0
    Models
    OpenAI models
    Rules file
    AGENTS.md
    Default safety
    OS-enforced sandbox on by default: writes limited to the workspace, network off
    Scripts & CI
    codex exec "…"
    What you need
    Sign in with a ChatGPT plan (Plus, Pro, Business, Edu, Enterprise) or use an OpenAI API key
  • Gemini CLI

    Google · 0.67.0

    Interface
    Terminal CLI (Node.js)
    Licence
    Apache-2.0
    Models
    Gemini models; Google says it isn't tuned for the Gemini 4 series
    Rules file
    GEMINI.md
    Default safety
    Sandbox is opt-in (-s, GEMINI_SANDBOX or settings): Seatbelt, Docker, Podman and others
    Scripts & CI
    gemini -p "…" and a GitHub Action
    What you need
    Gemini Code Assist Standard or Enterprise, Code Assist for GitHub, or a paid Gemini API or Vertex AI key
  • opencode

    OpenCode (anomalyco) · 2.2.6

    Interface
    Terminal UI, desktop app (beta) and IDE clients
    Licence
    MIT
    Models
    Many providers plus local models; bring your own keys
    Rules file
    AGENTS.md (/init writes one for you)
    Default safety
    Ordered allow, ask and deny rules per action; the default build agent has full access, the plan agent is read-only
    Scripts & CI
    opencode run "…"
    What you need
    Free and open source; you pay your model provider
  • Cline

    Cline · 4.1.26 · 3.0.74

    Interface
    VS Code extension, JetBrains plugin, CLI, desktop app and SDK
    Licence
    Apache-2.0
    Models
    Bring your own provider, including local models, or Cline's own usage billing
    Rules file
    .clinerules/ or .cline/rules/, plus AGENTS.md, .cursorrules and .windsurfrules
    Default safety
    In the editor, you approve each file edit and command; Plan and Act modes. The CLI's --yolo skips approvals
    Scripts & CI
    cline --json "…" or cline --yolo "…"
    What you need
    Free and open source; you pay your model provider or Cline credits
  • Aider

    Aider-AI · 0.86.2

    Interface
    Terminal CLI (Python), plus watch mode for any editor
    Licence
    Apache-2.0
    Models
    Almost any cloud or local LLM; bring your own keys
    Rules file
    No fixed file: load CONVENTIONS.md with /read or in .aider.conf.yml
    Default safety
    No sandbox; every edit is a git commit you can /undo
    Scripts & CI
    aider --message "…"
    What you need
    Free and open source; you pay your model provider
  • goose

    Agentic AI Foundation (Linux Foundation) · 1.58.1

    Interface
    Desktop app, CLI and API (Rust)
    Licence
    Apache-2.0
    Models
    15+ providers including Ollama, or your Claude, ChatGPT or Gemini subscription via ACP
    Rules file
    .goosehints
    Default safety
    Autonomous mode by default; switch to Smart Approve, Approve or Chat only with /mode
    Scripts & CI
    goose run --instructions plan.md
    What you need
    Free and open source; you pay your model provider

Claude Code

AnthropicTerminal agentProprietary

Anthropic's agentic coding tool. It reads your codebase, edits files across it, runs shell commands and handles git, from the terminal or from IDE, desktop and web surfaces that share the same settings. Hooks, skills, subagents, plugins and MCP servers make it the most configurable agent on this page.

Pick it if you want the most configurable agent with a strong default model, and you're happy to pay for a Claude plan.

Best for: Multi-file features, refactors and debugging sessions where you want a strong default model and an agent you can shape with hooks, rules and skills.

Standout features

  • One configuration (CLAUDE.md, settings, MCP servers, skills) shared across terminal, IDE, desktop and web.
  • An OS-enforced sandbox for shell commands on macOS, Linux and WSL2, with a network allowlist that starts empty once you turn it on.
  • claude -p for scripts, and an official GitHub Action for @claude in issues and pull requests.
  • Can fall back to an AGENTS.md when a repo has no CLAUDE.md, so a shared rules file still works.

Limits

  • Closed source and Claude models only: you can't swap in another vendor's model.
  • No free way in: it needs a paid plan or pay-as-you-go API billing, and heavy sessions add up.
  • The sandbox is off by default and doesn't cover file tools, hooks or MCP servers; native Windows runs commands unsandboxed.

Skip it if you need open source, a model from another vendor, or a free tier to experiment with (opencode, Aider or Cline fit better).

Install, run, script (bash)

# macOS, Linux, WSL (npm install is deprecated)
curl -fsSL https://claude.ai/install.sh | bash

cd your-project
claude                                # interactive session
claude -p "explain this function"     # one-shot, prints and exits
/sandbox                              # inside a session: turn on the shell sandbox

From the official README and CLI reference (paid Claude plan or Console account required). Source: Claude Code setup docs (opens in new tab)

Codex CLI

OpenAITerminal agentApache-2.0

OpenAI's open-source coding agent that runs locally in your terminal. It reads and edits files and runs commands inside an operating-system sandbox, with an approval policy deciding when it must stop and ask. The same agent is available as an IDE extension and desktop app; OpenAI's cloud agent is a separate surface.

Pick it if you already pay for ChatGPT and want an open-source agent that is sandboxed with network off by default.

Best for: Developers who already pay for ChatGPT and want a local agent with the safest defaults on this page, or an open-source CLI they can read and patch.

Standout features

  • Safest out of the box: the default workspace-write sandbox blocks network access and writes outside the project.
  • Open source under Apache-2.0, so you can inspect exactly what it sends and runs.
  • Included in paid ChatGPT plans, so there's no separate API bill to manage for everyday use.
  • codex exec runs the same agent in scripts and CI.

Limits

  • Built around OpenAI models: not the pick if you want to switch vendors.
  • The tight default sandbox means approving network access for installs and API calls, or loosening it in config.
  • Plan usage limits apply; heavy days can run into them.

Skip it if you want to mix model vendors freely (opencode, Aider, Cline or goose) or you live in VS Code and want approvals in the editor (Cline).

Install and pick a safety level (bash)

npm install -g @openai/codex      # or: brew install --cask codex
cd your-project
codex                             # choose "Sign in with ChatGPT"

# Read-only: plan and ask before anything changes
codex --sandbox read-only --ask-for-approval on-request

# Non-interactive, for scripts and CI
codex exec "run the tests and summarise the failures"

From the official README and the agent approvals and security docs. Source: Codex agent approvals and security (opens in new tab)

Gemini CLI

GoogleTerminal agentApache-2.0

Google's open-source terminal agent. It queries and edits large codebases, runs commands and connects to MCP servers. Since 18 June 2026 Google maintains it for Gemini Code Assist customers on Google Cloud: free individual access and Google AI Pro and Ultra accounts moved to Google's Antigravity CLI.

Pick it if your team has a Gemini Code Assist licence or a paid Gemini API key on Google Cloud.

Best for: Teams with a Gemini Code Assist licence or a Google Cloud setup who want an open-source agent that fits their existing access and billing.

Standout features

  • Open source under Apache-2.0, with weekly stable and preview releases.
  • Pluggable sandboxing: macOS Seatbelt, Docker, Podman, gVisor or LXC, chosen per run or in settings.
  • Multimodal input: build from PDFs, images or sketches, and add MCP servers for media generation.

Limits

  • No free tier and no Google AI Pro or Ultra access since 18 June 2026; Google points those users to Antigravity CLI.
  • Google says it isn't optimised for Gemini 4 models and shouldn't be used to benchmark them.
  • Gemini models only.

Skip it if you're an individual without a Code Assist licence or paid API key, or you want the newest Gemini models (Google now points you to Antigravity CLI, which we haven't reviewed yet).

Install and run sandboxed (bash)

npm install -g @google/gemini-cli   # or: brew install gemini-cli
cd your-project
gemini                               # interactive session

# One-shot prompt inside a sandbox
gemini -s -p "analyze the code structure"

From the official README and sandbox docs (Code Assist licence or paid API key required). Source: Gemini CLI sandbox docs (opens in new tab)

opencode

OpenCode (anomalyco)Terminal agentMIT

An open-source coding agent with a polished terminal interface that isn't tied to one model vendor. It ships two built-in agents you switch between with Tab: build, with full access for development work, and plan, which can't edit files and asks before running shell commands. Version 2 adds a desktop app and a configurable permission system.

Pick it if you want a polished open-source terminal agent that works with any model, including local ones.

Best for: Terminal users who want a Claude Code-style loop with any model, and the freedom to switch providers as prices and quality move.

Standout features

  • Provider-agnostic, including local models, so one workflow survives a change of model.
  • A read-only plan agent one keypress away, for exploring a codebase safely before changes.
  • Fine-grained permission rules: for example ask before any shell command, allow git status and git diff, always deny git push.
  • The most-starred project on this page, with frequent releases.

Limits

  • The default build agent has full access until you add permission rules; no OS sandbox is documented.
  • Moves fast: version 2 changed the install package and config, so older guides may be wrong.
  • Results track the model you bring, and you manage keys and spend yourself.

Skip it if you want a vendor-tuned model and harness in one subscription (Claude Code or Codex CLI) or you'd rather stay inside VS Code (Cline).

Ask before shell commands, never push (jsonc)

// opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "permissions": [
    { "action": "shell", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "git status *", "effect": "allow" },
    { "action": "shell", "resource": "git diff *", "effect": "allow" },
    { "action": "shell", "resource": "git push *", "effect": "deny" },
  ],
}

From the official permissions docs (install with npm i -g @opencode/cli@latest). Source: opencode permissions docs (opens in new tab)

Cline

ClineIDE agentApache-2.0

An open-source coding agent that started in VS Code and now shares one agent core across the extension, a JetBrains plugin, a CLI, a desktop app and an SDK. It creates files, runs commands and browses, with a human approval step for each action, and a Plan mode to agree the approach before Act mode edits anything.

Pick it if you want the agent inside VS Code or JetBrains and to approve each edit and command before it runs.

Best for: VS Code or JetBrains users who want an agent inside their editor, with their own model keys and every step visible before it happens.

Standout features

  • Approval for each edit and command, with diffs in the editor: the most transparent loop here.
  • Reads rule files from other tools (AGENTS.md, .cursorrules, .windsurfrules), so switching costs little.
  • Same plan and act modes, MCP servers, rules and checkpoints across IDE, CLI and desktop.

Limits

  • Approving every step is slower than an autonomous agent on big tasks.
  • You pay per token with your own keys, so long sessions on premium models get expensive: watch spend on big tasks.
  • The CLI's --yolo mode removes every approval: keep it to sandboxes and CI.

Skip it if you work in the terminal and want fewer prompts (Claude Code, Codex CLI or opencode) or you want each change committed to git automatically (Aider).

Run Cline from the terminal (bash)

npm i -g cline

# Interactive, with approvals kept on
cline --auto-approve false "Inspect and modify this repository"

# Headless for CI: stream JSON events, approve every tool
cline --json "List all TODO comments"
cline --yolo "Run tests and fix any failures"

From the official CLI README (VS Code users: install from the Marketplace instead). Source: Cline CLI README (opens in new tab)

Aider

Aider-AITerminal pair programmerApache-2.0

The longest-running open-source tool here: pair programming with an LLM in your terminal. You add the files to change, describe the edit, and Aider applies it using a map of your whole repo, then commits it with a descriptive message. It can lint and test after every change and fix what breaks.

Pick it if you want every change as a git commit, full control over files and model, and the lowest overhead.

Best for: Developers who want tight control over cost and model choice, and git history as the safety net for every change.

Standout features

  • Every change is a commit, so reviewing, reverting and bisecting use the git tools you already know.
  • A repo map gives the model cross-file context without loading every file.
  • Built-in lint-and-test loop: --lint-cmd, --test-cmd and --auto-test.
  • Watch mode lets you ask for changes from comments in any editor.

Limits

  • Less autonomous: you choose the files and drive the steps.
  • No sandbox or approval step for shell commands; it relies on git and on you.
  • Releases have slowed: the last PyPI release was February 2026, so newer models and features arrive later than elsewhere.

Skip it if you want an agent that explores and runs commands on its own (Claude Code, Codex CLI or opencode) or approvals inside your IDE (Cline).

Install and close the loop (bash)

python -m pip install aider-install
aider-install

cd your-project
aider --model sonnet --api-key anthropic=<key>

# Lint and test after every edit, fix what breaks
aider --lint-cmd "npm run lint" --test-cmd "npm test" --auto-test

From the official README and lint-and-test docs. Source: Aider: linting and testing (opens in new tab)

goose

Agentic AI Foundation (Linux Foundation)General-purpose agentApache-2.0

A general-purpose, open-source agent that runs on your machine, for code and for research, writing and automation. It ships as a desktop app for macOS, Linux and Windows, a CLI and an API, and connects to 70+ extensions through the Model Context Protocol. It started at Block and is now part of the Agentic AI Foundation at the Linux Foundation.

Pick it if you want one open agent with a desktop app for coding and the automation around it.

Best for: Builders who want one open agent for coding and the ops, research and automation around it, with a desktop app as well as a CLI.

Standout features

  • A desktop app, a full CLI and an API from one open-source project, built in Rust.
  • Bring any provider, run local models through Ollama, or reuse an existing Claude, ChatGPT or Gemini subscription.
  • Recipes package a prompt, extensions and settings into a repeatable task you can run with goose run.

Limits

  • Autonomous mode is the default: switch to Smart Approve or Approve before pointing it at a real repo.
  • A generalist: the coding loop is less specialised than the dedicated coding agents here.
  • Results depend heavily on the model and extensions you choose.

Skip it if you only need a coding agent and want the most specialised one (Claude Code, Codex CLI or opencode).

Install, configure, start safely (bash)

curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash

goose configure      # choose a provider and model
cd your-project
goose session        # start a session

# Inside the session: ask before risky actions
/mode smart_approve

From the official README, quickstart and permission docs. Source: goose permission modes (opens in new tab)

When a cloud agent fits better

Local agents are best when you want to steer and test against your own setup. For small, well-specified tasks you'd rather hand off and review as pull requests, a cloud or PR-based agent from our directory often fits better:

  • Codex Cloud if you'd rather send several small tasks to cloud sandboxes and review the diffs, with your ChatGPT plan.
  • Cursor Cloud Agents if Cursor is your editor and you want tasks to keep running in the cloud while you work.
  • Jules by Google if you want an async agent that shows a plan for approval, then opens a pull request.
  • GitHub Copilot cloud agent if your team already pays for Copilot and wants to assign issues and get pull requests back.
  • Claude Code GitHub Actions if you want @claude in issues and pull requests, running on your own CI.
  • Devin if a team wants parallel cloud agents working through a sizeable backlog.
  • OpenHands if you need Devin-style agents on your own infrastructure.

How to choose a coding agent

  • Start with what you already pay for. A Claude plan points to Claude Code, a ChatGPT plan to Codex CLI, a Gemini Code Assist licence to Gemini CLI. No subscription: start with opencode, Aider or Cline and your own key.
  • Then where you want to work. Terminal: Claude Code, Codex CLI, opencode or Aider. Editor with approvals: Cline. A desktop app for coding and everything around it: goose.
  • Then how much autonomy you want. Aider and Cline keep you in each step. Claude Code, Codex CLI and opencode can work through a multi-step task on their own once you trust the setup.
  • Write one rules file. Put build and test commands and conventions in an AGENTS.md. See give your agent a conventions file for what to put in it.
  • Make it check itself. Have the agent run your linter and tests after every edit, as in the auto lint-and-test fix loop. Running several agents at once? Give each its own git worktree with Worktrunk.

Run coding agents safely

A coding agent runs commands on your machine with your access. Whatever you pick:

  • Turn on the sandbox where there is one (see the Default safety row), and keep network access off unless the task needs it.
  • Work on a branch or a separate worktree, and review every diff before it merges.
  • Keep secrets out of the repo and out of prompts: agents read whatever files they can reach.
  • Treat issues, docs and web pages the agent reads as untrusted, because they can carry hidden instructions.
  • Keep approval-free modes (--yolo, autonomous, bypass permissions) for containers and CI.

Coding agent FAQ

What is a coding agent?

An A.I. tool that does more than autocomplete: it reads your repository, plans a change, edits several files, runs commands such as your tests, and repeats until the task is done. The agents on this page run on your machine, in your terminal or editor. Cloud agents such as Codex Cloud, Jules or Devin run the same loop in a remote sandbox and hand back a pull request.

Claude Code or Codex CLI: which should I use?

Pick Claude Code if you want the most configurable agent (hooks, skills, subagents, plugins) and Claude models, and you have or will buy a Claude plan. Pick Codex CLI if you already pay for ChatGPT, want an open-source CLI, or want the safest defaults: it starts in a sandbox with network access off. Both read an AGENTS.md, so you can try both on the same repo.

Is Gemini CLI still free?

No. Since 18 June 2026 Gemini CLI no longer serves free individual accounts or Google AI Pro and Ultra subscribers. Google moved those users to Antigravity CLI and maintains Gemini CLI for Gemini Code Assist Standard and Enterprise, Code Assist for GitHub, and legacy paid API and Vertex AI keys. The code is still open source under Apache-2.0.

What is the best free coding agent?

The tools are free; the models usually aren't. opencode, Aider, Cline and goose are free and open source, and you pay only for the model you connect, or nothing if you run a local model through a provider such as Ollama. Codex CLI is open source too but needs a paid ChatGPT plan or an API key. Claude Code has no free tier.

Which coding agent is best for VS Code?

Cline is the most native: an extension that shows each diff and asks before every edit and command. Claude Code and Codex CLI also have official IDE extensions, and every terminal agent here works in VS Code's integrated terminal.

opencode vs Aider: what's the difference?

opencode is an autonomous agent: it explores the repo, runs commands and switches between a full-access build agent and a read-only plan agent. Aider is a pair programmer: you add files to the chat, it makes the edit and commits it to git. Pick opencode for hands-off, multi-step work with any model; pick Aider for small, reviewable, reversible changes at the lowest cost.

Which coding agents work with local models?

opencode, Aider, Cline and goose all connect to local models, for example through Ollama. Claude Code runs Claude models only, Codex CLI is built around OpenAI models, and Gemini CLI runs Gemini models. Local models are private and free to run but usually weaker at long, multi-step tasks.

Can I use one rules file for every coding agent?

Mostly. AGENTS.md is read by Codex CLI, opencode and Cline, and by Claude Code when a repo has no CLAUDE.md. Gemini CLI uses GEMINI.md, goose uses .goosehints and Aider loads whatever file you pass with /read. Keep one AGENTS.md with build and test commands and conventions, and point the others at it.

Are coding agents safe to run on my machine?

Only with guardrails. Codex CLI is sandboxed by default. Claude Code and Gemini CLI have sandboxes you must turn on. opencode, Cline and goose rely on permission rules or approvals, and Aider relies on git. Work on a branch or worktree, keep secrets out of the repo, review every diff, and never run an approval-free mode such as --yolo outside a container or CI.

Should I use a terminal agent or a cloud agent?

Use a terminal or IDE agent when you want to steer the work, watch it run and test against your local setup. Use a cloud agent when tasks are small, well specified and independent, and you'd rather review pull requests than watch a terminal. Many builders use both: a local agent for the hard change, cloud agents for the backlog.

How we checked

Versions and dates come from npm, PyPI and GitHub releases. Features, licences, defaults and snippets come from each project's own docs and repositories. No benchmark scores are claimed: published coding-agent rankings change with every model release and often come from the vendors themselves. We only compare tools that have a MoreLime.AI entry; Cursor's editor agent, Antigravity CLI, Kiro and Roo Code aren't covered yet. Building an agent of your own? See agent SDKs compared. Giving your coding agent a browser? See browser agents compared. Last verified .

Newsletter

Get the best new A.I. picks in your inbox

The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.

Free. No spam. Unsubscribe anytime.