Skip to content
echogeco
Harnesses and multi-agent workflows · Multi-agent

Fan out the audit or run it serially?

Lay out a code audit across 24 services as subagents, one serial run or a mix, with the brief, the return schema and the token count.

designmediumExercise · 3 min · 64 of 77
On this page

An audit across many services looks like the textbook case for subagents until one shared library turns independent reads into dependent ones. The design has to find that dependency before it splits the work.

The situation

A security review is in 30 hours. The platform team must show that no service logs a full card number: every handler that touches card data must mask the number before any log call. There are 24 services, each with about 30k tokens of relevant code: handlers, logging setup and the payment client. Six of them log through a shared wrapper library, auditlog, about 10k tokens, which is supposed to do the masking for them; nobody has checked that it does. The reviewers want, per service, a verdict, the files read, and each violation with file, line and the offending code.

Assume a 200k-token window, P_in = $3 and P_out = $15 per million tokens, and that an agent reading 30k tokens of code over its own turns consumes about 80k input tokens and writes about 2k.

The question

Design the audit — serial, fanned out, or a mix — with the brief, the return schema and a token count, and say what would make you change the design.

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open