Lion Cipher Lab
Measure exactly when a subagent is worse than an inline call - build the same alert-triage job both ways, sweep it from 12 to 480 alerts, and find the three separate crossovers in cost, latency and quality
- AI Security
- Intermediate
- ~95 min
- Free · no account required
Why it matters
The fashionable answer to almost every agent problem is to delegate it to a subagent, and it is very often the wrong answer. Over-engineering an agent system is not a hypothetical risk - it is the industry's actual failure mode. Teams build a parent, three children, a message schema and a merge stage to do a job that one loop and a bigger prompt would have done cheaper, faster and better, and nobody publishes that result because 'we deleted the orchestration layer' is not a conference talk. So this lab measures it, on a real security workload, three separate ways, and the measurements do not…
What you'll learn
- building the SAME real security task two ways - inline (one agent, one growing context) and delegated (a subagent per unit, with a constructed brief and a result contract) - over one seeded corpus, one scorer and one shared coin, so the only thing that differs between the arms is the architecture
- itemising the BRIEFING COST to the token: the task statement, the reference table, the worked examples and the contract, all re-sent to every child, plus the re-ask traffic contract violations cause - 14,615 tokens of a 27,172-token run, 53.8 per cent, with re-asks the single largest line item
- reading a DECLARED BILLING MODEL correctly - a call is charged for the whole window plus what it generates - and understanding why that makes one growing context cost quadratically while a fleet of children costs linearly
- finding a CROSSOVER POINT with a fourteen-size sweep rather than asserting one, and discovering that cost, latency and quality cross at 48, 24 and 384 alerts respectively, so 'should I delegate?' has three different answers depending on which you are paid to optimise
- naming the band nobody plots: everything from 48 to 383 alerts where delegation is cheaper AND faster AND materially worse, finding 16 real intrusions instead of 28 on the same 144 alerts
- measuring the three failure modes a round trip adds that an inline call does not have - a result truncated in transit (3 of 12, 2 alerts silently lost), a contract violation needing a re-ask (3 of 12, 5,914 tokens), and a child that satisfied the contract perfectly while answering a subtly different question
- proving that delegation deletes a capability rather than just costing tokens: nine verdicts the inline agent REVISED when later evidence arrived, which no subagent can ever revise because the child that made the decision no longer exists
- separating what is MEASURED from what is MODELLED in a latency claim, and showing with a sensitivity sweep that the wall-clock crossover moves from 24 alerts to 240 on a single implementation detail while the cost and quality crossovers do not move at all
- the judgment to say NO to a subagent - a four-clause decision rule with numbers behind every clause, and the discipline of keeping the inline baseline in the pipeline forever so you notice the day your orchestration layer became overhead
Steps in this lab
- The words first - and the argument this lab is about to make against its own family
- Open a terminal and make a scratch folder (Windows, macOS and Linux)
- Generate the workload: one shift of 480 alerts whose right answer you already know
- The meters: a token proxy, a billing model, and the one number in this lab that is invented
- The triage engine is a DETERMINISTIC STUB - read this before you paste it
- Both architectures in one file, so nothing can hide in a difference you did not intend
- ARM A - run it inline: one agent, one window, and it changes its mind nine times
- ARM B - run it delegated, and itemise every single token the briefing costs
- The three failure modes the round trip adds - measured, not asserted
- The sweep: three curves, three crossovers, and therefore three different answers
- The case where delegation is clearly wrong, the case where it is clearly right, and the rule between them
- Latency, honestly: which half of that number did your computer actually produce
- When NOT to delegate - and why this, not that
- The way a pro does it differently
- OPTIONAL appendix: replace the stub, replace the constants, and re-derive your own crossovers