newsfilter
← Interviews
AI Engineer23 min

Your Sub-Agents Are a Distributed System. Treat Them Like One. - Girish Konda, Microsoft

Girish Konda

Conference Presentation, Lecture, Webinar
  • The presenter, Girish, a principal software engineer at Microsoft, defines subagent architectures as distributed systems where an orchestrator splits tasks among concurrent workers that share mutable state (repos, databases, vector stores) and execute tool calls with real side effects.

  • Failure Models:

    • Crash-stop: The process fails and stops; this is handled easily when an error is explicitly thrown.
    • No Reply (Timeout): Distinguishing between a slow process, a crashed process, and a lost reply is impossible in asynchronous systems (FLP impossibility result), making timeouts a form of "suspicion" rather than a definitive failure state.
    • Byzantine-like behavior (Partial Failure): A sub-agent may return fluent, success-looking text without completing the work or hallucinating, making the "half-finished" state indistinguishable from a successful completion based on output text alone.
  • Dirty Reads:

    • Workers read from a shared context where an inference or "guess" by one agent is immediately visible to others without isolation.
    • A quorum of agents reading the same unverified data does not guarantee accuracy, as all agents may independently validate the same incorrect premise.
  • Consistency Model Proposal: "SAVE HANDOFFS":

    • S (Source Feeds): Every fact passed between agents must include provenance (source, version, timestamp) to distinguish observations from inferences and enforce freshness checks before use.
    • A (At Most Once Effects): Side effects must have unique identities with single-use approvals (acting as fencing tokens) to prevent retries from causing duplicate actions or re-playing stale contexts.
    • F (Fan-out Budgets): Orchestration must include explicit quotas and bounded waits for downstream resources (e.g., cold starts, package managers) to prevent unbounded concurrency from causing service degradation.
    • E (Explicit Outcomes): Handoffs must return named states (e.g., "stale," "unknown," "refused") rather than raw text, with the orchestrator enforcing schema and logic checks in code rather than trusting the agent's confidence.
  • Implementation Specifics in "MCP Pacemaker":

    • Timeouts are recorded only when a server is confirmed alive; otherwise, the outcome is labeled "unknown" to preserve the ability to distinguish between a slow process and a crash.
    • Uncertain tool calls are never replaced during server restarts; they are drained and explicitly marked as "potentially excluded" to avoid losing state.
    • Fan-out is controlled by gating resource-heavy starts (e.g., npm installs) to a maximum of two concurrent tasks with a 15-second bounded wait.
  • Limitations of the Model:

    • The model does not guarantee fact correctness; it only ensures source traceability and prevents duplicate side effects.
    • It does not support global ordering across workers, only causal ordering per fact.
    • It assumes a single orchestrator; it is not suitable for systems with multiple competing orchestrators without a central coordination point.
    • Overhead is introduced via freshness checks and refusals, trading latency for consistency and availability.
  • Key Takeaways for Sub-agent Systems:

    • Treat sub-agent handoffs as network calls subject to partial failures, slowness, and duplication.
    • Return structured status codes (including "partial" and "unknown") rather than relying on text content to convey completion state.
    • Enforce consistency guarantees (idempotency, freshness, provenance) in the orchestrator's code, not within the agent's prompt or logic.