Learn

Coding agent: a model with an editor and a terminal

A coding agent is a tool such as Claude Code, OpenCode, Aider, Goose or Pi that wraps a language model in a loop: the model reads code, proposes edits and commands through tool calling, the harness executes them and returns the results, and the loop repeats until the model says the task is done. The model brings the reasoning; the harness brings the tools, the limits and the memory of the session.

At a glance

Model
Decides what to read, change and run next
Harness
The CLI around it: tools, permissions, prompts, session history
Loop
Read, edit, run, look at the result, repeat
Usual failure
Claiming success that the code does not back up
Flow

Inside one agent run

The harness turns the model's tool calls into real actions and feeds back the results.

1
Task a prompt and a repository
2
Model proposes read this file, edit that line, run the tests
3
Harness executes within its permissions and, ideally, a sandbox
4
Gate independent checks decide whether the change is accepted

What is the difference between the model and the agent?

The model is the part that thinks; the agent is the program that lets it act. The same model behaves very differently in two harnesses, because the harness writes the system prompt, decides which tools exist, asks or does not ask before running a command, and keeps the session history. That is why comparing coding agents is not the same as comparing models: a small harness with a minimal prompt can leave more of a free tier’s token budget for the actual task, and a harness that confirms every edit cannot run unattended at all.

Why do agents need gates and sandboxes?

Because an agent that runs alone acts on its own judgment, and its report about what it did is not proof. Two things make unattended runs safe: a sandbox, so a wrong or manipulated command cannot reach anything outside the task, and gates that run independent checks (tests, a build, a syntax check) before any change is accepted. Without the first, a mistake can hurt the machine; without the second, a mistake can land in your repository looking like a success.

A coding agent is good at

  • Mechanical changes across many files
  • Running the tests and fixing what they report
  • Working through a clear task while you do something else

Watch out for

  • Reports of 'all tests pass' that nobody checked
  • Edits outside the files the task was about
  • Commands with more reach than the task needs, unless it runs sandboxed

Related terms

← All terms Reviewed: October 2026