The question
Why not just tell the agent in the system prompt to use the cheaper model?The answer
A prompt-based instruction is a suggestion. A hook enforces it in code. A system-prompt instruction is a suggestion the model can drift from under a long, noisy context — and there’s no way to verify it was followed. A PreToolUse hook runs synchronously in the execution path itself, before the tool call fires, so it can inspect the call and block, modify, or reroute it — compliance isn’t optional.- 90% — fewer tokens when a large file read is delegated instead of handled by the frontier model itself
- 350 lines — a read request above this size is what automatically triggers the reroute
- 10–30s — added latency per delegated call
- Targeted read (offset/limit) → frontier model
- Untargeted, >350 lines → cheap worker
- Edit / debug / architecture → frontier model
Source
Spotify Engineering — Portal / shunt, Sept 2026 — Gemini 2.5 Flash worker model · self-reported, four-scenario benchmark.Continue the walkthrough
Conditional planning
Continue to topic 8 of 14.