Code Mode Delivers 99.2% Cost Reduction by Bypassing Raw Data

Code mode yields a 99.2% cost reduction in our systems

Code Mode Delivers 99.2% Cost Reduction by Bypassing Raw Data

We measured our production systems and found that using Code Mode to bundle 26 tool calls into a single script cut costs by 99.2%. Instead of flooding the model with millions of raw JSON characters, our agents run tasks in a sandbox and only send the final summary. This approach, similar to techniques from Cloudflare and Anthropic, reduces token usage from over 800,000 to just 6,450 for the same triage workflow, proving that keeping raw data out of the context window is a massive efficiency win.

The raw data never has to pass through the model's context.

More from this day

2026-07-23