Anthropic MCP Paper Cuts Agent Tool Context from 150K Tokens to 2K via Code Mode

solyarisoftware · x · 2026-11-28

Anthropic engineers cut an agent's tool context from 150,000 tokens to 2,000 — same tools, same task, without changing the model. Instead of calling tools one by one, the agent writes code that calls them: tools become files under ./servers, loaded on demand (98.7% less time and cost), filtering happens inside the sandbox so the model sees only 5 rows of a 10,000-row sheet, wait-loops run as code, and emails/phone numbers are masked as [EMAIL1]/[PHONE1] before reaching the model. The linked discussion frames the broader lesson as three layers — harness, loop, graph — that decide whether agents work.

Related event: Anthropic Cuts MCP Tool Context from 150K to 2K Tokens(2 posts)→

Original post →

More from coding & agent

coding & agent channel →