How to Cut Claude Code Token Usage in Half — 800h real data + config templates | Token Book

April 18, 2026 · View on GitHub

After 800+ hours of autonomous Claude Code operation, I cut token consumption by 50%. Here's how, with measured data and copy-paste configs. Every line in CLAUDE.md becomes tokens sent with every API call. Restructuring from 100→35 lines improved cache hit rate from 89%→95%, cutting token usage ~40%. Template:

- Run tests before committing
- Follow existing code conventions
- Fix errors up to 3 times before asking
- No rm -rf on sensitive paths
- No committing .env files
- No force-push

Manually checking /cost every time isn't practical. Use hooks:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "bash ~/.claude/hooks/token-spike-alert.sh"
      }]
    }]
  }
}

Subagents don't pollute main context, but cost minimum 7,000 tokens per spawn. Use for: Broad searches, parallel investigation, bulk file processing Don't use for: Simple grep, single file reads, serial tasks Opus 4.7 can consume up to 4x tokens for the same tasks:

  • New tokenizer generates 35% more tokens (#49356)
  • cache_read billing anomaly (#49302)
  • Internal function destroys prompt cache every turn (#49585)
  • Max 20x plan: 50% of weekly budget consumed in 1.5 days (#50325) Fix: claude --model claude-opus-4-6
  • Token Checkup — 5 questions, 30 seconds
  • Cache Health — Paste /cost output for instant diagnosis
  • Opus 4.7 Survival Guide — 22 issues tracked with fixes This is the summary. The complete 10-chapter guide: Token Book — Cut Claude Code Token Usage in Half (¥2,500 / ~$17 · Intro + Ch.1 free) 800 hours of measured data, copy-paste hook configs, CLAUDE.md templates, 16 documented symptoms with fixes.

cc-safe-setup — 691 example hooks for Claude Code safety