Open-source coding agents: opencode vs codex vs pi vs gemini-cli vs OpenHands vs cline vs openinterpreter vs goose vs aider vs Codewhale vs continue vs DeepSeek-Reasonix vs open-lovable vs qwen-code vs bolt.diy vs PI-Desktop vs vibesdk
Terminal, IDE and desktop agents that read a codebase, edit files and run commands — how they gather context, apply edits and stay safe. This page puts every verdict for the category on one page. Each question links to the full per-project answers and their code citations.
At a glance
| Question | opencode | codex | pi | gemini-cli | OpenHands | cline | openinterpreter | goose | aider | Codewhale | continue | DeepSeek-Reasonix | open-lovable | qwen-code | bolt.diy | PI-Desktop | vibesdk |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| How is the agent loop implemented? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
| How is repository context gathered and kept within the context window? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
| How are code edits applied? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
| How are shell commands and file writes kept safe? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
| Which models are supported and how are they called? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
| How can it be extended and customised? | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
● answered from code · — not applicable (the project does not do this) · ? insufficient evidence
How is the agent loop implemented?
For long unattended runs, Codex has the most mature turn engine, and Aider suits approving every step. OpenHands is different: at this commit the repository is a control plane, and the loop runs elsewhere.
Human-driven. Aider parses edit blocks from plain text in Coder.run_one(). Only reflections (a failed SEARCH block, lint errors) loop back, at most three per message.
One tool-calling loop.
- Codex:
run_turnover the Responses API. Stop hooks can veto a stop. - Open Interpreter: a Codex fork that runs each turn through an emulated harness (Claude Code, Qwen Code…).
- Cline: ends on no tool calls, a terminal tool such as
submit_and_exit, ormaxIterations. - Codewhale: one
run_turn. A guard test fails if a second loop is added. - Qwen Code and Gemini CLI:
MAX_TURNS = 100, and the front ends, not core, run the tools. Gemini CLI adds a model call (checkNextSpeaker) to decide whether to continue. - OpenCode: reloads history from SQLite every step.
taskchild sessions nest one level. - PI-Desktop: every tool call crosses into a Rust host. All tools except
Taskrun sequentially. - Pi: a generic loop with steering and follow-up queues, parallel tools, no turn cap and, by design, no sub-agents.
- goose: the default loop stops at
GOOSE_MAX_TURNS(1000). An ordered state-machine pipeline is opt-in. - Continue: in the IDE, recursive Redux thunks in the GUI with no depth cap outside tests. The
cnCLI has a separate loop. - DeepSeek-Reasonix: the only optional planner/executor split, with the plan returned through
submit_plan.
Delegated. OpenHands sends max_iterations (500) and stuck_detection to the Python Agent Server, or hands the work to an ACP agent such as Claude Code. Its planner is read-only because its tool list holds only glob, grep and a PLAN.md editor.
App-builder pipelines.
- VibeSDK: the default Think engine is a model-and-tool loop with bash disabled.
- bolt.diy: one
streamTextcall per request, plus up to two continuation segments. - Open Lovable: one streamed completion parsed for
<file>tags. Truncation recovery is off by default.
Pick: Aider for step-by-step pair programming. Pick: Codex, Codewhale or Cline for unattended work, DeepSeek-Reasonix for plan-then-execute, Pi for a loop you can rewire. Pick: VibeSDK for an app builder that iterates on its own deploy errors.
How is repository context gathered and kept within the context window?
Continue is the only coding agent with real retrieval, a hybrid of SQLite FTS5 and LanceDB embeddings. Aider builds the cheapest global view, a ranked repo map. The rest search on demand and differ in how they compact.
Precomputed indexes.
- Aider: personalised PageRank over tree-sitter definitions, in 1/8 of the input window clamped to 1K–4K tokens.
- Continue: full-text, snippet and vector indexes with optional reranking. IDE compaction is manual; the
cnCLI auto-compacts at 80%.
On-demand tools plus compaction.
- Cline: caps tool results at 8,000 characters and compacts at 90% of the window down to 70%.
- Gemini CLI: compresses at 50%, keeps the newest 30%, then makes a second call in which the model critiques its own
<state_snapshot>. - Qwen Code: clears old tool outputs and runs background auto-memory under
~/.qwen/memories/. - Codewhale: prunes old tool output before any LLM summary, keeping the last user round verbatim.
- DeepSeek-Reasonix: tree-sitter outlines. At 85%, a digest of at most 16K tokens keeps the prompt prefix cache-stable.
- OpenCode: prunes tool outputs outside the last 40K tokens, then hands off to a
compactionagent. - goose: summarises at 80% and hides old messages from the agent, not from the user.
- Pi: summarises at the window minus 16,384 tokens, keeping the last 20,000. Old entries stay in a branchable JSONL tree.
- PI-Desktop: a model-written summary; it throws rather than send an oversized request.
- Codex: no read or search tools. The model reads through sandboxed shell commands.
- Open Interpreter: Codex's compaction, keeping up to 20,000 tokens of recent user messages.
- OpenHands: a server-side condenser (240 events by default) emits
CondensationEvents. That code is not in this repository.
Per-request selection (app builders).
- bolt.diy: two extra LLM calls per request, a chat summary and a file selection. The five-file limit is a prompt instruction, not code.
- Open Lovable: a search plan drives a local grep. Context files are cut to 2,000 characters.
- VibeSDK: Think trims history but keeps tool pairs around
deploy_spaceandcommit.
Pick: Continue for semantic search over a large codebase, Aider for a cheap global map. Pick: DeepSeek-Reasonix or Codewhale for long sessions where prompt-cache hits drive cost. Pick: bolt.diy for context chosen per request.
How are code edits applied?
Aider makes one git commit per edit, and Continue shows each edit as an accept/reject diff in the editor. Gemini CLI, OpenCode and Codewhale forgive the most model mistakes. The app builders mostly rewrite whole files.
Edit blocks parsed from text. Aider: SEARCH/REPLACE with exact matching (the fuzzy matcher is disabled in code), a lint after each edit, and /undo for its own commits.
Exact search/replace tools.
- Cline: a unique match is required; GPT/Codex models get
apply_patch. Git checkpoints live under private refs. - Qwen Code: refuses an edit unless the file was read this session and is unchanged on disk.
- DeepSeek-Reasonix: atomic
multi_edit, and a per-turn rewind store that does not cover bash. - goose:
editneeds exactly one match, with no fuzzy fallback, no multi-edit and no undo. - OpenHands: wire types show a server-side
FileEditorActionwithstr_replaceandundo_edit, implemented outside this repository.
Forgiving matchers.
- Gemini CLI: exact, whitespace-flexible, token regex, then Levenshtein. If all fail, a model call repairs the search string.
- OpenCode: nine fallback replacers, LSP diagnostics after each write, snapshots in a separate git directory.
- Codewhale: exact, indentation- and punctuation-tolerant matching with an
expected_hashguard. A side git repository backs/restore N. - Continue: exact, trimmed, case-insensitive, then whitespace-ignored. No git checkpoints.
- Pi: an
editsarray matched against the original file, overlaps rejected, a narrow quote/dash/whitespace fallback, line endings and BOM preserved. No git.
Patch grammars and anchors.
- Codex: its own
*** Begin Patchgrammar, no lint step. The editor found git-snapshotundoremoved at this commit (a no-op flag). - Open Interpreter:
apply_patchnatively, Claude-styleEditaliases in emulated harnesses. - PI-Desktop: line-range ops guarded by a 4-hex file tag. A stale tag fails the edit.
Whole files (app builders).
- bolt.diy: full files in
<boltAction>tags.saveFileHistoryhas no callers, so there is no file history. - Open Lovable: full
<file>blocks.build-validator.tsis never called. - VibeSDK: Think's exact
editon a git-backed workspace, with model-chosencommitrestore points.
Pick: Aider for every change as a reviewable commit, Continue for diff review inside the IDE. Pick: Gemini CLI, OpenCode or Codewhale for weaker models that slip on whitespace. Pick: VibeSDK for an app builder with real restore points.
How are shell commands and file writes kept safe?
Codex, and Open Interpreter through its engine, sandbox every shell command on macOS, Linux and Windows. Gemini CLI has the most detailed policy engine, but its sandbox is opt-in. Out of the box, Pi, goose and a local OpenHands workspace run commands on the host without asking.
OS sandbox by default.
- Codex: Seatbelt, bubblewrap plus seccomp, or a restricted token, with
on-requestapproval by default. - DeepSeek-Reasonix: Seatbelt or bubblewrap, and no bash at all where neither exists (Windows). An
Askrule allows when no approver is attached.
Sandbox available, but opt-in or partial.
- Gemini CLI: tiered TOML rules (admin beats user); plan mode is a catch-all deny. Bubblewrap or Seatbelt runs only when
sandbox.enabledis set. - Qwen Code: bwrap or Landlock per command, Docker or Podman for the whole CLI.
automode adds a fail-closed LLM classifier. - Codewhale: Seatbelt on macOS, opt-in bubblewrap on Linux, nothing on Windows.
Approval or classifiers, no OS sandbox.
- Aider: shell prompts need an explicit yes even with
--yes-always. - Continue: a
shell-quoteclassifier keeps the strictest verdict across pipe segments, but headlesscn -pallowsBashwithout asking. - goose: five inspectors (pattern, egress, optional LLM adversary, permission, repetition), yet the default
Automode approves everything. - Cline: the CLI auto-approves every tool by default.
- OpenCode: the default ruleset is
"*": "allow". - PI-Desktop: a Rust host enforces risk tiers, but bash runs as you.
Nothing by default.
- Pi: no approvals or sandbox, by design. A pluggable
Operationsobject can route tools into a container or micro-VM. - OpenHands: confirmation is off (
NeverConfirm). Docker isolation depends on how the server was started, and nothing here restricts the network.
Isolated by architecture (app builders).
- bolt.diy: code runs in a WebContainer in the browser tab.
/api/chathas no rate limiting. - Open Lovable: an E2B or Vercel sandbox with no approvals. Creating a sandbox kills every other one.
- VibeSDK: Think has no shell (
workspaceBash = false), and each app gets its own Durable Objects.
Pick: Codex for kernel-level isolation on all three desktop platforms.
Pick: DeepSeek-Reasonix, Qwen Code or Gemini CLI (with --sandbox) for a real shell jail.
Pick: bolt.diy if generated code must never leave the user's browser.
Which models are supported and how are they called?
Aider, Continue and goose still work when a model cannot call tools natively, so they suit small and local models best. Codex and Gemini CLI are the narrowest. Among the app builders, real model choice is thinner than the docs suggest.
Text formats or a fallback for any model.
- Aider: LiteLLM, with 357
model-settings.ymlentries tuning the edit format per model. - Continue: about 65 provider modules.
toolSupport.tspicks native tools or a system-prompt codeblock fallback; models get roles (chat, apply, autocomplete, embed). - goose: native providers plus 48 declarative OpenAI-compatible definitions. A toolshim lets an interpreter model extract tool calls, and ACP providers wrap Claude or Codex as if they were models.
Native tool calling over broad gateways.
- Cline: its own
@cline/llmsgateway with 211 generated provider IDs. - OpenCode: the models.dev catalog plus AI SDK packages, with per-family system prompts.
- Codewhale: about 50 provider kinds.
model = "auto"can call a hosted third-party router. - Qwen Code: five adapters, all translated into
@google/genaishapes. - Pi: its own
pi-ailayer with about 20 wire APIs and a generated catalog.models.jsonpoints them at Ollama, vLLM or LM Studio. - PI-Desktop: seven wire styles through pi-ai, including the ChatGPT/Codex subscription endpoint.
- DeepSeek-Reasonix: three provider kinds and per-vendor price tables.
- Open Interpreter: a harness per provider and model. Most harnesses need Chat Completions.
- OpenHands: LiteLLM for its own agent (default
openai/gpt-5.6-sol), or an ACP agent such as Claude Code, Codex or Gemini CLI.
One vendor or one protocol.
- Codex: only the OpenAI Responses API. Built-in providers are OpenAI, Bedrock, Ollama and LM Studio.
- Gemini CLI: Gemini only, through
@google/genai. A router can switch between Pro and Flash; local Gemma only classifies for routing.
App builders.
- bolt.diy: 22 provider classes, but only OpenRouter, Anthropic, OpenAI and Google are registered; Ollama needs a source edit.
- Open Lovable: four providers, no tool calling, one prompt for every model.
- VibeSDK: Think is hard-wired to a Gemini Flash model through AI Gateway.
Pick: Aider for local or weak models, Continue if one config should also drive autocomplete. Pick: OpenCode, Cline, goose or Codewhale for the widest choice of providers. Pick: Codex on OpenAI, Gemini CLI on Gemini.
How can it be extended and customised?
Codex, Qwen Code, Gemini CLI and Cline have the fullest built-in surfaces. Pi and goose go furthest in building the agent itself from extensions. Aider and Open Lovable have no MCP client.
Full stack: MCP, hooks, plugins, skills and SDKs.
- Codex: twelve hook events; skills and plugins as separate mechanisms.
codex app-serverexposes the full JSON-RPC protocol. - Open Interpreter: the same surface, plus new harnesses.
- Qwen Code: one extension can ship MCP servers, skills, sub-agents, hooks and workflows. SDKs for TypeScript, Python and Java.
- Gemini CLI: hooks can block calls or rewrite tool arguments. Extensions bundle MCP servers, commands, skills and TOML policies; an ACP server lets editors drive it.
- Cline: JS/TS plugins in a subprocess sandbox.
@cline/coreembeds the agent. - OpenCode: npm plugins and drop-in
tool/files. Every UI is a client of one server API.
Extension-first cores.
- Pi: in-process TypeScript extensions register tools, providers, commands and UI, and can block any tool call. An MCP server can be set to
codemode, callable only from QuickJS scripts. - goose: even the built-in
developertools are an extension, dispatched like MCP servers. Plugin hooks (onlyPreToolUsecan deny) and YAML recipes.
Host-mediated extensions.
- DeepSeek-Reasonix: Extension Protocol v2 sidecars can intercept tool calls.
- PI-Desktop:
.piplugtools pass the same Rust permission gate as built-ins. - Codewhale: project hooks run only after
/hooks approve <digest>for those exact bytes.
Configuration-driven.
- Continue: MCP, rules (including
AGENTS.md) and per-modeltoolOverridesinconfig.yaml, plus 30+ context providers andcontinue-sdk. - Aider:
--lint-cmd,--test-cmdand the PythonCoder.create()API, but no hooks. - OpenHands: skills, MCP,
.openhands/hooks.jsonand any ACP agent as the backend. Agent behaviour itself is extended in the Python SDK, not here.
App builders.
- bolt.diy: MCP over stdio, SSE or HTTP, with per-call approval.
- VibeSDK: a TypeScript client SDK and four
SKILL.mdskills. The MCP server list ships empty, and thecli/tuiscripts point to a missing directory. - Open Lovable: nothing beyond the sandbox-provider class.
Pick: Codex, Qwen Code or Gemini CLI for a hook-and-plugin ecosystem with SDKs. Pick: Pi or goose to add features as extensions, Cline or OpenCode to embed an agent. Pick: bolt.diy for an app builder you can wire to MCP tools.
The projects
- anomalyco/opencode: Client/server TypeScript coding agent on Bun and Effect: any AI SDK provider, permission-ruled tools, TUI, desktop and SDK clients.
- openai/codex: OpenAI's Rust terminal coding agent: a Responses-API turn loop with apply_patch edits and OS-level sandboxes for every shell command.
- earendil-works/pi: Minimal TypeScript coding agent built on its own multi-provider LLM API and agent loop, extended through in-process TypeScript extensions.
- google-gemini/gemini-cli: Google's Gemini-only terminal coding agent: a streamed tool loop gated by a tiered TOML policy engine and opt-in OS sandboxes.
- OpenHands/OpenHands: Agent Canvas: a React control plane that configures and streams OpenHands or ACP agents running in a separate Python Agent Server.
- cline/cline: TypeScript agent SDK behind a CLI, VS Code and desktop app: tool-calling loop, per-tool approval policies, git checkpoints, MCP and plugins.
- openinterpreter/openinterpreter: Rust fork of OpenAI Codex that re-creates other agents' prompts, tools and wire formats ("harnesses") to get more out of open models.
- aaif-goose/goose: Rust agent with a CLI and Electron desktop app, built on MCP extensions, many LLM providers and summary-based context compaction.
- Aider-AI/aider: Python terminal pair-programmer: plain-text SEARCH/REPLACE edits, a tree-sitter repo map ranked by PageRank, and git auto-commits.
- codewhale-hq/Codewhale: Rust terminal coding agent with ~50 provider kinds, Plan/Act/Operate modes, approval postures, OS sandboxing and sub-agents.
- continuedev/continue: TypeScript coding assistant for VS Code, JetBrains and a terminal CLI, with chat, plan and agent modes over a shared core.
- esengine/DeepSeek-Reasonix: Single-binary Go coding agent built around prefix-cache-stable prompts, an optional planner/executor split, OS sandboxing and per-turn rewind.
- firecrawl/open-lovable: Next.js prompt-to-app builder that clones sites via Firecrawl into a React/Vite app previewed in a cloud sandbox.
- QwenLM/qwen-code: Terminal coding agent forked from Gemini CLI, with a multi-provider model layer, bwrap/Landlock shell sandboxing and an LLM auto-approver.
- stackblitz-labs/bolt.diy: Open-source bolt.new: a Remix prompt-to-app builder that streams LLM file and shell actions into an in-browser WebContainer.
- vastsa/PI-Desktop: Electron desktop agent running the pi engine in a Node sidecar, with every tool call gated and executed by a Rust host-core.
- cloudflare/vibesdk: Self-hostable prompt-to-app platform on Cloudflare Workers; a Durable Object agent writes, deploys and previews whole web apps.