Blog
Autonomous coding agents, explained: how they run without you
Autonomous coding agents plan, code, test, and recover on their own. How autonomy actually works, where it breaks, and what supervision adds on top of it.
2026-09-08 · Sathwik R
An autonomous coding agent is one that continues working after your last message: it plans a change, edits files, runs commands, reads what came back, and decides what to do next — repeatedly, without a person approving each step. Autonomy is about who advances the loop, not about how clever the model is.
How does an autonomous coding agent work?
Four stages, repeated until something stops them. The agent turns a goal into a plan, acts on the plan with tools, reads the result of those actions, and decides whether the goal has been met. What separates an autonomous run from an assisted one is who answers that last question — the agent, or you.
- Plan — the goal becomes a sequence of concrete changes, revised as facts arrive.
- Act — files are edited, commands are run, output is captured.
- Recover — a failing command is diagnosed and retried rather than reported.
- Verify — a declared standard is checked before the run is allowed to end.
What is the difference between autonomous and assisted agents?
Assisted agents optimise for keeping you in the loop; autonomous agents optimise for not needing you in it. Both are legitimate, and the right choice is mostly a question of how long the task is and whether you intend to watch it.
| Assisted | Autonomous | |
|---|---|---|
| Advances the loop | You | The agent |
| Typical span | Minutes | Hours |
| Best for | Exploration, review, small edits | Migrations, refactors, backlogs |
| Cost of a wrong turn | You see it immediately | It compounds until a gate catches it |
| What you need from it | Speed | Evidence |
The last row is the one people discover late. When you are watching, a mistake is cheap because you catch it in seconds. When you are asleep, the only thing standing between a wrong turn and a merged pull request is whatever the run was required to prove before it stopped.
Where does autonomy break?
In three specific places, and none of them is code generation.
The first is stopping early. A failing build or an ambiguous instruction is a natural place for a model to end a turn with a summary, and a summary is not work. The second is context loss — a long run outgrows the model's window, and the agent forgets the constraint it was given in hour one. The third is self-report: the agent that finishes also writes the report saying it finished, and that report is exactly the kind of text models produce well regardless of what happened.
Autonomy without verification just moves the review from the code to the summary — and the summary is the part the model is best at.
How do you make autonomy safe to leave alone?
Bound it and check it. In Relay, autonomy is off unless you ask for it: a plain run does one turn and stops. --autonomous turns on continuation, and every bound is explicit — retries per gate, maximum follow-ups, a turn limit, a token limit, and a wall-clock timeout. Gates are your own commands, so "done" means your suite passed, not that the model was satisfied.
relay --goal "port the reporting jobs to the new queue" \ --autonomous --autonomous-gate "npm test" --autonomous-timeout-ms 7200000
Because the bounds are declared before the run, the result is reviewable afterwards: this is what it was allowed to do, this is the standard it had to meet, this is the evidence it produced.
Are autonomous agents safe to leave running overnight?
Yes, with two conditions: a budget that ends the run whether or not it succeeds, and a verification step the agent cannot write itself. Without the first you have an unattended process; without the second you have an unverified one. With both, an overnight run is a reviewable unit of work — how the harness keeps it alive covers the machinery, and the quickstart sets one up.