skip to content
$cat multi-agent-orchestration-distributed-system.md

Multi-Agent Orchestration Is a Distributed System

19 min readby MDflowview as .md
An emerald wireframe hub node on the left linked by three glowing conduits to three worker nodes on the right — one conduit carrying a sealed hexagonal token, one broken mid-span and dissipating into particles, one looping back on itself — with all three workers drawing faint threads down to a single shared translucent slab, on a dark terminal grid

An orchestrator splits a task three ways. Three sub-agents run at once. They all read the same shared state — the conversation, the memory files, the repository, the open work trees, the vector store — and they do not only think. They make tool calls against databases, APIs, CI and deployment pipelines. Their results come back and the orchestrator merges them into one answer. That is multi-agent orchestration as most teams are shipping it right now.

It is also a distributed system. A coordinator, concurrent workers, shared mutable state, and a merge. The difference is that the distributed systems you are used to arrived with timeouts, status codes, isolation levels and idempotency keys already in the box. This one arrives as a function that takes a string and returns a string.

TL;DR — Multi-agent orchestration is an orchestrator-worker distributed system, and it inherits the classic failures — partial failure, lost replies, dirty reads, unsafe retries — without inheriting any of the machinery built to survive them. Girish Konda, a principal software engineer at Microsoft, made that case at AI Engineer in November 2026 and proposed a consistency model for sub-agent handoffs: every fact carries its source and its age, every side effect has an identity and is read back rather than replayed, fanout is budgeted, and every handoff ends in a named state instead of a paragraph. MDflow is somewhere those records can live: markdown documents with version history, a cross-document log of what each agent token actually changed, and an MCP surface that declares per tool whether a retry is safe.

Why multi-agent orchestration is a distributed system

Because it has the four structural properties that define one, not because the analogy is pretty. An orchestrator that splits work and merges results. Workers that execute concurrently. State all of them read and write. Side effects that reach real systems. That shape has a name and about fifty years of literature behind it.

Konda — speaking personally, with an explicit disclaimer that the views are not their employer's — framed the talk around a single observation: none of the failures hitting sub-agent systems are new, and none of them are specific to AI. They are the ones distributed systems engineers have names for. What is new is that the setup arrived without any of the instrumentation, and the people assembling it are often not reading it as a distributed system at all.

Four failures carry most of the weight.

Failure 1: a half-finished sub-agent still returns a success

The hardest case is not the sub-agent that crashes. It is the one that answers fluently and is wrong.

A crash is friendly. A process that was running correctly stops and stays stopped, you get an error, and you handle it. The hard case is the one from the Byzantine generals problem: a component that reports conflicting information. It is not malicious. From the outside it is indistinguishable from one that is.

Konda's illustration, carried over from one of their earlier talks, is an agent triaging alerts. Three alerts come back classified benign with the same confidence. The first sub-agent genuinely pulled the telemetry and compared it against a known non-benign set. The second matched the alert title against something it had seen before. The third did no work at all. Nothing downstream can tell these apart, because a sub-agent that half-finished does not raise — it returns normal-looking text with the same type as a success.

The orchestrator can read the conclusion. It cannot read how much work was behind it.

Failure 2: a timeout is a suspicion, not a verdict

When the reply does not come, three different worlds look identical: the sub-agent is still working, it crashed and the reply was lost, or the reply is merely late.

This is not a tooling gap you can close with a better client. The FLP impossibility result (Fischer, Lynch and Paterson, 1985) showed that in an asynchronous system with even one faulty process, agreement can fail to terminate. Chandra and Toueg's 1996 answer was failure detectors that are allowed to be wrong: they suspect, they do not know.

Konda hit this from both directions in MCP Pacemaker, the supervised bridge they maintain for keeping MCP servers running. A server whose first run downloads itself blew a 30-second call timeout and looked broken — it was slow, not dead; the fix was giving initialize its own timeout. Then the reverse: a server crashed mid-call, the call timed out, and the timeout overwrote the exit code that explained the crash. The fix was to record the timeout only when the process was still alive.

The rule that falls out of both: record a timeout as unknown, and keep the real cause when you have one. Collapsing "it failed" and "I could not find out" into one status is how you lose the only information that tells you what to do next.

Failure 3: dirty reads turn one guess into three agreeing artifacts

