Layering model calls
A single-model coding agent runs tools for 50 seconds before it answers you. Humans expect a reply in about 200 ms. Compare eight ways to layer fast and slow models so multiple agents share one turn without making up results.
One Turn, Eight Ways to Split It
In human conversation, the gap between turns is about 200 milliseconds across languages (Stivers et al., 2009). In a single-model coding agent, tool calls stream into the log while the model reads files, edits code, runs checks, and deploys. You can watch those tool calls appear, but you cannot talk to the agent until the full loop ends. If you ask a question at second 14, your message waits in a queue for 36 seconds.
Splitting one turn across layered model calls changes that wait. A fast front model can acknowledge the request, route simple questions around the deep worker, narrate verified tool results, or hold a conversation over a shared belief state while one or more workers edit code.
The workbench below runs all eight designs on the exact same 50-second coding task: fixing a clipped 360px widget frame, running tests, and redeploying. Pick any chapter above, press Run turn, and try interrupting mid-edit. Turn on Test sloppy voice to see what happens when a fast front model claims work is done before the worker verifies it.
Talker + Reasoner
Split conversation from deep work around a shared live belief state.
Feel: You interrupt mid-edit — 'What are you doing right now?' — and get an accurate, grounded answer in 0.4 seconds without stopping the coding worker.
How: Fast System-1 Talker holds the mic and reads a structured belief state updated continuously by the slow System-2 Reasoner. Milestones surface proactively; user questions get answered immediately from the latest verified state.
- • Interactive under heavy tool work: ~0.4s interrupt latency.
- • Steers the worker mid-flight ('Also give it a blue border') via shared state.
- • Can still interrupt you when a milestone fires unless gated by turn-taking.
What We Measured on Workers AI
We built and timed the first three layers on Cloudflare Workers AI inside a real agent shell. A fixed
acknowledgement replies in 0 ms. A small classifier (clef-flash) writes a safe opener in 150 ms
p50. A joint router (clef-router) scores whether a turn needs the deep worker in 180 ms p50 using a noul >= 0.35 threshold.
Two guardrails kept the front model honest. First, a 1,200 ms race deadline drops the opener if the deep worker
answers first. Second, a regex guard (isSafeOpenerText) rejects any opener that uses past tense,
numbers, or banned phrasing so the fast model cannot claim a test passed before it ran.
Compose your own stack: 0, 1, 2, or 3 layers
Measured Workers AI front-layer p50 latencies, the 1,200ms race deadline, and the real opener safety guard that blocks past-tense claims and numbers.
Try typing a past-tense claim like "Fixed 3 tests" or "Checked the logs" — the guard rejects it before TTS speaks.
Measured vs. Simulated
| Part | Status | Source |
|---|---|---|
| Front-layer p50 latencies (0–500 ms) | Measured | Workers AI timings (clef-flash, clef-router, llama-3.1-8b, clairic-flash, llama-3.3-70b) |
| Opener guard & router threshold | Real code | isSafeOpenerText, 1,200 ms race deadline, noul >= 0.35 |
| 50-second coding task & 3-agent fleet | Simulated | Deterministic replay so all 8 architectures run on the exact same script |
Chapters 05 through 08 (Talker + Reasoner, Background Agent, Think While Listening, and 3-Agent Fleet) run the
published multi-model architectures from DeepMind, Anthropic, NVIDIA, and OpenAI on that same 50-second script.
The pattern holds at every depth: a 150 ms front model can open the turn and answer mid-flight, as long as a
deterministic guard like isSafeOpenerText stops it from speaking ahead of verified tool output.