{"slug": "the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green", "title": "The Incident Board: Catching a Multi-Agent Bug That Leaves Every Span Green", "summary": "A multi-agent incident response system built on Amazon Bedrock and the Strands framework caught a planted log-cache key collision before it reached production because its orchestrator agent was prompted to call get_service_dependencies before dispatching specialists, which let it identify that three alerts firing within 22 seconds — payment-service CPU over 90%, auth-service latency at 5 seconds and order-service errors over 10% — all depended on the shared database db-prod-01 and treat them as one incident. The bug made requests for auth-service logs silently return payment-service logs with no exception, so every span stayed green; the demo's full code, four agents, board, tools and tests are published at github.com/maishsk/multi-agent-talk. The author, who documented the related failure mode in an OWASP Agentic AI Top 10 series, frames the design rule as \"The model decides the route. The code decides what is allowed.", "body_md": "Writing\n\n# The Incident Board: Catching a Multi-Agent Bug That Leaves Every Span Green\n\nOn this page\n\nYou build a multi-agent incident response system. It works. In testing it triages alerts, investigates them, and proposes fixes, every single time.\n\nThen you ship it. And one Thursday it executes a fix built on another service’s data, nothing errors, every dashboard stays green, and you find out from a customer.\n\nI built a talk around exactly this failure, and the whole thing is one live debugging session. This post is the heart of it: one run, start to finish, where an agent is handed the wrong data by a silent bug, and the system catches it **before** it touches production. Not because a model noticed. Because of how the agents were forced to work.\n\nLet me show you the run, and then let me show you why it stopped.\n\nAll the code in this post is real, pulled straight from the demo. The full runnable example, all four agents, the board, the tools and the tests, is on GitHub: [github.com/maishsk/multi-agent-talk](https://github.com/maishsk/multi-agent-talk). Clone it and run it against [Amazon Bedrock](https://aws.amazon.com/bedrock/?trk=d76afd77-bb62-46ac-b0a3-9dbf5ecde253), or offline with a scripted model.\n\n## The setup\n\nThree services, `payment-service`, `auth-service` and `order-service`. They all share one database, `db-prod-01`. I never tell the agents about that shared database. They have to discover it. Hold onto that, it matters twice.\n\nThe team is four agents:\n\n- an **orchestrator** that decides the route\n- **triage** that classifies alerts\n- an **investigator** that gathers logs and metrics\n- a **resolver** that proposes and executes fixes\n\nAt 14:30, three alerts fire inside 22 seconds. Payment CPU over 90%. Auth latency at 5 seconds. Order errors over 10%. Three alarms. One fire, as we will see.\n\nAnd there is one bug planted in the fake production layer. A log-cache key collision, so that asking for `auth-service` logs quietly returns `payment-service` logs instead. No exception. The call succeeds and hands back the wrong data. This is the kind of bug you actually get in production, and it is the kind your monitoring never catches.\n\n## Three alerts become one incident\n\nThe naive way to handle three alerts is a loop. Triage each one, investigate each one, fix each one. That is exactly how you end up making three changes to production for a single root cause, because nothing ever asks whether the alerts are related. I dug into that failure mode, one incident fanning out into a cascade of independent fixes, in my [OWASP Agentic AI Top 10 series](https://blog.technodrone.cloud/2026/07/aws-intro-owasp-agentic-top10.html), and in the post on [cascading failures](https://blog.technodrone.cloud/2026/07/cascading-failures-owasp-agentic-top10.html) in particular.\n\nThe orchestrator does something different before it dispatches anyone. Its prompt does not mention the database. It just tells it to be curious:\n\nBefore dispatching anyone, call get_service_dependencies for the alerting services. If they share a dependency, treat the alerts as ONE incident.\n\nAnd it does:\n\nAll three depend on db-prod-01. I’ll treat this as ONE incident.\n\nNobody wrote that branch. There is no `elif alerts_share_a_database` anywhere in my code. The model worked it out at runtime, from a dependency lookup and a prompt that told it to check before acting. That is the whole idea of the talk, in one line:\n\n**The model decides the route. The code decides what is allowed.**\n\nThe model gets judgment. Which specialist, in what order, what is related to what. Everything after this is the code half, the part that keeps the model honest. And that part lives on the board.\n\nIn [Strands](https://strandsagents.com/), an orchestrator is just an agent whose tools are other agents. Here is the whole team, built in one place:\n\n```\nb, i = tools(\"triage\")\ntriage = Agent(\n    name=\"triage\",\n    description=\"Classifies every alert of the incident and posts triage entries to the board.\",\n    system_prompt=TRIAGE_PROMPT,\n    tools=[i.classify_alert, b.read_board, b.post_triage],\n    model=model_for(\"specialist\"), trace_attributes=scope, callback_handler=None,\n)\nb, i = tools(\"investigator\")\ninvestigator = Agent(\n    name=\"investigator\",\n    description=\"Gathers logs and metrics for the incident's services and posts evidence-backed findings.\",\n    system_prompt=INVESTIGATOR_PROMPT,\n    tools=[b.read_board, i.search_logs, i.check_metrics, i.get_service_dependencies,\n           b.post_finding, b.post_correlation],\n    model=model_for(\"specialist\"), trace_attributes=scope, callback_handler=None,\n)\nb, i = tools(\"resolver\")\nresolver = Agent(\n    name=\"resolver\",\n    description=\"Proposes remediations from the board's findings and executes the safest one.\",\n    system_prompt=RESOLVER_PROMPT,\n    tools=[b.read_board, b.propose_action, i.execute_remediation],\n    model=model_for(\"specialist\"), trace_attributes=scope, callback_handler=None,\n)\n\nb, i = tools(\"orchestrator\")\norchestrator = Agent(\n    name=\"orchestrator\",\n    system_prompt=ORCHESTRATOR_PROMPT,\n    tools=[i.get_service_dependencies, b.read_board, triage, investigator, resolver],\n    model=model_for(\"orchestrator\"),\n    trace_attributes=scope,\n    callback_handler=StreamText(prefix=\"  \"),\n)\n```\n\n*Full code: [`demos/demo2_orchestrated.py`](https://github.com/maishsk/multi-agent-talk/blob/master/demos/demo2_orchestrated.py)*\n\nLook at the `tools=[...]` line on each agent. That list is the whole security model, and it is worth reading closely.\n\n## Why a board, and not a conversation\n\nHere is the question that matters. When triage finishes and the investigator starts, how does the investigator know what triage found?\n\nThe tempting answer is to pass the text along. Agent one returns a paragraph, you paste it into agent two’s prompt. That is a **[blind handoff](https://blog.technodrone.cloud/2026/07/inter-agent-comms-owasp-agentic-top10.html)**, and it is where multi-agent systems rot. There is nothing to check. “The investigator said something” is not a fact you can test.\n\nInstead, every agent reads and writes a shared `IncidentBoard`. One board per incident, never a global. It has sections: triage, findings, correlation, actions, evidence. And it is not a free-text scratchpad. Every write goes through a tool that validates it.\n\nThree rules the board enforces, and each one pays off at the end.\n\n**One: an agent only touches its own section.** Look back at those tool lists. Triage gets `post_triage`. The investigator gets `post_finding` and `post_correlation`. The resolver gets `propose_action` and `execute_remediation`. The tools are handed out per agent by `board_tools(board, author)`, so the resolver literally cannot post a finding and triage cannot propose an action. [Least privilege, but for agents](https://blog.technodrone.cloud/2026/07/identity-privilege-owasp-agentic-top10.html).\n\n**Two: every agent starts fresh and only sees what it needs.** When you use an agent as a tool in Strands, it gets a clean history on every call. The investigator looking at this incident has no memory of other incidents. It reads what it needs off the board, not from a growing pile of conversation. Scoped access, by default.\n\n**Three: a finding has to cite evidence, and evidence is minted by tools.** This is the big one. When the investigator calls `search_logs` or `check_metrics`, the tool records what it returned on the board’s evidence ledger and hands back an `evidence_id`. A finding that does not cite a real evidence ID is rejected by the board. The model cannot post a conclusion and wave at the air. It has to point at a receipt.\n\n``` python\n@tool\ndef post_finding(service: str, claim: str, confidence: float, evidence_ids: list[str]) -> str:\n    \"\"\"Post a finding about ONE service or resource, backed by evidence you gathered for it.\"\"\"\n    if service not in SERVICES + RESOURCES:\n        return _unknown(\"service\", service, SERVICES + RESOURCES)\n    if not 0.0 <= confidence <= 1.0:\n        return f\"ERROR: confidence must be between 0 and 1, got {confidence}\"\n    if not evidence_ids:\n        return \"ERROR: a finding must cite at least one evidence_id\"\n    missing = [e for e in evidence_ids if e not in board.evidence]\n    if missing:\n        return f\"ERROR: no such evidence {missing}. Gather it with search_logs or check_metrics first.\"\n    entry = board._add(\"findings\", author, service=service, claim=claim, confidence=confidence,\n                       evidence_ids=list(evidence_ids))\n    return f\"{entry['id']} posted\"\n```\n\n*Full code: [`demos/board.py`](https://github.com/maishsk/multi-agent-talk/blob/master/demos/board.py)*\n\nNotice what that evidence ledger quietly captured. For each piece of evidence, it recorded the service you **asked** for and the service the data was actually **about**.\n\nHere is the tool that mints it. The planted bug lives on one line, and the fix for catching it lives on the next:\n\n``` python\n@tool\ndef search_logs(service: str, time_range_minutes: int = 5, level: str = \"WARN\") -> dict | str:\n    \"\"\"Search recent logs for a service. The result carries an evidence_id to cite in findings.\"\"\"\n    # Chaos: a log-cache key collision serves payment-service's logs for auth-service.\n    lookup = \"payment-service\" if chaos and service == \"auth-service\" else service\n    entries = _logs(lookup, level)\n    if isinstance(entries, str):\n        return entries\n    ev = board.record_evidence(author, \"search_logs\", service, _returned_service(service, entries), entries)\n    _stamp_evidence(ev)\n    return {\"evidence_id\": ev[\"id\"], \"service\": service, \"entries\": entries}\n```\n\n*Full code: [`demos/mock_infra.py`](https://github.com/maishsk/multi-agent-talk/blob/master/demos/mock_infra.py)*\n\nThe `record_evidence` call takes two different things: `service`, the thing that was **requested**, and `_returned_service(...)`, the thing the data is actually **about**, read from the log payload itself and not from the request:\n\n``` php\ndef _returned_service(requested: str, entries: list[dict]) -> str:\n    \"\"\"Which service the data is actually about, read from the payload rather than the request.\"\"\"\n    sources = {e[\"source\"].split(\"/\")[0] for e in entries}\n    if not sources:\n        return requested\n    return sources.pop() if len(sources) == 1 else \"mixed\"\n```\n\n*Full code: [`demos/mock_infra.py`](https://github.com/maishsk/multi-agent-talk/blob/master/demos/mock_infra.py)*\n\nRemember the planted bug? When the investigator asked for `auth-service` logs, the tool returned `payment-service` data. The ledger wrote both down. Requested: auth-service. Returned: payment-service. Nobody acted on that yet. It just sat there, recorded.\n\n## The correlation\n\nThe investigator pulls logs for all three services and, because the orchestrator told it they share a database, it checks `db-prod-01`’s connection metrics too, the one call the naive loop never makes. Each pull mints evidence. Each finding cites it.\n\nThen it does the thing three separate investigations could never do. It posts a correlation:\n\npayment-service reconciliation-batch (started 14:27) is exhausting the db-prod-01 connection pool. Auth and order are starved of connections.\n\nFour findings, one shared cause, linked on the board with the evidence trail intact. Three alerts, one incident, one explanation. That is only possible because every finding is sitting in the same structured place, citing the same evidence ledger, instead of scattered across three agents’ private conversations.\n\nThe resolver reads the board and proposes two fixes: pause the batch job hogging the connections (low risk), or raise the connection limit (high risk). Its confidence on each is not the model’s opinion. The board computes it from the findings the action cites. The model does not grade its own homework.\n\nIt picks the low-risk option and tries to execute.\n\n## The gate\n\nBefore anything touches production, a deterministic check runs. Not a model. A plain function that walks the board and asks boring questions. Does every finding cite evidence? Is confidence above the bar? And the one that matters here: does every piece of evidence come from the service it claims to?\n\nThat function is 10 lines, and there is not a model in sight:\n\n``` php\ndef check_handoff(board, action) -> list[str]:\n    problems = []\n    for ev in board.evidence.values():\n        if ev[\"returned\"] != ev[\"requested\"]:\n            problems.append(f\"{ev['id']}: asked for {ev['requested']} data, got {ev['returned']}\")\n    for f in (board.findings[fid] for fid in action[\"finding_ids\"]):\n        if f[\"confidence\"] < MIN_CONFIDENCE:\n            problems.append(f\"{f['id']}: confidence {f['confidence']} < {MIN_CONFIDENCE}\")\n        if not f[\"evidence_ids\"]:\n            problems.append(f\"{f['id']}: no evidence cited\")\n    return problems\n```\n\n*Full code: [`demos/checks.py`](https://github.com/maishsk/multi-agent-talk/blob/master/demos/checks.py)*\n\nIf that list comes back non-empty, nothing executes. On our run it comes back with one entry, and the resolver’s execute call is refused:\n\n```\nBLOCKED: ev-2: asked for auth-service data, got payment-service\n```\n\nStopped. The resolver does not retry, it [escalates to a human](https://blog.technodrone.cloud/2026/07/human-trust-owasp-agentic-top10.html), because the tool told it to. No production change.\n\nWalk back through what just happened. The silent bug handed the investigator the wrong logs. The investigator, acting in good faith, turned that into a finding. The finding fed the correlation. Every agent did its job correctly. The data was [poisoned](https://blog.technodrone.cloud/2026/07/memory-poisoning-owasp-agentic-top10.html) three steps upstream, and the only reason it did not reach production is that the evidence ledger recorded where every fact actually came from, and a dumb deterministic check read that ledger before letting anyone act.\n\nNow the part that should keep you up at night. Here is the trace summary for that run:\n\n```\n4 agent invocations · 25 tool calls · 0 spans with error status\n```\n\n**Zero spans with error status.** Every dashboard you own is green. The bug did not throw. It returned the wrong answer successfully. Standard observability would never flag this, because standard observability watches for red, and nothing here is red. The agent was confidently, provably wrong, with green spans all the way down.\n\nThe gate caught it because it checks the **data**, not the status code.\n\n## What to take home\n\nThe agents were never the hard part. The coordination was. If you are building multi-agent systems, the board is how you make the coordination something you can actually inspect:\n\n1. **Give each agent its own section and its own tools.** Least privilege for agents. The resolver cannot invent findings. Triage cannot push to production.\n2. **Make evidence a first-class thing, minted by tools, cited by findings.** A claim with no receipt gets rejected. And record what each tool asked for versus what it returned, because that gap is where the silent bugs live.\n3. **Put a deterministic gate in front of production, and make it check the data, not the status.** The model is allowed to be wrong. The gate is the thing that is not.\n\nModel decides the route. Code decides what is allowed. Get that split right, and a silent data-poisoning bug turns into a blocked action and a page to a human, instead of a 2am incident you hear about from a customer.\n\nYour dashboards will tell you when a span goes red. They will not tell you when an agent was confidently wrong. For that, you need to have written down where every fact came from. That is what the board is for.\n\nI would be very interested to hear your thoughts or comments, so please feel free to ping me on [Twitter](https://x.com/maishsk) or [LinkedIn](https://www.linkedin.com/in/maishsk/).\n\nIf you have shipped multi-agent systems and hit silent-success bugs in production, I would especially love to hear how you caught them.", "url": "https://wpnews.pro/news/the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green", "canonical_source": "https://blog.technodrone.cloud/2026/10/why-multi-agent-systems-fail-production.html", "published_at": "2026-10-14 00:00:00+00:00", "updated_at": "2026-11-12 17:54:26.460347+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "mlops"], "entities": ["Amazon Bedrock", "Strands", "payment-service", "auth-service", "order-service", "db-prod-01", "OWASP Agentic AI Top 10", "github.com/maishsk/multi-agent-talk"], "also_reported_by": [], "takeaway": "Prompting the orchestrator agent to call get_service_dependencies before dispatching specialists let it collapse three alerts into one incident on db-prod-01 and catch a silent log-cache key collision that returned payment-service logs for auth-service requests before any fix reached production.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green", "markdown": "https://wpnews.pro/news/the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green.md", "text": "https://wpnews.pro/news/the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green.txt", "jsonld": "https://wpnews.pro/news/the-incident-board-catching-a-multi-agent-bug-that-leaves-every-span-green.jsonld"}}