Shared context makes an unverified sentence readable the instant it is written, and nothing marks it as unchecked.

The 1995 critique of ANSI SQL isolation levels defines a dirty read as reading a value before the writer commits or rolls back. Databases spent decades building isolation to prevent exactly this. A shared agent context has none of it.

The shape of the failure: one sub-agent writes "the error rate fell by 80%" into shared context. It did not measure that — it inferred it. A second sub-agent reads the context and picks the sentence up. A third reads it and uses it as the reason to proceed. The orchestrator merges three artifacts that agree.

They agree because they are the same guess, read three times.

Which is why the obvious fix — ask three sub-agents and take the quorum — does not work here. Quorums work for a specific structural reason. In Gifford's 1979 weighted voting, the read quorum plus the write quorum exceeds the total, so every read is forced to overlap the latest write. The overlap is the guarantee. Three sub-agents reading one shared context are not independent replicas, and nothing forces them to overlap anything. Their agreement is one source counted three times.

Failure 4: a retry re-runs the side effects

In a normal service you build idempotency so retries are safe. Retrying a sub-agent re-runs the whole task, side effects included.

Birrell and Nelson's 1984 RPC paper set the baseline that still holds: if the call returns, the procedure ran exactly once; if you get an exception, it ran once or not at all, and you are not told which. So you choose a delivery semantic deliberately — at-most-once (never retry, accept loss), at-least-once (retry, accept duplicates), or exactly-once (retry, then deduplicate on an identity you supplied).

Nothing in the agent stack chooses for you. In the Model Context Protocol, the idempotentHint annotation is optional, defaults to false, and is only meaningful when readOnlyHint is false. The specification is blunt about what it is worth: all properties in ToolAnnotations are hints, they are not guaranteed to faithfully describe tool behavior, and clients should never make tool-use decisions based on annotations from untrusted servers.

So if you need it, you build it. Give every side effect an identity. Bind the approval to that exact action, and spend it once. After the call, read the effect back by its identity — submitted is not confirmed.

The same discipline covers pause and resume, which sub-agents do constantly. A lease is a lock with a timeout, and Martin Kleppmann's post on distributed locking shows what happens when a client pauses while holding one: the lease expires, someone else takes over, and the first client wakes up and writes anyway. Kleppmann's fix is a fencing token — a number that increases on every grant, with storage rejecting any write carrying an older one. Treat an approval the same way: one action, one use, checked at the gate, not remembered in the prompt.

The contract that contains them

Konda's proposal is a consistency model for handoffs, called SAFE — presented explicitly as the one they use for their own agents, not a universal standard. The four rules:

  1. Facts carry their source. Every fact a worker hands on is a record, not a sentence: what it was read from, at which version, when the data was current, when it was read, and when it was used. Freshness is checked at the moment of use, against a stated limit — a read that was fine for a decision eight minutes ago is rejected for a decision now, and the next decision needs a fresh read. This is also the line between an observation and an inference: an observation has a source and a read time, an inference has neither.
  2. Effects happen at most once. Identity on every write, one approval bound to one exact action, and the outcome read back rather than replayed. Where the answer is genuinely unknown — a call still unanswered at the deadline — say so, and tell the caller to go and check.
  3. Fanout is budgeted. Each downstream gets a gate, a bounded wait, and a refusal the orchestrator can actually see. Konda's bridge learned this the hard way: many sessions cold-starting through one shared package cache all failed with a lock error. Nothing was wrong with any single request. The concurrency was the failure. The gate that fixed it admits two cold starts at a time and waits at most 15 seconds, after which the start proceeds ungated — a deliberate availability choice, made because a corrupted cache is a risk while a hung client request is a certainty, and written down as such. The separate session cap works the other way: at the cap a new session waits up to 10 seconds and is then refused, and that refusal is counted as a failure rather than disappearing into silence.
  4. Outcomes are explicit. Every handoff ends in a named state. The protocols already have the slot: an A2A task reaches a terminal state of completed, failed, canceled or rejected, or pauses in input-required; an MCP tool result can set isError. The trap is that a sub-agent can report completed while its text says something else, and a loop that reads only the text will never notice.

The fourth rule has a corollary worth stating on its own. Treat an agent's output as untrusted input — the same way you treat a request body from the internet. The orchestrator owns the checks, in code: does the result match the schema, is the evidence present, is it fresh enough, do the numbers hold when you recompute them?

