Skills
Claude Code Haiku-for-Safety Pattern: Use Cheap Models for Cheap Decisions to Cut Agent Costs
The Claude Code source leak reveals a deliberate architecture choice: use cheap models (Haiku) for safety classification decisions, reserving expensive models (Opus/Sonnet) for complex reasoning. Permission gating is per-tool, not global—each tool has its own risk classification that determines whether it needs human approval. This pattern lets you build agents that process thousands of safety checks at ~$0.25/M input tokens (Haiku) instead of ~$15/M (Opus). Apply this by routing all binary classification decisions (safe/unsafe, relevant/irrelevant, pass/fail) through a fast cheap model, and only escalating to expensive models for open-ended generation.
Source
↳ Follow the thread