# "Your Sub-Agents Are a Distributed System. Treat Them Like One. - Girish Konda, Microsoft" <!-- ref: @content/youtube/aie/your-sub-agents-are-a-distributed-system-treat-them-like-one-girish-konda-microsoft tags: [sub-agents, distributed systems, consistency models, idempotency, failure detection, orchestration, MCP, A2A] version: 2 updated_at: 2026-11-22T12:09:12.670Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=DxP5aW4VknQ)** # Your Sub-Agents Are a Distributed System. Treat Them Like One. - Girish Konda, Microsoft *Synthesized from Girish Konda's talk on AI Engineer, 2026-11-10.* Girish, who introduces himself as a chief software engineer at Microsoft and author of open-source agent tooling including the MCP pacemaker bridge supervisor, presents alone and says his views are his own. The transcript is a rough machine translation, so some terms (for example "hedge token" for a fencing token) may be garbled. ## Core Thesis Girish argues that an orchestrator fanning work out to parallel sub-agents that share state and call real tools is a classic distributed system, yet agent frameworks reduce it to a function that takes a string and returns a string. The failures are therefore the old ones (partial failure, dirty reads, unbounded retries, repeated side effects), and the old remedies apply. He packages them as a consistency model he calls "safe transfer." ## Key Insights - **Four failure classes.** Partial failure (a sub-agent returns success-looking text after doing little), dirty reads from one shared context, unbounded branching when a busy service returns 429 or 503 and the orchestrator simply launches another worker, and retries that redo side effects. - **Same output, different work.** In his alert-triage example, three paths all labeled an alert safe with equal confidence: one compared telemetry to a known-safe set, one matched a name it had seen before, and one did nothing. Downstream readers cannot tell them apart. - **Timeouts are suspicion, not facts.** From the caller a timed-out request looks identical whether the worker is slow, crashed or the reply was lost (FLP 1985; failure detectors from Chandra and Toueg, 1996). In his bridge, a server loading for the first time hit a 30-second timeout though it was only slow, fixed with a separate initialization timeout; a crash was also wrongly masked by a later timeout record. - **Make rejection and partial a value.** A sub-agent should return what it did, what it did not do, evidence and side effects. A2A tasks can end completed, failed, canceled or rejected; an MCP tool result carries an error flag, yet text can still claim completion. "Tested and answered no" differs from "could not test." - **Quorum fails on shared context.** In the example where one sub-agent writes an unmeasured "error rate dropped 80%" and two others build on it, three agreeing artifacts are one unverified sentence read three times. Quorum needs independent copies, which agents sharing a context are not. - **Safe transfer, letter by letter.** Source feeds (each fact carries source, version, revision and three timestamps: relevant, read, used); At-most-once effects (an identifier and one-time permission per action, then read back the result); Fan-out budgets (each node gets a gate and bounded weight, refusal counted as an error); Explicit outcomes (every transfer ends in a named state, with time and cost recorded). - **Freshness example.** With a five-minute limit, data arriving at 9:05, read 9:06 and used 9:07 is accepted; an addition at 9:15 is rejected and requires a fresh read. - **Delivery semantics.** At-most-once, at-least-once, or exactly-once via a dedupe key; MCP's idempotence hint is only a hint and defaults to false. His bridge marks unanswered calls at restart as "potentially excluded" and never replays them. "Sent" is not "confirmed"; confirmed means the effect is observed. - **Fencing tokens.** Citing Kleppmann's distributed-locking post, a paused client holding an expired lease can write anyway; a monotonically increasing token rejects stale writers. Approval should be a one-action, one-use token checked at entry. - **Flow control.** Concurrent cold starts through npx shared one package cache and failed on npm lock contention. His fix: a gateway of two cold starts at a time, waiting at most 10 seconds, then proceeding unguarded (documented as an availability choice), plus a per-session cap that rejects after 10 seconds. Reserve capacity before the synchronous start, not after. - **Treat output as untrusted.** The orchestrator checks in code that the result matches a pattern, has confirmation and is fresh. Example: a claim that the rate fell from 10 errors per 1,000 to 6 per 600 fails recomputation, since both are 1%. - **Limits.** Safe transfer does not make facts true, give exactly-once delivery, roll anything back (compensation as in the 1987 Saga paper), or give global ordering. It picks consistency over availability (CAP, PACELC). It is overkill if a human reads a draft before execution, and assumes a single orchestrator. ## Actionable Takeaways 1. Treat every hand-off to a sub-agent as a network call that can break midway, run slowly or return twice. 2. Return a status (partial, outdated, unknown) alongside text, or the orchestrator will read everything as completed. 3. Store each shared fact as a record with source, version and read/use times, and re-check freshness at the moment of use. 4. Give each side effect an identity and a single-use approval, and read the effect back before declaring it done. 5. Cap parallel fan-out (his example: two concurrent cold starts, 10-second wait) and count refusals as failures. 6. Validate sub-agent claims with code, such as recomputing numbers, rather than a warning paragraph the same model could skip. ## Notable Quotes > "A subagent that has not completed its work does not generate an error." — Girish Konda > "So, time-out is suspicion." — Girish Konda > "This is one unconfirmed sentence, read three times." — Girish Konda > "Sent does not mean confirmed." — Girish Konda --- *Related: `@protocol/memento` · `@content/youtube/yifan-bth/we-are-missing-the-point-of-mcp-its-not-just-about-tools` · `@content/youtube/yifan-bth/i-reverse-engineered-claude-code-learn-these-agent-tricks` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/cole-medin/ai-makes-us-way-faster-but-fries-our-focus-heres-what-i-do-about-it`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*