Konda's example: a sub-agent reports the error rate fell, because before it was 10 errors in 1,000 requests and after it was 6 in 600. Ten became six, so the rate fell. Recompute it and both are 1%. The check refuses the claim.

And the test for whether you have a boundary at all: if the same model can skip a check and declare it passed, you have a request, not a boundary. That is the same argument as why a generator cannot be its own validator, arriving from the distributed-systems side.

What the contract does not buy

A consistency model is only useful if you know where it stops, and Konda is specific about the limits.

  • It does not make facts true. A sourced fact is checkable, not correct.
  • It does not give you exactly-once delivery. A lost reply stays unknown until something reads the effect back.
  • It does not roll anything back. Undoing a partial task is a compensation step you design — the Sagas pattern from Garcia-Molina and Salem, 1987.
  • It gives no global order across workers. Only causal order per fact, in the sense of Lamport's happened-before relation from 1978.

And it has a price, which is the usual one. CAP says that when the network splits you trade availability against consistency; this contract picks consistency for writes and refuses rather than guesses. PACELC adds that even with no failure you trade latency for consistency — every freshness check is another read, and every refusal needs somewhere to go.

Which systems need this, and which do not

Ranked by how much the contract buys you:

  1. Sub-agents that write to production. Create a pull request, update a ticket, deploy, issue a refund, change a config. Here a duplicate retry is a real duplicate and an unverified claim is a real incident.
  2. Fan-out research or triage that merges into one decision. The dirty-read problem is the dominant failure, because agreement is the thing being measured and agreement is exactly what shared context fakes.
  3. Long-running agents that pause and resume. Leases expire while they are paused. Without a fencing token, a resumed agent writes with an approval the world has moved past.
  4. Anything where a number travels between agents. Rates, deltas, percentages and counts are where "recompute it" catches the most.
  5. Draft-and-review flows where a person reads everything before it takes effect. Here most of this is overhead. The human is the boundary.

One structural limit: the model assumes a single orchestrator, because causal and session guarantees hold only while each client sticks to one place. Peer agents with no single coordinator need something else.

Where the handoff record should live

Every rule above is a claim about an artifact. A fact with a source, a version and three timestamps. An effect with an identity and a read-back. An outcome with a name and its evidence. The contract is only as good as the place those records are written — and in most setups that place is a conversation transcript, which is to say nowhere a human will read and nowhere a later agent can query.

How MDflow fits

Be clear about the boundary first. MDflow is not an orchestrator. It does not run sub-agents, enforce fanout budgets, hold leases or issue fencing tokens. Those belong in your harness. What MDflow is, is durable, queryable, human-readable storage for the records the contract produces — and an agent-facing surface that is honest about which of its own writes are safe to retry.

What lines up today

  • A fact record is a markdown document. Frontmatter carries the source, the revision and the as-of timestamp; the body carries the claim and the evidence. No schema to adopt, and the same file is readable by a person and by the next agent.
  • Version history captures every write path. The editor, the HTTP API and the MCP server all snapshot the previous body, with line-by-line diffs and a non-destructive restore. That is the "what did this handoff actually change" question, answered after the fact. It is a Pro feature, and it is deliberately not exposed over the API or MCP.
  • The Document Log is the actor trail. A cross-document feed at /log recording created, edited, shared and deleted events with the actor on every row — you for browser actions, and automated · <token name> for anything arriving through the API or the MCP server. When three agents write to the same workspace, that feed is what says which one did.
  • The MCP surface declares retry safety per tool. Of the 25 hosted tools, 7 are read-only; of the 18 writes, 12 are annotated idempotentHint: true because they replace rather than append — renaming, moving, replacing a body, updating a folder description, revoking a share. Six are annotated false: creating a folder, workspace or document, and deleting one. That is the distinction Konda is asking every tool surface to make, and it is machine-readable before the call.
  • Folder descriptions are the retrieval signal. A folder described as "handoff records — one per sub-agent task: the sourced facts it read, the effects it caused, and the state it ended in" is the vocabulary that makes the folder findable at all. mdflow_get_context ranks folder descriptions above folder and document names.
  • An orchestrator can read and write it over MCP or HTTP. Agent control is a Pro feature — the MCP server, the HTTP API and Personal Access Tokens all require it — and on Pro the connection is OAuth from Claude, OAuth from ChatGPT (in beta), or a Personal Access Token for the REST API. The record goes in from the sub-agent and comes out at the merge.

