A Coding Agent Is a Loop, and Half of What Gets Sold as One Has No Loop
A coding agent is a program that holds a model, a tool set, and a loop: it reads your repository, plans a change, edits files, runs commands, checks the result, and repeats until the task is done or it needs you. That loop is the whole category. Everything else — terminal UI, IDE panel, web dashboard, git integration — is packaging around it.
The category's edges are blurry in ways that cost people money. A code-completion engine (Copilot-style inline suggestions) is not an agent: it has no loop and takes no actions. A chat assistant that pastes diffs for you to apply is barely one. An orchestrator that schedules agents — Agent Orchestrator, OpenHands Agent Canvas, Herdr — is adjacent infrastructure, not the agent itself. And a "vibe-coding" app builder like the hosted tiers of Replit or Codex Web is an agent wearing a product costume. The distinction matters because the loop is where the money, the risk, and the failure modes live: every turn is model tokens plus tool executions against your real filesystem, and the discipline of the loop is what separates a useful colleague from an expensive random walk.
Three sub-species are worth separating before comparing tools. Terminal agents (Claude Code, Codex CLI, Gemini CLI, Aider, OpenCode) run in your shell and treat the terminal as the interface. IDE-embedded agents (Cline's VS Code and JetBrains extensions, Copilot Workspace-style flows) live where the diff is. Autonomous or self-hosted platforms (OpenHands, Agent Canvas) put the loop behind an API with containers, schedulers, and webhooks, so agents run when you are not watching. Most of the friction in this field comes from people buying one species and expecting another's behaviour.
The field consolidated around a shockingly standard architecture in about eighteen months, and understanding that architecture explains 90 percent of the differences between tools.
One Harness Skeleton Explains Ninety Percent of the Differences Between Tools
Every tool in this survey implements the same skeleton. The harness (the local client) maintains a conversation with a model, exposes tools — read files, write files, run shell commands, search — and enforces a permission policy between the model's intentions and your filesystem. The model proposes; the harness executes and feeds results back; the loop continues until the model declares completion or hits a limit. What differentiates products is where they add leverage around that skeleton: Aider adds a repository map so the model sees the whole codebase's structure without reading every file; Claude Code adds subagents, skills, and dynamic workflow orchestration; Cline adds human-in-the-loop approval checkpoints in the IDE; OpenHands moves the whole loop into a container behind an API.
flowchart TD
U["Developer intent"] --> H["Harness (local client)"]
H --> CTX["Context assembly<br/>repo map, files, history"]
CTX --> M["Model"]
M --> P["Proposed action: edit, command, question"]
P --> PERM{"Permission policy"}
PERM -->|"allowed"| T["Tool execution on filesystem"]
PERM -->|"needs approval"| HUMAN["Developer approves or edits"]
HUMAN --> T
T --> R["Result: output, tests, diffs"]
R --> CTX
P -->|"task complete"| GIT["Git commit / review"]
The second diagram is the version of this loop that runs when nobody is watching — the autonomous mode that all the serious tools grew in 2026, because the paying use case turned out to be delegation, not pair programming.
sequenceDiagram
participant Dev as Developer
participant H as Harness
participant M as Model
participant FS as Filesystem and shell
Dev->>H: Task description (issue, ticket, brief)
H->>M: Assembled context plus task
M->>H: Plan plus first actions
H->>FS: Apply edits, run tests
FS-->>H: Results and failures
H->>M: Tool results (compacted context)
M->>H: Next actions until done or blocked
alt needs human decision
H-->>Dev: Blocked state with question
Dev->>H: Answer or approval
H->>M: Loop resumes
else completes
H-->>Dev: Diff, commit, and summary for review
end
Eight Coding Agents, Eight Different Answers to Who Owns the Loop
The axes that actually separate these tools, compressed:
| Tool | Licence | Interface | Model access | Cost shape | Autonomy |
|---|---|---|---|---|---|
| Claude Code | Proprietary | Terminal, IDE, GitHub | Anthropic models | Subscription or metered | High (workflows, subagents) |
| Codex CLI | Apache-2.0 | Terminal, IDE, cloud | OpenAI models | ChatGPT plan or API key | High (cloud variant) |
| Gemini CLI | Apache-2.0 | Terminal | Gemini models | Free tier, then metered | Interactive-leaning |
| Aider | Apache-2.0 | Terminal + IDE watch | 100+ providers via LiteLLM, local too | Metered BYO key | Low by design |
| Cline | Apache-2.0 | VS Code, JetBrains, CLI | BYO key, multi-provider | Metered BYO key | Medium (Kanban parallel) |
| OpenHands Canvas | MIT | Web control center | Any LLM, BYO | Metered BYO key + hosting | Highest (scheduled automations) |
| OpenCode | MIT | Terminal TUI, desktop | Provider-neutral | Metered BYO key | Medium (build/plan split) |
| Goose | Apache-2.0 | Desktop, CLI, API | 15+ providers incl. local | Metered BYO key | Medium-generalist |
| Claude Code (Anthropic, proprietary). The category leader by installed momentum and the one others benchmark against. Its strengths are the loop's maturity: compaction for long sessions, subagents for parallel work, skills as packaged procedures, and — since v2.1.154 — dynamic workflows, where the model writes a JavaScript orchestration script that a runtime executes with deterministic replay semantics. Its data-usage documentation is unusually explicit about retention. The weaknesses: it is closed-source (the npm repo is a distribution and docs surface, not the product), Anthropic-model-centric, and its cost shape is subscription-or-metered with agentic loops burning through subscription limits fast. Position: the default choice if your team is already on Anthropic models and wants the most complete harness; a black box you accept because it works. |
Codex CLI (OpenAI, Apache-2.0 client). The open-source counterweight: the client is licensed Apache-2.0, installs via shell script, npm, or Homebrew, and authenticates either with a ChatGPT plan (Plus, Pro, Business, Edu, Enterprise) or an API key. It runs locally with a sandboxed execution model, and the same Codex brand spans CLI, IDE extension, and a cloud variant (Codex Web) — so OpenAI's pitch is one agent, three habitats. Position: the strongest option if you are on OpenAI models and want an inspectable client; the cloud variant is the one to watch for delegation workloads.
Gemini CLI (Google, Apache-2.0). The free-tier aggressor: 60 requests per minute and 1,000 requests per day free with a personal Google account, Gemini models with a 1M-token context window, weekly preview and stable release channels, and nightly builds if you like risk. Built-in Google Search grounding is a differentiator for research-flavored tasks. Position: the best zero-cost entry point in the field, and genuinely usable — with the caveat that free-tier rate limits shape it toward interactive sessions rather than long autonomous runs.
Aider (Apache-2.0, Python, BYO API key). The elder statesman: pair programming in the terminal, 6.8 million PyPI installs, roughly 15 billion tokens processed weekly by its users, a repository map that scales to large codebases, automatic git commits with sensible messages, and lint-and-test loops after every edit. Aider is deliberately not autonomous-first — it is a conversation with a very good edit-application engine. Position: the tool for people who want to stay in control, understand exactly what context the model sees (the repo map is inspectable), and pay per token across a hundred-plus providers via LiteLLM. Its watch mode (edit comments in your editor, Aider reacts) remains a workflow no other tool replicates cleanly.
Cline (Apache-2.0). The IDE-native option that grew up: a VS Code extension, a JetBrains plugin, a terminal CLI (npm i -g cline, interactive or headless for CI), and a Kanban product (npm i -g kanban) that runs many agents in parallel, each card getting its own git worktree with auto-commit and dependency chains. Human-in-the-loop approval for files, commands, and browser use is its design centre. Position: the best choice for developers who live in the IDE and want per-action approval; the Kanban worktree model is the cleanest multi-agent parallelism story in the field for teams that fear merge conflicts.
OpenHands (MIT, moving fast). Now shipping as Agent Canvas — a self-hosted developer control center that runs OpenHands' own agent, Claude Code, Codex, Gemini, or anything speaking the Agent Client Protocol (ACP), across local, Docker, VM, or cloud backends. Automations trigger on schedules or webhooks and integrate with Slack, GitHub, and Linear. Status: beta, and it behaves like one. Position: the most ambitious self-hosted platform — the tool for teams that want coding agents as always-on infrastructure rather than as an app — with the corresponding operational burden (Node 22.12+, Docker or bare-metal agent servers, security hardening documented as your job).
OpenCode (MIT). The community's provider-neutral terminal agent: a polished TUI, a desktop app in beta for all three platforms, and two built-in agents — build (full access) and plan (read-only, denies edits by default) — switchable with Tab. Position: the open-source alternative for people who want Claude Code's shape without the vendor tie, and the healthiest project governance in the indie cohort; the plan-mode-by-default design is the best safety default in the field.
Goose (Apache-2.0, Rust, Linux Foundation). Block's general-purpose agent, now under the Agentic AI Foundation — notable governance for a tool that started as a corporate internal project. Fifteen-plus model providers, seventy-plus MCP extensions, desktop app plus CLI plus embeddable API. Position: the generalist — it writes code but also does research, data analysis, and automation — and the strongest hedge if you believe agents will outgrow the IDE entirely.
Also on the field, briefly: Agent Orchestrator supervises up to 26 coding agents (Claude Code, Codex, Cursor, Aider, Goose, and more) from one desktop workspace with per-worker branches and worktrees; headroom compresses agent context by 15 to 20 percent for coding-agent traffic with reversible originals; Upstash Box sells per-active-hour containers with Claude Code or Codex built in; and NVIDIA SkillSpector scans skills for the prompt-injection and exfiltration patterns that this ecosystem's supply chain now carries. The surrounding infrastructure layer — orchestrators, compression, sandboxes, scanners — is consolidating faster than the agents themselves, which tells you where the operational pain is.
The Apache-2.0 Client War Ended Harness Lock-in Inside a Year
Three shifts altered procurement decisions inside a year. First, the Apache-2.0 client war: OpenAI open-sourced Codex CLI, Google shipped Gemini CLI under Apache-2.0 with a genuinely free tier, and OpenCode stayed MIT — so the "open client, closed model" split is now the default shape of the market, and client lock-in is dead. You choose a harness for its loop quality and a model for its capability, separately. Second, the free-tier invasion: Gemini CLI's 1,000 requests per day at zero cost reset price expectations for individual developers and forced every subscription-based tool to justify itself on loop quality rather than access. Third, the delegation turn: Claude Code's background workflows, Cline's Kanban worktrees, OpenHands' automations, and Agent Orchestrator's board all shipped forms of "agents run while you are away" within months of each other — the field accepted that pair programming was the free tier of the business and scheduled delegation was the product.
The Licence and Cost Map — What Actually Decides Adoption
Licences first, because they decide what you can do with the harness itself. Every open-source client in this survey is permissive: Aider, Codex CLI, Gemini CLI, Cline, Goose, and OpenHands-adjacent tooling under Apache-2.0; OpenCode under MIT. None carry copyleft obligations, so embedding them in commercial internal tooling is uncontested. The models behind them are the proprietary layer: Claude, GPT, and Gemini models are commercial API products regardless of client licences, and local-model support (Aider and Goose both reach Ollama and friends) is the only fully-private path, with a quality trade you must measure on your own codebase. Claude Code itself is the exception in the other direction — a proprietary client — which matters if you need to audit or modify the harness.
Cost shape splits into three regimes. Subscription: Claude Code rides Anthropic's Pro and Max plans; Codex rides ChatGPT Plus, Pro, Business, and Enterprise. Predictable monthly cost, real throttling on heavy agentic use, and the practical experience that a long autonomous run eats a week's allowance. Metered BYO-key: Aider, Cline, OpenCode, OpenHands, and Goose all run on your API keys across many providers — costs scale exactly with usage, cheap models are one config line away, and a runaway loop is a billing event rather than a quota wall. Free-tier: Gemini CLI's 1,000 daily requests, which is enough for interactive use and not enough for delegation. The hidden fourth cost is engineer time: sandboxes, permission policies, and worktree hygiene are real setup work — Box, Agent Canvas, and Herdr all exist because someone got tired of paying it ad hoc.
Data Sensitivity, Cost Shape, and Control Pick Your Agent Before Preference Gets a Vote
If data sensitivity dominates: self-host the loop (OpenHands in Docker with a scoped PROJECTS_PATH, or Aider/OpenCode/Goose against local models) and accept the quality cost after measuring it on your code; avoid cloud variants entirely. If cost predictability dominates: a subscription harness (Claude Code or Codex on existing plans) with metered BYO-key tools for overflow. If control and audit dominate: Aider — the repo map and diff-first workflow make the model's entire view inspectable — or Cline with approvals on every action. If team parallelism dominates: Cline Kanban or Agent Orchestrator, both built around worktrees to prevent merge collisions. If budget is zero: Gemini CLI, unapologetically. If you want to build products on agents rather than use them: OpenHands Agent Canvas or Goose's embeddable API, not a TUI.
Where It Breaks: Failure Modes and Their Triggers
Context compaction amnesia. Long agentic sessions exceed the window; the harness summarises; the summary drops the constraint that mattered. Trigger: tasks running past tens of minutes with heavy tool output. Symptom: the agent confidently violates a decision it made an hour ago. Mitigation: write constraints to a file (an AGENTS.md or plan file) rather than trusting conversation memory — every serious harness now supports this, and headroom-style compression with reversible originals is the infrastructure answer.
Edit application corruption. The model's diff format and the file's actual content disagree — stale line numbers, mismatched search blocks. Trigger: files changed since the agent last read them (by you, a formatter, or a second agent). Cline's per-file approval catches this; Aider's auto-commit gives you the undo; two agents on one working tree without worktrees is how working trees die.
Permission fatigue produces YOLO mode. Approval prompts arrive per file, per command; the human approves reflexively or disables approval entirely; the agent then deletes the wrong directory with the same confidence it applies to everything else. Trigger: high-friction prompts on trusted repos training the human to auto-approve. The fix is graduated permissions (Cline's per-tool settings, OpenCode's read-only plan agent, Claude Code's allowlists), not zero-friction everything.
Rate limits mid-quest. Free tiers (Gemini CLI's 1,000 daily requests) and subscription quotas both cut off an autonomous run at step thirty of forty. Trigger: delegation workloads on interactive-priced access. The failure is silent-ish: the harness errors, the half-finished work sits in the working tree. This is the single biggest reason delegation workloads end up on metered API keys despite the cost.
Merge collisions in parallel fleets. Running four agents on one branch — or even on one repo without worktrees — produces conflicts that cost more to resolve than the tasks saved. Trigger: parallel agents sharing a working tree. The field's answer is uniform now (Cline Kanban worktrees, Agent Orchestrator per-worker branches) but only if you actually isolate.
Sandbox escape by persuasion. The agent convinces itself — or is convinced by repository content, an issue text, or a tool output — that this once, running the destructive command is justified. Trigger: untrusted content entering the context (RAG, issues, web fetches) plus broad permissions. SkillSpector's 26-percent-vulnerability finding for skills, and its exfiltration and tool-poisoning categories, exist because the supply chain of instructions is now an attack surface. Sandboxes (containers, Box-style ephemeral environments, OpenHands' Docker option) are the structural answer; permission policies are the behavioural one; you want both.
Cost blowups on ambiguous tasks. An under-specified task sends the agent exploring — reading dozens of files, running speculative builds — for forty minutes before producing something unusable. Trigger: vague briefs plus autonomous mode plus a frontier model at output-token prices. The fix is unglamorous: bounded first passes with a cheap model, explicit scope in the task, and checkpoints (mainbranch's approved-checkpoint idea, generalized) so partial work is reviewable.
Open Questions the Field Has Not Answered
Whether open harnesses beat integrated ones long-term is genuinely unresolved: Codex CLI and Gemini CLI are open clients to closed models, Claude Code is a closed client to its own family, and the market is currently paying for loop quality over licence purity — no consensus exists on which wins when capability parity arrives. Whether sandboxed autonomy scales economically is open: per-task containers (Box, OpenHands) price cleanly but add cold starts, while local loops are fast but require trust. Whether the terminal survives as the interface for the next hundred million developers, or whether IDE and chat surfaces absorb the loop entirely, is being decided by people who have never used tmux. And the field has no accepted evaluations for agentic behaviour on real repositories — leaderboards measure bug-fix benchmarks, not the multi-hour, multi-file, human-coordinating work that people actually pay for. Until that exists, every tool's marketing and every benchmark is a proxy, and your own three-brief trial is worth more than any of them.
Resources
Primary repositories (all fetched for this dossier)
- Aider — README and repository — pair-programming agent, repo map, git integration, Apache-2.0
- OpenHands Agent Canvas — README and repository — self-hosted control center, ACP support, MIT
- Cline — README and repository — IDE and CLI agent, Kanban worktrees, Apache-2.0
- Gemini CLI — README and repository — free-tier Apache-2.0 terminal agent
- Codex CLI — README and repository — OpenAI's Apache-2.0 client
- OpenCode — README and licence — MIT terminal agent with build/plan modes
- Goose — README — Linux Foundation generalist agent, Apache-2.0
- Claude Code — README — proprietary terminal agent, data-usage documentation
- headroom — README — context compression layer with agent compatibility matrix
- NVIDIA SkillSpector — README — security scanner for agent skills
- Agent Orchestrator — README — multi-agent supervision workspace
- Upstash Box — README — per-active-hour agent sandboxes
