Ask a team how their agent is kept safe and you will usually get a list: a human in the loop, guardrails, retries on failure, a spend cap somewhere.
Every item is true, and none answers the question that matters, which is what the system does at the moment a boundary is reached.
I have never seen an incident caused by an agent doing something obviously forbidden. They come from the seams: an approval gate a reviewer clicked through in four seconds, a rule that lived only in a prompt, a retry loop that repeated one wrong assumption eleven times, a budget the agent hit halfway through a write.
These six posts sit in the middle of a sixty-day series, and the through-line only surfaced when I read them together: a control counts only if the running system enforces it at the boundary and you can watch it do so, and a control that has never fired in a test or an incident is unproven.
Place human review where it can change the outcome
"There is a human in the loop" is one of the most reassuring sentences in AI product design and one of the least informative. It confirms a person exists somewhere in the workflow, and says nothing about whether they can change the outcome.
The decision that matters is placement. It runs on two axes, how reversible the action is and how solid the evidence behind it is. Irreversible plus uncertain is where a human belongs. Reversible plus well-evidenced should be automated, with logs. The diagonal between those corners is where the design work lives, and it is worth mapping deliberately rather than letting each implementer decide it.
Two numbers tell you whether you got it right. If a reviewer approves 99% of what reaches them, the gate is in the wrong place, or it has trained its human to stop reading. And if approving one request takes fifteen minutes of reconstructing what the agent was doing, reviewers stop reconstructing. They approve on instinct, and you find out when something ships with a signature on it.
The second one is a design problem, and asking reviewers for more discipline does not fix it. Put the proposed action, evidence, blast radius and a recommendation on one screen. Reviewers who can decide in thirty seconds actually decide, while reviewers who have to go digging just approve.
Enforce rules in the system, outside the prompt
What separates real controls from documentation is where each one is enforced.
"Do not access customer PII" in a system prompt is a request made to a probabilistic system. It can be misread, argued around, or overridden by instructions inside retrieved content (indirect prompt injection). It works as a strong default and nothing more.
Enforced in the system, the same rule looks different. The agent's credentials cannot read the PII store, the tool is not in its registry, and the runtime applies the spend cap, rejecting the call rather than reasoning about it. A prompt shapes behaviour and the system bounds it. Sorting your rules into those two buckets is uncomfortable, because every rule that was added by editing the system prompt lands in the first one.
Then there is the failure direction incident tracking never sees. Escapes, the harm that got through, become incidents and get counted. False blocks, the legitimate work the guardrail wrongly refused, raise no incident, so nothing counts them unless every block is logged and a sample reviewed. A guardrail programme can strangle a product this way without anyone noticing: users hit a wall, decide the system cannot handle their real work, and go back to doing it by hand. Adoption dies without one incident being logged, and the dashboard stays green throughout.
So a refusal on its own is not a design. A good boundary comes with somewhere to go: a narrower version of the action, a request for the missing authorisation, or an escalation a human can resolve in seconds.
The state worth designing for is "failed halfway"
The dangerous agent state is partial success, such as three of seven records updated, or the notification sent but the database write lost. A clean failure you rerun; a partial one somebody untangles by hand while a customer waits.
Recovery is five distinct mechanisms, and a system with only one of them has recovery for that one failure class. Retry handles transient failures, with backoff, a hard cap and an idempotency key on any write, so a retry cannot apply the same change twice. Fallback means a simpler tool, an older source, or a degraded answer that is honest about being degraded. Checkpoints are durable progress markers, so resuming means continuing rather than restarting. Rollback is the compensating action for anything externally visible, and "we will fix it manually" is your rollback story until you write a better one. Escalation means handing to a human with state attached: what was attempted, what succeeded, what is half-done.
The distinction that costs most when missed is that retry handles transient failures and does nothing for a wrong assumption. An agent that retries a bad plan three times has failed three times more expensively.
None of it counts until you have watched it happen. In staging, kill the API mid-task, return a malformed response, or time out the third of five tool calls. Whatever it does there is what it will do in production at 2am, and if nothing in the loop checks each step's result, the first attempt shows it carrying on as though the failed step had succeeded.
Budgets change how an agent thinks
Every team running agents eventually has the invoice conversation. The only variable is whether it happens calmly, as a design decision, or on a Monday after a weekend in which one stuck agent found no reason to stop.
Limits on time, tool calls, cost, retries and risk are the easy half. What gets skipped is the behaviour at the limit. Hitting a budget should produce an outcome rather than an exception. A soft limit triggers a wind-down (summarise progress, return partial results, hand over with state attached), and a hard ceiling stops the run. An agent that hits a cap mid-action and dies has manufactured the "failed halfway" mess above, deliberately.
Cost control is the obvious win; the effect on planning is what surprises people. An agent that knows it has five tool calls left prioritises and abandons low-value branches, and trace quality changes visibly when the remaining budget is exposed to the agent rather than merely enforced around it. Unbounded agents are less deliberate. The pressure also cuts the wrong way. An agent near its limit may settle for a thin answer, so review runs that ended close to it.
Cap retries separately from total actions. They are the most common way a budget disappears invisibly, because each one is individually defensible and the trace looks like diligence when it is really one failing approach repeated.
Split an agent only for permissions, parallelism or context
Plenty of teams that needed one agent built a committee. There are three honest reasons to split, and the rest are usually enthusiasm for the architecture diagram.
The strongest is separation of permissions. The agent that reads everything should not be the agent that can write anything, and that is a security property no prompt can provide, as long as each agent runs under its own scoped credentials. The second is genuine parallelism, where thirty documents to analyse independently is real concurrent work; sequential work gains nothing from a crowd. The third is context isolation. An agent with one job outperforms one juggling five, because "be exhaustive" and "be concise" in the same prompt produce something inconsistently both.
If none of the three applies, the single agent wins. Every extra agent levies a coordination tax paid on every request forever: handoffs that drop context, shared state that drifts, conflicts needing arbitration, and a class of failure that exists only between agents and appears in none of your per-agent metrics. When every component tests clean and the system still fails, the fault is in the seams between agents, which the split itself created.
The supervisor is your quality ceiling
The supervisor pattern is the place to start, and the reason is debuggability rather than throughput: there is exactly one place to look when something goes wrong, because one agent understood the whole mission and the trace reads like a narrative rather than five simultaneous conversations.
The costs concentrate in the same spot. The supervisor is your latency floor, your single point of failure and, least obviously, your quality ceiling. Workers can only be as good as the task descriptions they receive, so a supervisor that delegates vaguely turns excellent specialists into confused ones. The symptom presents as worker underperformance, so teams tune the worker prompts, which fixes nothing: the defect arrived in the input.
That makes the delegation format the most consequential prompt in the system, worth treating as an interface with required fields, acceptance criteria among them. Also watch whether workers ask follow-up questions or silently guess (both indicate the same defect), and whether the supervisor's tracking state inflates until decomposition degrades. And the supervisor owns the definition of "done", so if its standard slips the whole system inherits the new one.
Ask each control what it did last time
Wider autonomy is acceptable only when the controls around it actually hold, so test them. For every control on your list, find the evidence of its last firing: the gate's approval rate and decision time, the guardrail's block log, the recovery path's last fault-injection run, the budget's soft-limit hits, the supervisor's rejected worker outputs. A control with no such evidence has never been watched; schedule the test that makes it fire before you widen the agent's autonomy.
Where each control is spelled out
Each is a short standalone post, with the failure modes and what to actually do:
- Human review belongs where it has timing, authority and context
- Good guardrails make safe progress possible, not just block
- Design recovery into an agent on day one
- Every autonomous run needs a budget for cost, time, actions and risk
- One giant agent is rarely the cleanest design
- Supervisor agents help until they become the bottleneck
They form the Agent Control and Supervision chapter of 60 Days of Production AI Systems, a series on building AI that survives real users. If you would rather start from the beginning, the series page lays out all sixty in ten chapters.
Terms in this piece
About this deep dive
- Format
- Deep dive
- Level
- Practitioner
- Read
- 7 min read
- Published
- Sep 12, 2026
- Disciplines
Long-form engineering, further than a blog post goes.
More on these topics
Comparison · · 8 min read
Direct APIs, MCP tools and Code Mode: three ways an agent reaches your systems
How I choose between hand-written tools, MCP tool calls and Code Mode by where the plan runs, and why I built codemcp to test it.
Decision note · · 2 min read
We built our own TypeScript orchestrator, and stayed on it
Why our enterprise AI platform runs agents on a TypeScript execution layer we started almost two years ago, and why reaching near-parity with the frameworks argued for staying.
Comparison · · 1 min read
LangGraph vs writing the agent loop yourself
Two ways to write the same supervisor, an explicit state graph or a loop your own code owns on the model API. Compared on control flow, tracing, testing, checkpointing and what each makes hard.
Discussion