{"slug": "the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it", "title": "The Agent Can Own the Loop. It Cannot Own the Receipt That Ends It.", "summary": "Peter Steinberger and Boris Cherny advocate for loop engineering over prompt engineering, where agents autonomously iterate toward a goal until an independently constrained stopping condition is met. A developer highlights that self-attestation—where the agent judges its own output—is unreliable, citing a reported 68% of sessions with unverified pass verdicts. The key to trustworthy loops is using external, hard-to-fake evidence like pre-verified tests rather than agent self-review.", "body_md": "Peter Steinberger put it plainly: you shouldn't be prompting coding agents anymore, you should be designing loops that prompt your agents. Boris Cherny, who leads Claude Code at Anthropic, backed it up. He doesn't prompt Claude anymore. He has loops running that prompt Claude. His job is to write loops.\n\nNeither one is lying. The sentence just travels a lot better than the detail it leaves out.\n\nPrompt engineering puts a human in the loop at every step. Write a prompt, read the output, write the next prompt. The agent only moves when you push it.\n\nLoop engineering flips that. You set a goal once. A trigger fires. The agent acts, checks whether the goal was met, and keeps going until it is. You show up at the end to review.\n\nThat's a real distinction. It tells you who initiates each step. It says nothing about the question that was always doing the actual work underneath it: what does \"checks whether the goal was met\" mean, mechanically, inside the loop.\n\nThe day before I read those two quotes, I watched someone attack \"loop engineering\" by that exact name. No evidence, no repo, no commit, an unfalsifiable claim about an unnamed target dressed up as outrage. It devolved into an argument about follower counts, which is its own small lesson about what happens when a real question shows up with no receipts attached.\n\nUnderneath the noise, the question he was gesturing at was the right one. Where is the enforced mechanism that keeps a loop from drifting away from what it was supposed to do. He asked it with zero rigor. The slogan answers it with zero detail. Same gap, dressed two different ways.\n\nA loop's stopping condition can be built on two different kinds of evidence, and most of what determines whether the loop is trustworthy follows from which one you picked.\n\nSelf-attestation: the agent looked at its own output, decided the goal was met, and said so.\n\nIndependently constrained evidence: something outside the agent's own judgment confirms it, and it was set up to be hard to fake. A test that was proven to fail on the broken version of the code before anyone trusted it to prove anything. A structured event that the code path in question can only emit if it actually ran. A criterion fixed before the result existed, not adjusted afterward to fit it.\n\nThat second clause matters more than it looks. An artifact is not automatically a receipt. A file can exist and be empty. A test can pass while checking the wrong property. A green check can mean the relevant job never ran. The real fence isn't assertion versus artifact, it's whether the thing checking the loop could quietly rewrite the rule it's being checked against. A fixture that was proven to fail first, whose pass condition nobody downstream can edit, and whose result is reproducible and tied to a specific run, is doing something a green checkmark on its own doesn't guarantee.\n\nSelf-attestation is where hollow compliance lives. An agent can satisfy the letter of its own goal check and defeat the purpose of the task at the exact moment the letter and the purpose diverge, and nothing in the loop notices, because the thing checking is the same thing that might be wrong. That doesn't make self-review worthless. It makes it a bad place to put final authority, especially on anything with real blast radius.\n\nXin & EQ, [commenting under an earlier post in this series](https://dev.to/jugeni/comment/3b960), reported a concrete version of this: in their data, 68 percent of sessions produced a pass verdict on a completion check with no independent read behind it. The claim existed. The check that would have caught a false one never ran. I'm citing that as one team's reported number in a public reply, not as an established industry statistic, but it's the shape of the failure exactly.\n\nI originally wrote that cost and danger are the same problem wearing different clothes. That's tighter than the evidence supports, so let me say the honest version instead.\n\nA weak stopping condition is one mechanism that can drive both cost and risk up at once. Self-attestation has no cheap way to confirm completion, so it can keep retrying past the point a receipt would have stopped it, and that same uncertainty can also resolve as false confidence and stop too early. Both failure modes trace back to the same missing thing. But a loop can also have a solid deterministic check and still be expensive, because the check itself is costly to run, the agent generates enormous diffs before each attempt, context balloons, the loop oscillates between two candidate fixes, or the validator returns a pass or fail with no information about how to close the gap. And a loop can be cheap and still be dangerous, if the fast test that gates it was checking the wrong property from the start. Weak stopping conditions correlate with both problems more than either problem alone would suggest. They don't guarantee both, and fixing one doesn't automatically fix the other.\n\nThe slogan optimizes for adoption, not specification. \"Write loops\" travels well. \"Define a bounded terminal state, an evidence source the agent can't quietly rewrite, a retry limit, and an escalation path for when the goal can't be reached\" does not fit on a slide. That omission may be commercially convenient for whoever prices by the token, but mostly it's just what slogans do: keep the exciting layer, compress away the expensive one.\n\nA stop condition isn't the only thing a production loop needs. It needs permission boundaries, a retry budget, a way to recover or roll back, observability into what happened, state that survives a crash, and clarity about who is allowed to change the success criterion once it's set. Skip any of those and a good stopping condition alone won't save you.\n\nBut it's the first one, because everything else assumes you already know when to stop, retry, or escalate, and that assumption is exactly what a self-attesting loop can't cheaply support.\n\nThe sharper version of the whole argument: autonomy is cheap only after completion becomes mechanically legible. Until a system can recognize its own finish line without asking its own judgment, autonomy doesn't remove the cost of oversight, it just moves it to the end, where a human has to reconstruct what actually happened before trusting the result. That's the same line I drew in the piece before this one, between code and judgment. A loop can be autonomous in how it acts and still be soft at the one moment that decides whether any of it can be trusted.\n\nThe agent can own the loop. It cannot own the receipt that ends it.\n\nThis solves the floor, not the ceiling. A loop can know when it has produced a valid result and still have no idea whether the result was worth producing. That is the next question.", "url": "https://wpnews.pro/news/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it", "canonical_source": "https://dev.to/jugeni/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it-4okc", "published_at": "2026-07-17 09:17:08+00:00", "updated_at": "2026-07-17 09:34:06.257699+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-safety"], "entities": ["Peter Steinberger", "Boris Cherny", "Claude Code", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it", "markdown": "https://wpnews.pro/news/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it.md", "text": "https://wpnews.pro/news/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it.txt", "jsonld": "https://wpnews.pro/news/the-agent-can-own-the-loop-it-cannot-own-the-receipt-that-ends-it.jsonld"}}