Anthropic engineers cut Claude token use 98.7% (150K→2K) by making it call tools in code
blaizedsouza · x · 2026-11-26
A breakdown of Anthropic engineers' published token-optimization technique: same tools, same task, same model, but context dropped from 150,000 to 2,000 tokens (98.7% less) — while users still pay full price. The trick: instead of calling tools one by one, Claude writes code that calls them, so only the answer flows back.
Key steps:
- Tools become files: each MCP tool gets its own file; Claude browses and opens only what it needs
- Load on demand: no upfront reading of every tool's instructions
- Filter before reading: a 10,000-row spreadsheet gets cut down by code before Claude sees 5 rows
- Loops run in code: waiting loops (e.g. deploy status) poll without waking the model
- Mask private data: emails/phone numbers replaced before entering context
The post also links a "Second Brain" guide for persisting project context across Claude sessions.
More from coding & agent
- Harness Engineering paper distills Claude Code, Codex, Gemini CLI into 'agent = model + harness' — blaizedsouza · 2026-11-26
- Linus Torvalds Rips 41,197-Line AI-Assisted ext4 Patch as Too Big and Too Late — yacineMTB · 2026-11-26
- Agent rushes humans to rerun an eval before Sonnet 4.5 'retires' in 5 days — Sauers_ · 2026-11-26
- What maintaining an AI support agent actually looks like six months in — Fearless_Eagle-248 · 2026-11-26
- Animating JS drawings with Claude Opus: codegen beats video models on control — mickeyxfriedman · 2026-11-26
- Free online book "The LLM Stack: From Silicon to Agents" ships with 800+ exercises — burkov · 2026-11-26