Anthropic's MCP Code Mode Cuts Agent Tool Context From 150K Tokens to 2K (98.7% Savings)
blaizedsouza · x · 2026-11-21
A widely shared thread breaks down Anthropic's MCP "code mode" paper: instead of calling tools directly, the agent writes code that calls them — same tools, same task, same model, but tool context drops from 150,000 tokens to 2,000, a 98.7% saving in time and cost. Key parts: tools as .ts files loaded on demand, filtering 10,000-row sheets in the sandbox so the model sees 5 rows, running polling loops in code instead of round-tripping through the model, and PII masking ([EMAIL1], [PHONE1]) before data hits the model. The quoted article "Harness, Loop and Graph" adds that better prompts won't fix failing agents — the architecture around the model is what's broken.
More from coding & agent
- isometric-cities: coding agents turn real neighborhoods into pixel-art maps on Mac — zsakib_ · 2026-11-21
- Grok Bot template turns one idea into a coded animated video with music — nima_owji · 2026-11-21
- Fake font files in 21 GitHub repos hide malware auto-run via VS Code tasks — JeremyCMorgan · 2026-11-21
- Hugging Face ships harness adapters: RL-tuned Qwen3.8-27B gains on Terminal-Bench 2.1 — yb2698 · 2026-11-21
- Japanese tech lead argues code design matters more, not less, in the AI coding era — 4310sy · 2026-11-21
- Google open-sources stitch-skills: 16 design skills for AI coding tools, 11k GitHub stars — lxfater · 2026-11-21