I gave one buggy piece of code to a three-agent AI swarm. Then I gave the ship-or-hold decision to a five-perspective debate. Both runs were real, used free-tier calls, and took less than five seconds each. Both produced useful work, and both got things wrong. This post walks through what came back, where the mistakes were, and how to set the workflow up so the mistakes are easy to catch.
The tools are zambo_swarm and zambot_swarm_debate on the Zambo MCP server (https://zambo.dev/mcp, no API key). Any MCP client that speaks Streamable HTTP can call them: Claude, ChatGPT connectors, Cursor, CrewAI, or a plain JSON-RPC script. I used a script so I could keep the raw responses.
The code under review
This is a small TypeScript handler for MCP session IDs, with real bugs left in on purpose:
const sessions = new Map<string, number>();
export function handle(req: Request): Response {
const sid = req.headers.get("mcp-session-id");
if (!sid) {
const id = Math.random().toString(36).slice(2);
sessions.set(id, Date.now());
return new Response("{}", { headers: { "Mcp-Session-Id": id } });
}
if (!sessions.has(sid)) return new Response("unknown session", { status: 400 });
return new Response("{}");
}
There are three problems a reviewer should find:
Math.random()isn't a secure source for session IDs.- Sessions never expire, so the map grows forever.
- The MCP Streamable HTTP spec says a server should answer an unknown or expired session ID with 404 Not Found. Clients treat a 404 as the signal to start a new session. This code returns 400.
Step 1: the swarm (division of labor)
zambo_swarm takes a goal, up to four roles, and a depth. I asked for coder, security_reviewer and critic at depth: "deep":
{
"goal": "Review this MCP session handler for security and spec bugs: <code>",
"roles": ["coder", "security_reviewer", "critic"],
"depth": "deep"
}
The call returned in about 4.5 seconds. The response had swarm_size: 3, one output per specialist, a coordinator synthesis, and a receipt link (https://zambo.dev/run/ae4595d5-1eb1-42e2-8d57-f13a884315f8).
What it got right. All three outputs flagged Math.random() and the missing expiry. The security reviewer's output (about 2,300 characters) was the strongest. It gave a prioritized fix list: use crypto.randomUUID(), add a TTL with eviction, and cap the size of the map.
What it got wrong:
- The coder's output was cut off at 85 characters, mid-sentence. Only two of the three specialists produced usable output, and the response didn't mention that.
- The critic said the spec "requires a 401 or 403" for an unknown session. That's wrong; the spec says 404.
- The security reviewer said "410 Gone or 404 Not Found." It was half right.
- The synthesis table said "MCP spec is case-sensitive" about header names. HTTP header names are case-insensitive, so reading
mcp-session-idand writingMcp-Session-Idis fine. The coordinator kept the critic's mistake instead of filtering it out. The synthesis was also cut off at the end.
That's the honest picture. In five seconds the swarm gave a lot of breadth. Its consensus contained one factual error about the spec, and nobody fixed the actual 400 status code.
Step 2: the debate (one decision, five framings)
A swarm splits the work. A debate argues about a single decision. I asked zambot_swarm_debate:
Should we ship the MCP session-handling fix to the client today with a known gap (no session expiry yet), or hold it one more day to add expiry and tests?
The response came back in about 4 seconds (receipt https://zambo.dev/run/81e34d09-f201-479b-87cf-ac39668b6f15). It had five framings (evolutionary biology, game theory, military strategy, behavioral economics, systems complexity), and each framing had a key move and a confidence score. It also returned a consensus, a disagreement, a decision, a falsifier, and a 48-hour experiment with a success condition.
The useful part was the structure around the answer. The decision was "ship today behind a feature flag to a small cohort, schedule the expiry patch next sprint". It came with a falsifier: "if within 48 hours the session store grows beyond a threshold, latency spikes, or a security incident occurs, the strategy is invalidated." That's a decision you can check later, not just an opinion.
The problems, read straight from the response:
provider_statuswaspartial_fallback. The behavioral economics frame hadfallback: true, and its key move was a generic line about "loss prevention" that had nothing to do with the question. That leaves four real framings, not five.- The
dominant_domainwas systems complexity, and its key move was "pause the release". The final decision was "ship today." So the debate's top-weighted voice and its conclusion point in opposite directions, and the response doesn't explain why. - The 48-hour experiment rolls out to 5% of users "with the flag off". Read literally, that means you'd be testing nothing.
How to use these tools without being fooled
The receipts are what made this review possible. Each specialist's output and each framing is stored under the run's receipt, so I could point to exactly which agent said "401 or 403" instead of arguing with a blended summary. Anyone can check that a receipt hasn't been edited:
curl -s https://zambo.dev/api/v2/receipt/ae4595d5-1eb1-42e2-8d57-f13a884315f8/verify
The response includes canonical_bytes and output_hash. The SHA-256 of the decoded bytes equals the hash, and both receipts above returned verified. To be clear about what that proves: the output is unchanged since it was recorded. It doesn't prove the output is correct. The swarm's own receipts still contain the 401/403 claim.
The workflow I'd recommend:
- Run the swarm for breadth. Use it to get every angle in a few seconds.
- Check each specialist on its own. If one output is suspiciously short (like the 85-character coder output), treat that role as missing.
- Check every spec or standard claim against the source. The swarm doesn't know which of its claims are confident and which are made up. Here it took one look at the MCP transport spec to settle 404 vs 401/403/410.
- Use the debate for the decision, not the facts. Its falsifier and experiment are the part worth keeping. Check whether
provider_statussaysfallbackand whether the dominant domain agrees with the decision before you trust the consensus. - Give the reviewer the receipt links, not your summary of them.
More patterns are on the swarm workflow page and the second-opinion verification workflow.
Free limits (what I hit)
zambo_swarm: one free call per network per UTC day, then three continuation calls shared across all tools. I had already used my continuations today, so a second swarm run would have been refused. I didn't run one, which also means I couldn't check whether the truncated coder output happens every time. Treat it as seen once.zambot_swarm_debate: the response reported1/3 used today, so there are three free debates per 24 hours on this path.- Refused calls: they return
payment_requiredwithquota_burned: false. The job is saved, so you can retry later.
If you run swarms all day (a code-review queue, a daily decision log), the free tier won't be enough. A Day Pass is $0.99 for 24 hours, the Zambo Pass is $29 for 30 days, and Lifetime is $250. A pass removes the daily cap on both tools. It doesn't make the output any more correct, so keep step 3 either way.
Takeaways
- A three-agent swarm found the obvious bugs in five seconds. One agent's output was truncated, and the synthesis repeated a wrong claim about the spec.
- The debate gave a decision you can check later: a falsifier, a 48-hour experiment, and a success condition. Its dominant framing disagreed with its own conclusion, and one of its five framings was a fallback.
- Per-specialist receipts let you blame the right agent and show a reviewer exactly what was said.
- Check spec claims by hand. Both tools sounded confident about things that were wrong.
Setup for any MCP client: zambo.dev/add.
About the author
- Trust layer for AI work. Verifiable receipts for every AI tool call. MCP at https://zambo.dev/mcp
Comments
Join the discussionNo comments yet. Be the first to comment.