Make Parallel Sub-Agents Share the Prompt Cache
Byte-identical request prefixes are why forked workers cost a fraction of spawned ones - engineer your dispatch so every parallel child hits the same cache entry.
The Route
0/4 verifiedMap what must be byte-identical
The cache matches prefixes; know exactly what is in yours.
Stabilize the shared prefix
Reuse the parent's bytes; never regenerate what you can copy.
Measure cache performance
Cache savings are a metric, not a vibe.
Guard stability with regression tests
One refactor away from silently paying full price forever.
Context Pack
Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.
Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.
Related routes
More Agent Architecture flows that share ground with this one.
Choose the Right Dispatch: Spawn, Fork, or Direct
Three ways to hand work to a sub-agent - fresh-context spawn, cache-sharing fork, or just doing it yourself - and the decision matrix for picking per task.
+1 more steps to Done
Best forproduction-grade builds with strict verification
Sub-Agent Delegation with Context Isolation
Delegate bounded work to sub-agents that run in fresh context and return only distilled results - the pattern behind scalable long tasks.
+1 more steps to Done
Best forproduction-grade builds with strict verification
Add a Plan/Todo System to Your Agent
Give your agent the planning discipline of the leading harnesses: an explicit, model-visible todo list that survives long tasks.
+1 more steps to Done
Best forbuilders who have shipped a basic app before