Source code analysis of cline/cline (extension v3.89.2, cli-v3.0.24, SDK packages v0.0.47). Orthogonal component: a detached multi-client Cline Hub daemon — one shared agent session brokered across IDE, CLI, and browser clients via an embeddable layered SDK. Compared against Claude Code, Cursor, Windsurf, Aider, Continue — the SWE agents.
@cline/{shared,llms,agents,core,sdk}) with three host apps (apps/vscode, apps/cli, apps/cline-hub) — VS Code is just one consumer of the engine. The orthogonal piece is the detached Cline Hub daemon: a singleton that brokers one live agent session multiple clients (VS Code, CLI, browser dashboard) attach to and detach from without stopping the authority runtime (commits fad8271f, 6138bdfe; sdk/ARCHITECTURE.md). Native integration with 30+ tools (file ops, terminal, Puppeteer browser, MCP), streaming diff view, and 40+ LLM providers. Plan/Act is now a routine tool, not the differentiator. Open source (Apache 2.0), $32M raised, 4M+ installs. Where Claude Code co-optimizes model and agent, Cline treats models as interchangeable and invests in the integration layer — and now in shared multi-client session brokering.
Layered embeddable SDK (@cline/sdk → core → agents → llms → shared) with three host apps consuming it: apps/vscode (sidebar panel, diff view, task history), apps/cli (OpenTUI), and apps/cline-hub (the daemon + browser dashboard). The old flat extension src/ was extracted into this engine; communication still uses protobuf-defined message types for type safety across hosts. This multi-host pattern is uncommon — Claude Code is CLI-only, Aider is CLI-only, Cursor/Windsurf are IDE-only — but Cline goes further: a single live session is shared across all three hosts at once via the Hub, not just reachable from each.
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).
The old flat VS Code extension src/ was extracted into a layered embeddable SDK (@cline/sdk, @cline/core, @cline/agents, @cline/llms, @cline/shared, packages v0.0.47) plus three host apps (apps/vscode, apps/cli, apps/cline-hub). The README now reads "open source coding agent in your IDE and terminal" — VS Code is one consumer of the engine, not the engine (sdk/ARCHITECTURE.md; git ls-tree origin/main).
Orthogonal component — the detached Cline Hub: a daemon that brokers shared multi-client sessions. Multiple clients (VS Code, CLI, browser dashboard) attach to and detach from the same live session without stopping the authority runtime. A production singleton is enforced (commit 6138bdfe); teammate/subagent sessions run under a hub-owned RuntimeHost, hidden from the primary client and tracked with separate aggregate cost accounting (commits fad8271f "Cline Hub web app", f84893b8 "hide teammate sessions", ab2a791e "Separate aggregate team usage"; sdk/ARCHITECTURE.md Hub-Backed Runtime). Plan/Act mode switching is now a routine tool call, not the differentiating axis.
Isolation boundary: the in-process extension had effectively none. The Hub adds a real auth/network line. Each daemon mints a cryptographically-random per-process auth token, stored in an owner-only-permissioned discovery record, with constant-time validation before any /hub WebSocket upgrade or /shutdown is accepted; tokens travel via the Sec-WebSocket-Protocol header / Authorization: Bearer, never in URLs (commit f597bd03 "Secure local hub daemon with discovery auth token SEC-68"). The browser dashboard's LAN/tunnel exposure is gated by a shared ROOM_SECRET — it refuses to bind 0.0.0.0 without one (apps/cline-hub/README.md). Tool execution is still container-level at most, but session access is now token-gated.
Multi-tenancy trade-offs: the hub-owned RuntimeHost runs teammate and subagent sessions with separated aggregate cost tracking, while clients attach/detach from the shared session. A remote-config managed runtime fetches a normalized RemoteConfigBundle and materializes managed rules/workflows/skills into workspace-local .cline/<plugin>/, deriving OpenTelemetry config and session-blob upload metadata (commit a91e9f1c "promote remote-config primitives from enterprise"; sdk/ARCHITECTURE.md Remote-Config Managed Runtime). Cline Pass was added with OAuth centralized into the SDK (commits 2a54e2a7, 0c027d27, a2793884).
First-class CLI & telemetry: tags cli-v3.0.0 through cli-v3.0.24 ship an OpenTUI terminal app whose interactive backendMode: "auto" reuses an existing hub or falls back to a local runtime, plus a global auto-update setting (commit 797ea1f6). The task.completed telemetry signal is now anchored to a successful submit_and_exit tool call (the SDK analog of attempt_completion) rather than session shutdown, with a fallback emission on shutdown (sdk/ARCHITECTURE.md Local In-Process Runtime).
| 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 + browser (shared Hub session) | 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.
Every other agent here binds a session to one client — Claude Code to its terminal, Cursor/Windsurf to their IDE process. Cline's detached Hub daemon brokers one live agent session that VS Code, the OpenTUI CLI, and a browser dashboard all attach to and detach from without stopping the authority runtime. A production singleton is enforced (commit 6138bdfe); teammate/subagent sessions run under a hub-owned RuntimeHost with separate cost accounting. The boundary is real: a per-process random token in an owner-only discovery file, constant-time-validated on every /hub WS upgrade, never in URLs (commit f597bd03, SEC-68). Plan/Act dual-model routing — once the headline — is now just a routine tool call under this engine.
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).