Coding Agents
Definition
A coding agent is a language model in a loop with tools for reading files, editing them, running shell commands and searching a repository. Given a task, it explores the code, makes changes, runs the tests or the build, reads the result and repeats until it judges the task done. Most ship as a command-line program with a terminal interface, so the same agent runs on a laptop, a remote host or inside an orchestrator. The loop itself is covered in Code Execution; what surrounds the model is Harness Engineering.
Components
The model is interchangeable in many agents. What separates them is the harness: which tools it exposes, how it asks permission, how it carries context between sessions and how other programs can observe it.
Plans, writes code and reads results. Some agents are tied to their maker's models; many let the user choose.
File read and edit, shell, code search, and often web fetch. The edit tool's format, whole files or targeted replacements, has a large effect on reliability.
Which tool calls need confirmation. Ranges from asking for every command to a bypass flag that asks for nothing.
Repository instructions the agent reads at start, such as AGENTS.md or CLAUDE.md, holding conventions, commands and constraints.
Saved conversations that can be resumed, so a task survives a closed terminal or a restart.
Lifecycle events (prompt submitted, tool about to run, turn finished) that let other programs observe or gate the agent.
MCP servers, skills and subagents that add tools or delegate work without changing the agent itself.
Agents
The terminal coding agents in current use, grouped by who makes them. Each card gives the command that starts the agent. Hooks marks agents with a lifecycle hook system that other programs can subscribe to; the rest can only be observed through the terminal.
From model labs
claudeclaudecodexgeminiagygrokmusevibekimiqwenmimozcodedsh-tuiFrom developer tool companies
copilotcursor-agentdevindroidampauggieacli rovodev runkiro-clitraeclicodebuddyqodercli, or qoderclicn in Chinacommand-codecodebufffreebuffcnclinekiloFrom open source projects and independents
aidergooseopencodeopencode2crushopenclaudeopenclawhermespiompprime-agentanteautohandjcodePermission Modes
By default an agent asks before it runs a shell command or writes outside its working directory. Every major agent also has a flag that turns the prompts off, which is what makes unattended and parallel runs possible. The flag removes the confirmation, not the access: the agent can still reach every file and network resource its process can.
| Flag | Agents |
|---|---|
--dangerously-skip-permissions | Claude Code |
--dangerously-bypass-approvals-and-sandbox | Codex. The name says what it removes: the approval prompts and Codex's own sandbox. |
--yolo | Gemini CLI, Cursor CLI, Crush, Kimi, Muse, Rovo Dev, Hermes, GitHub Copilot CLI, Command Code |
--mode yolo | ZCode |
A git worktree isolates the checkout, not the machine. Running with prompts off is only as safe as the sandbox around the process; see Sandboxing and Authorisation Policy.
Parallel Execution
One agent works on one task at a time, so throughput comes from running several. Each needs its own checkout or they overwrite each other's edits, and git worktrees provide that cheaply: one repository, many working directories, one branch each.
Each agent gets its own working directory and branch from the same repository, so parallel edits never collide and each result arrives as a reviewable branch.
One agent receives the large task, splits it, starts worker agents in their own worktrees and merges what they return. Orchestrators provide this across agents; Claude Agent Teams does it inside one product.
Workers need not be the same agent. An orchestrator can send one subtask to Codex and another to Claude Code, or race two agents on the same task and keep the better diff.
Parallel agents produce diffs faster than a person reads them. The constraint moves from writing code to reviewing it, which is why orchestrators put diffs, a browser and the terminal in one view.
Programmatic Control
Terminal agents are built for a person at a keyboard, so a program that drives them, such as an orchestrator or a CI job, has to solve problems a person never notices.
| Concern | Mechanism | Examples |
|---|---|---|
| Passing the task | As a command-line argument, through a prompt flag, or typed into the composer once the interface is ready. | Claude Code, Codex and Cursor CLI take an argument; OpenCode and Gemini CLI take a flag; Aider, Goose and Kimi have it pasted after start. |
| Knowing the agent is ready | Watching the terminal output for the agent's own composer prompt rather than waiting a fixed time, because a paste sent too early is lost. | Claude Code, Codex, Grok, Copilot and Antigravity each draw a distinct composer that a driver can wait for. |
| First-run trust prompts | Writing the agent's workspace trust setting before launch, so a "trust this folder?" menu does not swallow the task. | Claude Code, Codex, Cursor CLI, Copilot, Antigravity, Kimi, Qoder. |
| Seeding without sending | A flag or environment variable that fills the input box but waits for the user to press Enter. | Claude Code and OpenClaude have a prefill flag; Pi and OMP read an environment variable. |
| Observing progress | Installing hooks that report turn start, tool use and completion, instead of guessing from screen output. | The agents marked Hooks above, including Claude Code, Codex, Gemini CLI, Cursor CLI, Droid and Kiro. |
| Structured conversation | Running the agent behind a chat interface instead of a raw terminal, using a structured protocol rather than screen scraping. | Claude Code and Codex both offer a structured mode that a chat interface or another program can drive directly. |
There is no common protocol for starting, prompting or observing a terminal agent, so every orchestrator carries a per-agent adapter. Agents that expose hooks and a prompt flag are the cheapest to integrate and the most reliable to automate.
Failure Modes
The agent edits files the task never mentioned, reformats unrelated code or refactors on the way past, and the change that mattered is buried in the diff.
Fix: Scope each task to a named area, give each agent its own branch, and review the diff before merging rather than the agent's summary.
With prompts off, a mistaken reset, force push, deleted directory or dropped database runs with nobody asked.
Fix: Run bypass mode only inside a sandbox, block destructive commands with a pre-tool hook, and keep credentials for shared systems out of the agent's environment.
Instructions planted in a README, an issue, a dependency or a fetched web page are read as part of the task and acted on.
Fix: Treat repository and web content as untrusted, restrict network egress, and require confirmation for actions that leave the workspace.
The agent reports the task done when tests were never run, were skipped, or were edited until they passed.
Fix: Verify outside the agent: run the test suite in CI on the branch, and use a stop hook that checks the build before the turn ends.
On long tasks the context is compacted and early instructions are dropped, so the agent drifts from conventions it followed at the start.
Fix: Put standing rules in the repository context file rather than the prompt, and split long tasks into shorter sessions.
Agents in separate worktrees change the same files, and their branches conflict when merged.
Fix: Split work along file or module boundaries before dispatch, and have the coordinator merge and resolve rather than each worker.
Choosing a Coding Agent
| Situation | Why It Matters | Look For |
|---|---|---|
| Unattended or parallel runs | Nobody is watching the terminal, so status and completion must be reported, not read off the screen. | Hook support and a prompt flag: Claude Code, Codex, Cursor CLI, Droid. |
| Choice of model | A model-specific agent ties cost and capability to one vendor. | Provider-agnostic agents: OpenCode, Aider, Goose, Cline, Kilocode, Crush. |
| Hardest tasks on frontier models | A lab's own agent is tuned for its models and usually gets new capabilities first. | Claude Code, Codex, Gemini CLI. |
| Auditable or modifiable agent | Security review or custom tooling needs the harness source, not only the model. | Open source agents: Codex, Gemini CLI, Qwen Code, Aider, Goose, OpenCode. |
| Tied to an existing platform | Issue trackers, code hosts and cloud accounts are already wired in. | GitHub Copilot CLI, Cursor CLI, Rovo Dev for Jira and Confluence, Kiro for AWS. |
Related: Harness Engineering, Code Execution, Agentic Loops, Sandboxing and Agent Clawification for OpenClaw and its relatives.
