← hub

Cline — Distilled

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.

TL;DR
Cline is a VSCode extension (+ CLI) that turns the IDE into an agentic workspace. Native integration with 30+ tools (file ops, terminal, browser automation via Puppeteer, MCP protocol), streaming diff view for live code changes, and 40+ LLM providers via OpenRouter + native APIs. Approval flow gates dangerous operations (writes, commands, browser actions). Shadow-git checkpoints for IDE-native undo. MCP marketplace for 1-click server installs. Dual-model Plan/Act routing. Open source (Apache 2.0), $32M raised, 4M+ installs. Where Claude Code co-optimizes model and agent (prompt caching, extended thinking, sandbox), Cline treats models as interchangeable and invests in the integration layer.

Origin

Jul 2024
Saoud Rizwan enters an Anthropic hackathon, builds "Claude-Dev" to explore agentic coding with Claude 3.5 Sonnet. Doesn't win. Goes viral on GitHub anyway.
Late 2024
Renamed Cline (CLI + N + Editor). Rapid growth on VS Code Marketplace. Millions of installs.
Mid 2025
$5M seed (Pace Capital, 1984 Ventures), then $27M Series A (Emergence Capital). Angels: Jared Friedman (YC), Logan Kilpatrick (ex-OpenAI), Eric Simons (Bolt), Addy Osmani (Google Chrome).
Now
4M+ installs. 48k GitHub stars. Enterprise adoption (Samsung, SAP). CLI mode via React Ink. JetBrains WIP.

Architecture

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).

30+ tools in 6 categories

CategoryToolsNotable
File (8)read, write, patch, replace, list, search, AST symbols, new_ruleTree-sitter symbol extraction. Ripgrep search. Streaming diff view in IDE.
Terminal (1)execute_commandAuto-detects long-running commands (npm install, pytest, docker build). 30s/300s timeouts. YOLO auto-approve. Persistent task history.
Browser (1)browser_actionPuppeteer: launch, navigate, click, type, scroll, screenshot, screenshot-by-selector. Remote Chrome via CDP WebSocket. Unique among SWE agents.
Web (2)web_fetch, web_searchHTML-to-markdown. Domain filtering.
MCP (3)use_mcp_tool, access_mcp_resource, load_mcp_documentationStdio + 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_bugUp to 5 parallel read-only subagents. Double-check validation on completion. Approval flow gates dangerous operations.

Feature Comparison

yes   ~ partial   no. Cline data from source. Others from docs + reverse engineering.

FeatureClineClaude CodeCursorWindsurfAiderContinue
Core
Open source✓ Apache 2.0
IDEVS Code + CLICLICustom IDECustom IDECLIVS Code + JetBrains
Multi-provider46+AnthropicMultiMultiMultiMulti
Model-specific prompts8 variants~~
Cost trackingper-request
File & Code
Diff strategyUnified patch + replaceSearch/replaceCustom diffCustom diffWhole/diff/udiffSearch/replace
AST / tree-sittersymbolsrepo map
Ripgrep search
Terminal & Execution
Shell commands~
Sandbox / isolationDocker + seatbelt
Long-running detectionauto-detecttimeout
Browser & Web
Browser automationPuppeteer + CDP
Remote browserWebSocket CDP
Web fetch / searchbothbothfetch
Context & Memory
Context compressioncondensemiddle-out~
@-mentions7 typesfiles
Persistent memory/memorynotepad~
Custom rules.clinerules + .cursorrules + .windsurfrulesCLAUDE.md.cursorrules.windsurfrules.aider*.continue*
Workflow & Safety
Checkpoints / undoshadow-git~git-based
Plan / Act modesdual-modelplan modeCascade
Granular auto-approve7 categories~~~
Hooks (pre/post tool)7 types
Extensibility
MCP supportfull + marketplacefull clientplugin
Subagents5 parallelTask tool
Git worktreesUIisolation
Skills / workflows
Inline completions
Codebase indexing

What's Actually Different

Not a feature list. These are the design decisions that diverge from everything else analyzed in this hub.

UNIQUE Shadow-Git Checkpoints

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.

UNIQUE Plan/Act Dual-Model

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.

UNIQUE MCP Marketplace & Integration

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.

RARE Browser Automation with Remote CDP

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.

SURPRISING 7-Hook Lifecycle

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.

SURPRISING Subagents: Read-Only by Design

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.

What's Missing

vs Claude Code

vs Cursor / Windsurf

vs Aider

The tradeoff

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).