Source code analysis of cline/cline (884 TS files). Compared against Claude Code, Cursor, Windsurf, Aider, Continue — the SWE agents. Different species from the social agents and assistants covered elsewhere in this hub.
VSCode extension with native IDE integration — sidebar panel, diff view, task history. Three execution hosts (VS Code, CLI via React Ink, JetBrains WIP) behind a shared abstraction in src/hosts/. Communication via 22 protobuf-defined message types for type safety across extension host, webview, and CLI. This multi-host pattern is uncommon: Claude Code is CLI-only, Aider is CLI-only, Cursor/Windsurf are IDE-only. Cline targets both IDE and terminal from a single codebase.
Streaming diff view: real-time visualization of code changes as the model streams tool calls. DiffViewProvider (340 LOC) renders unified diffs in the editor pane before approval. Click to accept/reject individual hunks. Auto-scrolls to changed regions. This is unique among open-source agents — Aider shows diffs in terminal, Continue has inline suggestions, but Cline is the only one streaming structured edits directly into the IDE diff UI.
Prompt assembly follows modular composition: components (rules, capabilities, tool specs) assembled per-request. 8 model-family variants: next-gen (Claude 4), gpt-5, gemini-3, xs (local 7B-13B), hermes, glm. The xs variant strips tools and simplifies instructions — acknowledging that a 7B model can't handle the same prompt as Opus. Aider does model-specific editing formats (whole file vs diff vs udiff), but not model-specific system prompts. No other SWE agent does this.
40+ LLM providers via OpenRouter, OpenAI, Anthropic, AWS Bedrock, Google AI, Azure, Ollama, LM Studio, and custom endpoints. Dual-model Plan/Act routing allows different providers per mode: o3 for planning, Claude Sonnet for implementation, GPT-5 for analysis, DeepSeek for code. Model Context Protocol (MCP) support with stdio, SSE, and StreamableHTTP transports. OAuth via McpOAuthManager. Per-server auto-approve. Integrated marketplace for 1-click MCP server installs (auto-handles npm/pip deps, builds, config, lifecycle).
| Category | Tools | Notable |
|---|---|---|
| File (8) | read, write, patch, replace, list, search, AST symbols, new_rule | Tree-sitter symbol extraction. Ripgrep search. Streaming diff view in IDE. |
| Terminal (1) | execute_command | Auto-detects long-running commands (npm install, pytest, docker build). 30s/300s timeouts. YOLO auto-approve. Persistent task history. |
| Browser (1) | browser_action | Puppeteer: launch, navigate, click, type, scroll, screenshot, screenshot-by-selector. Remote Chrome via CDP WebSocket. Unique among SWE agents. |
| Web (2) | web_fetch, web_search | HTML-to-markdown. Domain filtering. |
| MCP (3) | use_mcp_tool, access_mcp_resource, load_mcp_documentation | Stdio + SSE + StreamableHTTP transports. OAuth. Per-server auto-approve. Integrated marketplace for 1-click installs. |
| Workflow (9) | ask_followup, attempt_completion, subagents, new_task, use_skill, plan/act respond, condense, summarize, explain, report_bug | Up to 5 parallel read-only subagents. Double-check validation on completion. Approval flow gates dangerous operations. |
✓ yes ~ partial — no. Cline data from source. Others from docs + reverse engineering.
| Feature | Cline | Claude Code | Cursor | Windsurf | Aider | Continue |
|---|---|---|---|---|---|---|
| Core | ||||||
| Open source | ✓ Apache 2.0 | — | — | — | ✓ | ✓ |
| IDE | VS Code + CLI | CLI | Custom IDE | Custom IDE | CLI | VS Code + JetBrains |
| Multi-provider | 46+ | Anthropic | Multi | Multi | Multi | Multi |
| Model-specific prompts | 8 variants | — | ~ | ~ | ✓ | — |
| Cost tracking | per-request | ✓ | — | — | ✓ | — |
| File & Code | ||||||
| Diff strategy | Unified patch + replace | Search/replace | Custom diff | Custom diff | Whole/diff/udiff | Search/replace |
| AST / tree-sitter | symbols | — | ✓ | ✓ | repo map | ✓ |
| Ripgrep search | ✓ | ✓ | ✓ | ✓ | — | ✓ |
| Terminal & Execution | ||||||
| Shell commands | ✓ | ✓ | ✓ | ✓ | ✓ | ~ |
| Sandbox / isolation | — | Docker + seatbelt | — | — | — | — |
| Long-running detection | auto-detect | timeout | — | — | — | — |
| Browser & Web | ||||||
| Browser automation | Puppeteer + CDP | — | — | — | — | — |
| Remote browser | WebSocket CDP | — | — | — | — | — |
| Web fetch / search | both | both | — | fetch | — | — |
| Context & Memory | ||||||
| Context compression | condense | middle-out | ✓ | ✓ | ✓ | ~ |
| @-mentions | 7 types | files | ✓ | ✓ | — | ✓ |
| Persistent memory | — | /memory | notepad | ~ | — | — |
| Custom rules | .clinerules + .cursorrules + .windsurfrules | CLAUDE.md | .cursorrules | .windsurfrules | .aider* | .continue* |
| Workflow & Safety | ||||||
| Checkpoints / undo | shadow-git | — | ✓ | ~ | git-based | — |
| Plan / Act modes | dual-model | plan mode | — | Cascade | — | — |
| Granular auto-approve | 7 categories | ✓ | ~ | ~ | ✓ | ~ |
| Hooks (pre/post tool) | 7 types | ✓ | — | — | — | — |
| Extensibility | ||||||
| MCP support | full + marketplace | full client | plugin | — | — | ✓ |
| Subagents | 5 parallel | Task tool | — | — | — | — |
| Git worktrees | UI | isolation | — | — | — | — |
| Skills / workflows | ✓ | ✓ | — | — | — | — |
| Inline completions | — | — | ✓ | ✓ | — | ✓ |
| Codebase indexing | — | — | ✓ | ✓ | — | ✓ |
Not a feature list. These are the design decisions that diverge from everything else analyzed in this hub.
Aider uses your project's git for undo (/undo = git reset). Cline does something stranger: a parallel git repo in ~/.cline/checkpoints/{task-id}/, completely isolated from project history. Every file-modifying tool call gets a commit. CheckpointTracker (512 LOC) temporarily renames nested .git dirs to prevent interference. The IDE sidebar shows checkpoint markers — click to diff, click to restore. This means you can recover even if the agent trashed your working tree, without polluting git log.
The coding page documents brainpro's model routing by task type (planning → Opus, coding → Sonnet). Cline takes this further: Plan mode (read-only tools) and Act mode (full access) can use entirely different providers and models. o3 for planning, Claude Sonnet for implementation. GPT-5 for analysis, DeepSeek for code. Conversation carries over. This is unique among coding agents — Claude Code's plan mode uses the same model, just restricts tool access.
Claude Code supports MCP but requires manual ~/.claude/claude_desktop_config.json editing. Cline ships an app store: browse catalog in the sidebar, 1-click install, auto-handles npm/pip deps, builds, config, server lifecycle. Three transports (stdio, SSE, StreamableHTTP). OAuth via McpOAuthManager. Per-server auto-approve. Model Context Protocol (MCP) is a first-class integration — 3 dedicated tools (use_mcp_tool, access_mcp_resource, load_mcp_documentation). This is the first coding agent treating MCP servers as a discoverable ecosystem rather than an expert configuration.
None of the other 5 agents in the comparison table have browser automation. Cline has full Puppeteer: click(x,y), type, scroll, screenshot-by-selector. The real surprise: remote Chrome via CDP WebSocket. Connect to Browserless.io, LambdaTest, or chrome --remote-debugging-port=9222. This means Cline can test web UIs during development, verify deployments, scrape docs — including on headless cloud servers.
Claude Code has PreToolUse/PostToolUse/Stop hooks declared in config files. Cline takes the same idea further: 7 lifecycle events (pretooluse, posttooluse, taskstart, taskcomplete, taskresume, taskcancel, userpromptsubmit). Pre-tool hooks can cancel tool calls or inject context. Stored in .clinerules/hooks/ as shell scripts — discoverable, versionable, shareable across teams. A plugin system built on the filesystem.
Claude Code's Task tool spawns subagents with 5 typed specializations (Bash, Explore, Plan, general-purpose) that can write to git worktrees. Cline's subagents are deliberately read-only: read, search, list, skills only. No writes, no commands, no browser, no MCP. The constraint is the feature — it's the context stripping pattern applied to multi-agent. Main agent's window stays clean. Up to 5 parallel. Different tradeoff: Claude Code gives subagents full power + isolation; Cline gives them no power + shared filesystem.
/memory. Tasks start fresh. .clinerules files partially compensate but aren't semantic memory — they're static instructions, not learned context./compact. Cline's condense exists but lacks the head/tail preservation strategy.list_code_definition_names is per-file only. On a 500-file project, Aider starts with structural context; Cline starts blind and navigates by search.Claude Code co-optimizes model and agent — prompt caching, extended thinking, sandbox, middle-out compression. It's a precision instrument that only works with Anthropic. Cline treats models as interchangeable and invests in what the integration layer can do: checkpoints, browser, MCP marketplace, dual-model routing. It's a platform that works with everything. The cost of that generality: no provider-specific optimizations, no sandbox, no memory. Cursor/Windsurf own inline completions (different product category). Aider owns repo-map (different context strategy).