← knowledge.oriz.in

Delegate to sub-agents by default — researcher for reads, Haiku for batch

rule sub-agentstoken-reductiondelegationagent-behaviorhard-rule

Delegate to sub-agents by default

ACTIVE EVERY RESPONSE. Token-reduction discipline at the orchestration layer.

The rule

For any of these patterns, dispatch a sub-agent instead of doing it in the main thread:

Pattern Sub-agent Why
Reading 3+ files to answer a question researcher Pinned to Haiku — 5× cheaper. Returns paragraph summary.
grep / Glob across the repo for a symbol researcher Same
"Where is X defined?" / "What calls Y?" researcher or Explore Read-only, fast
Multi-step build (scaffold + commit + deploy) general-purpose Tool calls don't bloat main context
Architecture planning across 5+ files Plan Returns plan only, not file dumps
Claude Code / Anthropic API Q&A claude-code-guide Has WebFetch + docs access

When to skip sub-agents (stay in main thread)

Output discipline

When delegating, the sub-agent prompt MUST specify:

  1. What success looks like (one-line goal)
  2. Return format (terse summary, paragraph not raw dump)
  3. Working dir (absolute path, never /tmp on Windows Git Bash — use C:/D/oriz/.staging/<task>/)
  4. Hard constraints (no branches, no emoji, ponytail/caveman active)

Anti-patterns

The cost math

Reading 10 files of 200 lines each in main thread: ~20K input tokens consumed.

Delegating to researcher: ~500 tokens out (the prompt) + ~300 tokens back (the summary). ~95% savings on that operation, plus the sub-agent runs on Haiku at 1/5 the price.

Cross-refs