Anthropic Pricing minor

Code execution is free when used with web search or web fetch

The code execution tool is no longer billed when it runs as part of a web search or web fetch request; standalone code execution is still charged.

What does this mean for me?

  • Engineering leadership

    Cost, risk, timeline, team impact Worth knowing

    Search-heavy agents get cheaper: code execution invoked alongside web search or web fetch is no longer billed, and the dynamic filtering it powers cuts billed input tokens too. Cost forecasts built before 17 Feb 2026 overstate spend — refresh them before your next budget cycle.

  • Engineer

    What to change, what breaks, what to test Worth knowing

    No code change needed: code execution bundled with `web_search` or `web_fetch` is free, while standalone code execution is still billed at the published tool rate. If you split search and execution across separate requests to save money, that workaround is now pointless.

  • General consumer

    Using the Claude apps, not the API No impact

    Nothing to do — this is API billing only and does not affect the Claude apps.

Sandboxed code execution became free of charge when invoked alongside web search or web fetch. Standalone code execution continues to be billed at the rates on the tool’s pricing section.

This pairs with dynamic filtering, which uses code execution to trim search and fetch results before they reach the context window: the filtering itself costs nothing and reduces the input tokens billed. Cost models for search-heavy agents built before this date will overstate spend.

Topics: Prices and limits

Terms on this page: Context window

Sources

Confidence
high
Verification
Verified: stated on the vendor's own pages
Date precision
exact
How this entry was made
Drafted by an agent, reviewed by a person