Connect Claude to MDflow: open the MDflow connector in Claude's Connectors Directory, click Connect to Claude, and sign in — no URL or token to paste. One connection covers claude.ai, the Claude desktop and mobile apps, and Claude Code signed in with a Claude subscription (MDflow Pro). Team workspaces are not reachable through the connector and use an mdt_ Team access token instead, with the bearer-header clients listed in the MCP docs.

Honest gaps. There is no compare-and-swap on the agent surface: the editor's save path checks updated_at before writing and raises a conflict, but the API and MCP write paths do not expose it, so two agents writing the same document is last-write-wins. Creating a document is not idempotent and the duplicate-title rule makes that visible rather than harmless — a retried create produces a second document with a numeric suffix, not a no-op, which is exactly why the tool is annotated false. Version history and comments are not readable over the API or MCP, so an agent auditing a workspace sees the current text and not the diffs. And nothing in MDflow validates a handoff record: if a sub-agent writes an inference and labels it an observation, the document stores it faithfully.

Where this is headed — direction, not a dated commitment. The interesting gap is between a document as prose and a document as a record an orchestrator can check: frontmatter that an agent surface understands rather than merely stores, and write paths that can refuse on a stale precondition. Both are interests, not roadmap.

The bottom line

The failures in multi-agent orchestration are not AI failures. They are partial failure, lost replies, dirty reads and unsafe retries — all of them named, all of them studied, most of them before anyone reading this wrote their first line of code. The industry has the answers. It just stopped recognising the question when the interface became a string.

Three things to change first, in order of payoff:

  1. Make every handoff return a named state, with unknown distinct from failed and "could not check" distinct from "checked and no".
  2. Make every fact carry a source and a read time, so the next agent can tell an observation from a guess.
  3. Give every side effect an identity and read it back, because submitted is not confirmed.

Then write those records somewhere a human and the next agent can both open.

Start free · Connect an AI agent · Read the API docs

Frequently asked questions

Why is multi-agent orchestration a distributed system?

Because it has the four properties that define one: a coordinator that splits work, workers that run concurrently, shared mutable state they all read and write, and results merged from those concurrent executions. Sub-agents also make real tool calls against databases, APIs and deployment pipelines, so their failures are not confined to text. The difference from a normal distributed system is that this one arrives with no timeouts you did not write, no isolation levels, no status codes and no idempotency keys — the interface is a function that takes a string and returns a string.

Why do sub-agent failures go undetected?

Because a half-finished sub-agent does not raise. It returns normal-looking text with the same type as a success, so from the outside a thorough answer, a pattern-matched guess and no work at all are indistinguishable. The orchestrator can read the conclusion but not how much work produced it. This is the hard case from the Byzantine generals problem: the component is not malicious, it is simply confidently wrong, and nothing downstream can tell.

Does asking three sub-agents and taking the majority make an answer more reliable?

Not if they read the same shared context. Quorums work because of an overlap guarantee — in Gifford's 1979 weighted voting, the read quorum plus the write quorum exceeds the total, so every read must intersect the latest write. Three sub-agents reading one context are not independent replicas. They can all pick up the same unverified sentence, and their agreement is one source counted three times.

Is it safe to retry a sub-agent after a timeout?

Only if you built the safety yourself. Birrell and Nelson's 1984 RPC paper set the baseline: a call that returns ran exactly once, and a call that raises ran once or not at all, with no way to tell which. Retrying a sub-agent re-runs the whole task including its side effects, so a lost reply can mean a second pull request. In MCP the idempotentHint annotation is optional, defaults to false, and the specification states that all tool annotations are hints that are not guaranteed to describe a tool's behavior faithfully.

What should a sub-agent return instead of text?

A named outcome plus the evidence behind it: what it did, what it did not do, what it read and when, and any side effects it caused. The protocols already have the slot — an A2A task ends in completed, failed, canceled or rejected, or pauses in input-required, and an MCP tool result can set isError. Two distinctions matter most: a timeout is unknown rather than failed, and checking a condition and getting no is a different fact from not being able to check at all.

Further reading