# AI coding agents compared: Claude Code, Codex, Cursor

> Compare Claude Code, Codex CLI, Copilot CLI, Cursor, OpenCode and Windsurf: terminal vs IDE, provider lock-in, MCP, open source and cost.

- Canonical: https://guides-ai.com/guides/coding-agents-compared/
- Plate 14.09 · Topic: Other coding agents (https://guides-ai.com/topics/agents/)
- Published: 21 Oct 2026 · 3 min read
- Source site: guides-ai — https://guides-ai.com/

Short: pick **Claude Code** if you live in the terminal and want deep Anthropic-model agents that also reach into your IDE, desktop and web; pick **Cursor** if you want the model inside an editing surface; pick **Codex CLI** if you are in the OpenAI ecosystem and want an open-source terminal agent. Need to swap models freely? **OpenCode** is the model-agnostic choice. All of these are [agents](/glossary/#agent) that read your repo, edit files and run commands.

## 1. The comparison table

| Tool | Surface | Model / provider | MCP | Open source | Cost |
|------|---------|------------------|-----|-------------|------|
| Claude Code | Terminal + IDE/desktop/web | Anthropic Claude (3rd-party in CLI) | Yes | No | Plan or API key |
| [Codex CLI](/guides/codex-cli-first-steps/) | Terminal (+ IDE ext) | OpenAI (ChatGPT or API) | Yes | Yes, Apache-2.0 | Plan or API key |
| [Copilot CLI](/guides/github-copilot-cli-first-steps/) | Terminal | GitHub models + bring-your-own | Yes | No | Copilot plan |
| [Cursor](/guides/cursor-first-steps/) | IDE (AI editor) | Many (Anthropic, OpenAI, Google, xAI) | Yes | No | Plan or API key |
| [OpenCode](/guides/opencode-first-steps/) | Terminal | Model-agnostic (75+ providers) | Yes | Yes | Free app, bring your own key |
| [Windsurf](/guides/windsurf-first-steps/) | IDE (now Devin Desktop) | Multiple models | Yes | No | Plan |

Every tool here speaks [MCP](/glossary/#mcp), so the real split is terminal versus editor and how tied you are to one provider.

## 2. Terminal agents vs IDE agents

Terminal agents (Claude Code, Codex CLI, Copilot CLI, OpenCode) run in your shell: they grep, run tests, read the output and loop, staying editor-agnostic. IDE agents (Cursor, Windsurf) put the model inside the editing surface with tab completions and inline edits. Claude Code blurs the line by shipping IDE, desktop and web surfaces too; see [Claude Code vs Cursor](/guides/claude-code-vs-cursor/).

## 3. Model lock-in and open source

Codex CLI is tied to OpenAI, Claude Code to Anthropic (with third-party providers in the CLI), Gemini CLI to Google. Copilot CLI defaults to GitHub-hosted models but accepts an OpenAI-compatible, Azure or Anthropic endpoint. OpenCode and [Aider](/guides/aider-first-steps/) are model-agnostic and open source; Cursor mixes providers but is closed. To choose a model, see [pick an AI model](/guides/pick-an-ai-model/).

## 4. Current churn to know

Two things moved in 2026. Windsurf was renamed Devin Desktop by Cognition. And Google moved unpaid [Gemini CLI](/guides/gemini-cli-first-steps/) users to Antigravity CLI, per its [GitHub repo](https://github.com/google-gemini/gemini-cli).

## 5. Pick one and start

Read the matching first-steps guide: [Codex CLI](/guides/codex-cli-first-steps/), [Copilot CLI](/guides/github-copilot-cli-first-steps/), [Cursor](/guides/cursor-first-steps/) or [OpenCode](/guides/opencode-first-steps/).

## Verify it worked

- **`windsurf: command not found`** The editor is now Devin Desktop; relaunch the renamed app or reinstall it from Cognition.
- **Gemini CLI feels outdated on the free tier** Unpaid users were moved to Antigravity CLI; switch to it or add a paid Gemini API key.
- **Copilot CLI has no source to fork** It is not open source; use Codex CLI or OpenCode if you need an auditable agent.

Source: [Claude Code overview](https://code.claude.com/docs/en/overview).
