In agentic coding the model runs a loop: read files, take an action, observe the result, decide the next step, repeat until done. That single change turns a text predictor into something that can finish a task. It also changes three things at once: cost grows with the square of turn count because context is re-sent every turn, your job moves from writing to specifying and reviewing, and safety stops being a matter of what you asked the model to do and becomes a matter of what the harness lets it reach.
- The loop is read, act, observe, decide, repeated until the agent thinks it is done.
- The model can now check its own work, which is the entire reason the category exists.
- Cost grows closer to turns squared than to a straight line, because context is re-sent every turn.
- Most of the capability lives in the harness, not the weights: tools, permissions, context assembly, compaction.
- Every vendor now ships an autonomy dial. Picking the wrong notch is the most common mistake.
- Capability, not instruction, is the only real security boundary.
The loop
Autocomplete predicts the next few tokens at your cursor. An agent runs a loop. That is the whole definition, and everything below is a consequence of it.
AUTOCOMPLETE AGENT
you type you describe an outcome
model predicts model reads files
you accept or not model runs a command
repeat model reads the output
model decides what next
... until done
you review a diff
The consequential difference is the fourth line on the right. An agent can run your tests, read the failure, and try again. That feedback loop is why it can finish a task rather than produce a plausible first draft, and it is why an agent can work unattended for twenty minutes while an autocomplete cannot work unattended at all.
What one turn actually contains
A turn is not one request. A single instruction like "make the failing test pass" typically produces a dozen model calls, each one carrying the whole conversation so far plus whatever the last tool returned.
- You send an instruction. The harness prepends a system prompt, your project memory file, tool definitions, and environment details.
- The model emits a tool call. Read a file, run a command, search the repository.
- The harness executes it, subject to whatever permission mode you are in, and appends the result to the conversation.
- The whole conversation goes back to the model, which decides what to do next.
- Repeat until the model emits text instead of a tool call, or until you interrupt it.
Most of the product is the harness
People compare agents by comparing models. That gets the proportions wrong. Two harnesses running the same weights produce very different experiences, because the harness owns everything between the model and your filesystem.
What sits between the weights and your repository.
| Harness job | What it decides | Why you notice |
|---|---|---|
| Tool set | What actions exist at all | An agent with no Bash tool cannot run your tests, however capable the model |
| Permission layer | Which actions run without asking | This is the autonomy dial, and it is the setting people get wrong |
| Context assembly | What loads before you type | Project memory, skills, tool listings, git state |
| Compaction | What gets discarded when the window fills | The agent that "forgot" the constraint you stated an hour ago |
| Sandboxing | What the process can reach | The difference between a bounded blast radius and your home directory |
| Result shaping | How much of a command output comes back | A 10,000-line log entering context costs you on every subsequent turn |
Why it prices differently from chat
Every turn re-sends the accumulated conversation so the model can decide what to do next. That single property explains most surprising bills.
A session that accumulates roughly 5k tokens per turn, uncached.
| Turn | Context | Cumulative sent |
|---|---|---|
| 1 | 20k | 20k |
| 10 | 65k | 425k |
| 20 | 115k | 1.35M |
| 30 | 165k | 2.8M |
- Cost grows with turns squared, not linearly. Caching flattens the curve substantially but does not change its shape.
- Reading dominates. A coding session is overwhelmingly input tokens. Output is a rounding error on the token count and a large share of the bill.
- Turn count is driven by prompt precision. A vague prompt that sends the agent exploring costs multiples of one that names the files. Anthropic makes the same point in its own cost guidance: "improve this codebase" triggers broad scanning, while naming the function does not.
Caching is why this is affordable at all
Prompt caching is what stops the quadratic curve from being fatal. On the Anthropic API, as of August 2026, a cache write costs 1.25x the base input rate at the five-minute TTL and 2x at the one-hour TTL, and a cache read costs 0.1x. A conversation prefix that stays byte-stable is therefore re-sent at a tenth of list price on every subsequent turn.
For scale, Anthropic reports an average of about $13 per developer per active day across enterprise deployments, and $150 to $250 per developer per month, with 90% of users staying under $30 per active day, as of August 2026. Those are API-billed figures. On a subscription you pay a flat fee and hit a usage window instead of a bill, which is a different failure mode rather than a cheaper one.
The autonomy dial
Every serious agent now ships a setting for how often it stops to ask you. This is the most consequential configuration in agentic coding and the one people leave on the default without deciding.
Claude Code permission modes and Codex CLI equivalents, as of August 2026.
| Claude Code mode | Runs without asking | Nearest Codex setting |
|---|---|---|
default (labelled Manual) | Reads only | --sandbox read-only, or approval policy untrusted |
acceptEdits | Reads, file edits, and mkdir, touch, rm, mv, cp, sed inside your working directory | --sandbox workspace-write |
plan | Reads and analysis; edits blocked until you approve a plan | --sandbox read-only while you agree the approach |
auto | Everything, with a separate classifier model vetting each action | No equivalent. Closest is workspace-write with on-request |
dontAsk | Only pre-approved tools; everything else is auto-denied | Approval policy never with a tight sandbox |
bypassPermissions | Everything, no checks | --dangerously-bypass-approvals-and-sandbox |
In the Claude Code CLI, Shift+Tab cycles default, acceptEdits, and plan. dontAsk and bypassPermissions are opted into at launch; auto appears once your account qualifies for it. Codex defaults to workspace-write with on-request approvals inside a git repository, and OpenAI recommends read-only for a folder that is not version controlled.
- Auto mode is not a rubber stamp. As of August 2026 its classifier blocks
curl | bash, force push, production deploys and migrations,git reset --hard, and irreversibly destroying files that existed before the session, all by default. - It gives up rather than nagging. After 3 consecutive blocks or 20 in a session, auto mode pauses and Claude Code goes back to prompting. Those thresholds are not configurable.
What changes about your job
| Before | After |
|---|---|
| Writing code | Specifying outcomes |
| Debugging your own code | Reviewing code you did not write |
| Knowing the codebase | Knowing what to ask for and what to reject |
| One task at a time | Several, if you can review them all |
| Style is a habit | Style is a written convention an agent reads |
| Cost is a seat | Cost is a variable you can move by 3x with prompt hygiene |
Three habits it forces
- Write conventions down. Things you knew implicitly now have to exist in a file, because the agent cannot absorb them from your codebase the way a colleague does over months. Anthropic suggests keeping
CLAUDE.mdunder about 200 lines and moving longer workflow instructions into skills that load on demand. - Review deletions as carefully as additions. Removed lines get less scrutiny and are where regressions live.
- Commit before unattended runs. Git becomes the undo button, and a clean tree is the difference between a reset and an investigation.
The security shape
An agent that can run commands is a process acting with your credentials on input you did not write. Two consequences follow, and neither is solved by prompting.
- Instructions are not boundaries. Telling a model not to do something is a preference. Capability limits are controls: read-only tools, an OS sandbox, a token that cannot merge, a deny rule on a path.
- Content the agent reads can instruct it. A comment in a contributed patch, a README in a dependency, a page fetched from the web. If the agent can act, that content is an instruction channel. OpenAI states it plainly for Codex: prompt injection can cause the agent to fetch and follow untrusted instructions, so treat web results as untrusted.
How to tell whether it is working
Agentic coding is unusually measurable, because every turn leaves a record on disk. Five signals separate a workflow that is compounding from one that is quietly costing you.
| Signal | What it means |
|---|---|
| Cost per completed task falling | Fewer exploration turns. Your prompts and memory files improved |
| Turns per task falling | The agent stops guessing where things are |
| One repository costing 3x its peers | That repository is hard to navigate. Fix its memory file first |
| Diff size per task rising | Scope creep. Add a constraint clause to your prompts |
| Review time per task rising | The warning sign. You are accumulating review debt |
The last row is the one to watch. Every other number can improve while that one degrades, and when it does, the productivity gain is a loan rather than a return.
Questions people ask
Coding where the model runs a loop: it reads files, takes an action, observes the result, and decides the next step, repeating until the task is done. That is different from autocomplete, which predicts the next tokens at your cursor and never sees the outcome.
An agent can observe the result of its own actions, so it can run your tests, read the failure, and try again. That feedback loop is why it can finish a task rather than produce a first draft, and it is why an agent can work unattended.
Because every turn re-sends the accumulated conversation plus the latest tool result. Cost grows closer to the square of turn count than to a straight line. Prompt caching flattens it considerably: on the Anthropic API as of August 2026 a cache read is 0.1x the base input rate.
Anthropic reports roughly $13 per developer per active day and $150 to $250 per month across enterprise deployments, with 90% of users under $30 per active day, as of August 2026. On a subscription you pay a flat fee and hit a usage window instead.
It moves the work from writing to specifying and reviewing. The binding constraint becomes how much code you can review carefully, which is a human capacity. Unreviewed agent output is a liability rather than an asset.
It is as safe as the capabilities you grant. Instructions are preferences; sandboxes, read-only tools, deny rules, and scoped credentials are controls. An agent reading untrusted content should not be able to act on it.
Two, and they compound. Giving an agent tasks large enough that reviewing the output is impractical, and leaving the autonomy setting on whatever it defaulted to instead of picking it per task.
Less than you think. Most disappointing sessions trace to harness settings rather than weights: the wrong permission mode, a bloated project memory file, unscoped command output, or a conversation that should have been cleared an hour earlier.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.