An agent is a loop: perceive, decide, act, verify. Everything interesting is in the fourth step, and almost every failure you have seen is a loop that skipped it.
The loop
while (!proven_done) {
observe(state) // files, preview, console, page
plan(next_smallest_step)
act(one_tool_call)
verify(result) // evidence, not self-report
}Four ways loops die
- Self-reported success — the model says done, nothing checked. Fix: gate completion on evidence.
- Context rot — the transcript grows until the goal falls out of the window. Fix: budget context, summarise history, keep the goal pinned.
- Thrash — two fixes that undo each other. Fix: read before write, and claim work atomically so nothing runs twice.
- Silent tool failure — a call fails, the model narrates as if it succeeded. Fix: surface every failure into the transcript as first-class text.
Durability is an architecture, not a retry
If your run lives in a browser tab, a network hiccup is a lost afternoon. Put the run behind a durable owner, write events append-only, and let clients fold the log. Then a reload is a replay rather than a restart.
Idempotency, in one sentence
Every action should be safe to attempt twice — claim it with a lease, key it by identity, and make the second attempt a no-op instead of a duplicate.
Reliability in agent systems is not a model property. It is a systems property that a good model can no longer hide the absence of.
Still wondering something?
The assistant answers from these pages only.