You shipped one agent, one user, one happy path. Then production gave you a queue of tickets, six workers polling it in two regions, a triage agent, a policy agent, a composing agent, and a nightly job that reconciles what you charged against what you recorded. Nobody designed that as a distributed system. It became one on the day your second worker started.
One of your customers gets refunded twice. Your run sits at 90% for twenty minutes and then writes its result over a newer one. An incident review asks which run sent the email, and your answer is spread across four log streams that share no identifier. Your prompt change ships on Tuesday and breaks runs that started on Monday.
None of those are model problems. They are what you get when several processes act on shared state over a network you do not control, with a component that returns a different answer for the same input. That is a distributed system, and your model is one component inside it — not the component that decides whether your fleet is reliable.
This post is about your fleet, not your agent. If you want the single-agent version — the loop, the tool contract, the sandbox, the approval gate — the agent architecture guide already argues that one agent is a distributed system in miniature and builds the architecture around it. Take that as settled. What follows is what changes when you run ten of them, over shared state, on a schedule you do not fully control.
Why are AI agent fleets distributed systems?
Your fleet is a distributed system because independent workers act on shared state over a network you do not control, and your agent architecture adds four questions a single run never has to answer: replication, ordering, ownership and version skew.
Take the single-agent proof as given; the agent architecture guide makes it in its section on where the analogy breaks. One remote call hides its outcome, and one model retries an intent you cannot read. The fleet changes the unit of failure, not the argument.
Three of your workers can execute the same misread intent before a human sees the first result. One agent that misreads your refund policy is a wrong decision. Six agents that misread it are your policy. That is the gap between a bad run and a broken system: your review samples one trace, and your fleet produces a thousand consistent ones. That multiplication is what a single-agent review cannot see, and it is why the incidents you cannot reproduce are usually fleet incidents.
The failure also stops being local. One worker's retry becomes another worker's duplicate claim. One region's slow model call becomes a queue that the other region drains into a second attempt. When you read a fleet incident, you are reading the interaction between runs, not the contents of one.
The model is a retry you did not write
Every run re-attempts an intent you cannot inspect, and your fleet runs those attempts concurrently.
When your service retries, you open the client, count the attempts, set a backoff, add jitter. When your model retries, the decision lives in weights. It might rephrase your request, skip a step it already completed, or call your refund endpoint twice because the first error message was ambiguous. You cannot inspect that policy and you cannot patch it, so you bound what a retry is allowed to do: an effect ledger, an owned work item, an inherited deadline, a trace that survives the hop.
Anthropic's account of running agents in production states the consequence plainly: agents are stateful and errors compound, so a system that cannot resume from the middle pays for every restart in cost and user trust. Your fleet pays that bill in parallel, once per worker, on every retry wave.
What changes when you run more than one agent?
Your unit of design moves from the run to the fleet, and your multi-agent architecture inherits every question you answered about one agent, with a harder twin. Your one run needed a stop condition. Your fleet needs to know which run owns ticket 8821. Your one run needed a checkpoint. Your fleet needs to know which checkpoint is authoritative when two workers resume the same task.
The MAST study derived 14 failure modes in three categories — system design, inter-agent misalignment, and task verification — from 150 annotated traces, alongside a 1,600+ trace dataset across seven frameworks. You will see those failures cluster in system design and coordination, not in model quality, and system design is the largest of the three. That is the list you would get from a postmortem on a service mesh.
Your second agent does not add a second brain. It adds a network hop, a contract, a state boundary, and a new way for two components to disagree about what is true.
The four new failure surfaces
Replication, ordering, ownership, and skew: name them once and they stop surprising you.
- Replication. Two workers can claim your ticket, and your event can be delivered twice. Nothing in your model prevents either.
- Ordering. A retry of step two can land after step three completed. Your run's narrative stops matching the order of its effects.
- Ownership. Two agents can both believe they own the refund. Only one can be right, and
right
has to be a record you keep. - Skew. Your in-flight run holds a prompt version, a model version, a tool schema, and a checkpoint. Change any one of them and you are running code you never tested together.
The rest of this post takes them in the order that hurts: partial failure first, because it is the parent of the other three. The state, copy, agreement and clock decisions underneath belong to the six decisions that make a system distributed, and this post does not re-derive them.
What does partial failure look like across a fleet?
Partial failure means some of your work succeeded, some did not, and your system cannot tell you which — and at fleet scale it is your normal state, not your exception.
Suppose one run in twenty hangs on a model call, and one in fifty finishes your refund and dies before the CRM write. Your dashboard, which counts completed runs, reports a healthy rate while a dozen customers have money in a state you cannot describe.
The root is one sentence from Amazon's engineering guidance: a timeout or failure does not necessarily mean that the side effects have not happened. You did not learn that your refund failed, only that you did not receive a response. Those are different facts, and only one is safe for you to act on.
AWS Lambda's docs make the same point for direct invocations: your code might have run completely, partially, or not at all
. For asynchronous invocations, Lambda retries a failed event up to two times by default. That is not a defect in Lambda. It is what a network does to a request whose response you cannot observe, and your agent platform inherits it the moment a tool call leaves your process.
Deadlines, not timeouts
You should make each hop inherit your caller's remaining time, not invent its own.
A per-call timeout is your local decision that creates a global problem. Your queue waits ten, your model takes forty, your tool takes five, and your caller gave up at thirty. You paid for work nobody will read, and your next retry adds more of it.
Google's SRE book calls your fix deadline propagation: one absolute deadline high in the stack, inherited by every downstream call. Their example runs a 30-second budget down to 23 seconds at the next hop and 19 after that. The arithmetic is trivial. The discipline is not: every component between your user and your tool has to pass the budget along instead of resetting it.
For your fleet, that has one implication. Your deadline belongs to the work item, not the model call. Persist it with the task, hand it to every agent that touches the task, and check it before each irreversible step. A run with two seconds left should not start your refund.
Why does at-least-once delivery duplicate your side effects?
Because your delivery guarantee sends the same message more than once, and your effect is owned by a process that can die between the call and the record.
Amazon SQS says it without hedging: standard queues ensure at-least-once message delivery
, and more than one copy of a message might be delivered
. Your ticket event may arrive twice. Your nightly reconciliation may overlap yesterday's batch. Your model may call the same tool twice.
The write-tool key belongs to the reliability sequence for an AI system; the fleet problem is ownership. A key that lives in your worker's memory dies with the worker. A key you write into the work record survives the resumption, the replay, and the region failover.
An idempotent operation is one a caller can retransmit with no additional side effects, and Amazon's own example shows why the record matters: a create call whose response is lost leaves you unable to tell whether the resource exists, so your retry either duplicates it or forces a reconciliation you did not plan.
Where the idempotency key has to live
In the work record, not the process.
Your work item carries the intent and the key — refund:order-4471:once — and every attempt reads it from there. When your worker A dies after the refund and worker B resumes, B presents the same key. When your nightly reconciliation replays the day from a different process, it presents the same key again. Your tool deduplicates what it is given; your record is what lets you give it the same thing hours later.
Your protocol will not do this for you. The Agent2Agent specification makes its read and cancel operations idempotent, but its primary write — Send Message — only MAY be idempotent
, using the message ID if the implementer bothers. That is reasonable for a protocol. It is not a guarantee for your payments API.
If you want the consumer-side version of the same argument, event-driven consumers face it with every redelivery.
Who owns a work item when two agents pick it up?
Your ownership has to be a record with an expiry, because your second worker cannot see your first worker's intent.
Picture your refunds queue at 09:14. Worker A claims ticket 8821 and starts a model call. The call takes ninety seconds. Your visibility timeout expires at sixty. Worker B claims the same ticket, reads the same order, and issues the same refund. Both runs are correct in isolation. Your customer is paid twice.
Your fix is older than agents. A claim is a row with an owner, an expiry, and a version. Taking the claim is a conditional write: succeed only if the owner is null or the lease has expired. Every write you make after that carries the version, so a resurrected worker holding version 3 cannot overwrite your result at version 4. Engineers call the second part a fencing token; you can call it a version column if that is what your database gives you.
Two things make this harder than a job runner. Your model call can run for a minute, so your lease has to outlive your p99 turn, not your p50. And a run that resumes from a checkpoint is not a new run; you must not treat it as one.
That last point decides your recovery design. Your checkpoint is not the truth. A checkpoint proves what your run knew at a point in time; your effect ledger proves what it did, and your ledger is what decides whether B may write. So resumption is a write, and it needs the ownership check you give every other write: read the lease, present the version, then append to the ledger. A resuming worker that skips your ownership check is a second writer with a good story.
The state-tier explanation belongs to the guide; the fleet rule is that recovery is never exempt from ownership.
Why does retrying the whole agent make the outage worse?
Because your agent loop is already a retry layer, and retries multiply across layers instead of adding.
Amazon's Builders' Library gives you one number. A five-deep stack of service calls with three attempts at each layer multiplies the load on your last layer by 243. The general arithmetic belongs to the distributed-systems post. What that post did not count is your extra layers: your model may call a tool twice, and your orchestrator retries the step on top of the client retry, the queue redelivery and the scheduler rerun.
The consequence is worse than a slow afternoon. Bronson and his co-authors named the pattern: a metastable failure. A trigger pushes your system into a bad state, and a sustaining effect — usually work amplification — keeps it there after the trigger is removed. Your recovery needs a strong corrective push, such as shedding load or restarting, not patience. Your fleet that retries every failed run is a machine for generating that sustaining effect.
So retry at one layer, and make it the layer that knows the most. Prefer retrying a step over retrying a run, and retrying a run over replaying a batch. Bound your loop with a hard iteration cap, because your model has no internal reason to stop; Anthropic's guidance puts a maximum iteration count in your stopping conditions for exactly this reason. Then add a retry budget. If your fleet is already failing, your correct behaviour is to stop adding attempts and start shedding.
How do you trace a system that never takes the same path twice?
You propagate one trace identifier across every hop, and you correlate outcomes at the business level, because your path will never repeat and your identifier is the only thing that will.
A trace that begins at your HTTP handler and ends at your tool call is a partial trace. Your incident usually lives at the seam: which run claimed your ticket, which prompt version it used, and whether the effect landed. Four traces exist across your queue, model, tool and database, and none carries the ticket ID, so your incident review cannot answer which run sent the email.
That is the question your first bad week asks, and a trace that stops at your service boundary cannot answer it.
W3C Trace Context defines traceparent and tracestate headers, with a 16-byte trace ID and an 8-byte parent ID, and requires every tracing tool to propagate them so your trace survives across vendors and process boundaries.
OpenTelemetry now publishes GenAI semantic conventions for spans, metrics and events, including conventions for MCP, so your model call and your tool call can live in the same trace as your queue receive and your database write. Those conventions are still moving, so adopt the shape and do not bet your schema on every attribute name.
Then add the layer your standards do not give you: your business identifier. Put your ticket ID, your order ID, and your idempotency key on every span. When your reconciliation job finds a refund your CRM does not know about, you want to search by order and get the run, not search by time and get forty thousand spans.
Why is a prompt change a rolling upgrade?
Because your in-flight runs hold a prompt, a model, a tool schema and a checkpoint, and changing one of them mid-run is version skew in a stateful service.
You would not deploy a schema change and let half your running transactions use the old code path. You do it with prompts every week, because your change looks like text.
Anthropic's agents are stateful webs of prompts, tools and execution logic that run almost continuously, so a deploy can catch one anywhere in its process. Their answer is rainbow deployments: shift traffic gradually from old to new while both versions keep running, so no in-flight agent is disrupted.
Kubernetes solved the general form years ago, and you should copy the answer because it makes skew a documented property instead of an accident. kubelet must never be newer than kube-apiserver, and may be up to three minor versions older (only two for kubelet below 1.25). The rule is not keep everything identical
but bound the skew, and know which direction is safe
.
Temporal applies the same idea to your long-running executions: Worker Versioning pins each workflow execution to the Worker Deployment Version it started on, so your run finishes on the code it began with while your new runs go to the new version. Pin the tuple — prompt hash, model ID, tool schema version — to the run at start, record it in your checkpoint, and let the run finish on it. Your new runs get your new tuple.
Two consequences follow for your deployment. You need to run two versions at once for longer than your p99 run duration, which is a deployment constraint, not a prompt-management feature. And your evaluation has to score a run against the version it used, or your regression looks like a random bad day.
How do you apply backpressure when the slow part is a model?
You shed work before it enters your system, because your queue is not absorbing load — it is storing a bill.
Your usual queue argument assumes work is cheap and uniform. Agent work is neither. One run may take four seconds and two thousand tokens; your next may take four minutes and eighty thousand. Anthropic reports that agents use roughly 4× the tokens of a chat interaction, and multi-agent systems roughly 15×. Your backlog is a backlog of money as well as time, and your cost curve is not linear in queue depth.
Your mechanics are ordinary. Cap concurrency per tenant so one customer's ticket spike cannot starve your other tenants. Cap in-flight work per dependency, so your payments API does not take every worker's retry storm at once. Reject at admission when your queue is past a threshold, with a retry-after that tells your caller something true. Measure queue latency, not queue length, because a hundred small items and a hundred large ones are different incidents.
Where your model changes the calculus is your tail. A model call that usually takes two seconds can take forty under load, and your long runs hold your worker, your connection, and your context. Your concurrency budget has to be sized on your tail, not your mean, which means you will run at what looks like low utilisation. That is not waste; it is your headroom, and it keeps your spike from becoming your outage.
Your queue-versus-log decision underneath — whether you need per-key ordering or just work distribution — belongs to queues and log-based streams, and it is worth settling before you tune anything. What matters here is simpler: once your model is your slow part, admission control is part of your agent design, not a platform-team concern.
What should you build first?
Build your effect ledger first, then ownership, then deadlines, then tracing, then versioned deploys, then admission control — in that order, because each one needs the record the previous one creates for you.
- Your effect ledger. One row per intended effect, keyed by your logical intent, written before your call and updated after. Every later control reads it.
- Your ownership. A lease with an owner, an expiry, and a version on every work item. No second worker acts without winning your conditional write.
- Your deadlines. One budget per work item, inherited by every hop, checked before each irreversible step.
- Your tracing. One trace ID across your queue, your model, your tool and your database, plus your business ID and your idempotency key on every span.
- Your versioned deploys. Pin your prompt, model and tool schema to the run; keep two versions running longer than your slowest run.
- Your admission control. Per-tenant concurrency, per-dependency caps, and a refusal that arrives before your work does.
You can ship these in a quarter. You cannot ship them after your incident, which is where you discover which one you skipped.
Your order matters because your failure modes compound. Your effect ledger without ownership gives you two records of one refund. Your ownership without deadlines gives you a lease that expires while your model is still thinking. Your tracing without an idempotency key gives you a beautiful trace of your duplicate.
And the last argument is the one worth carrying into your design review. A distributed system that retries indefinitely does not recover when you fix your cause; it recovers when you remove the load that sustains your failure. Your agent fleet has more retry layers than any service you have operated before, and your model adds one you cannot read. Design your fleet so that your fix is a decision you make, not a wait you endure.
Related Reading
Designing AI Agents: An Architectural Guide
An agent is a control loop over tools.
How to Design a Distributed System: Six Decisions in Order
You design a distributed system by making six decisions in order — where state lives, how many copies exist, how those
How to Design Reliable AI Systems: A Reliability Sequence
The demo works.