Large language models are good at writing code. Data from Anthropic shows that allowing Claude to execute scripts, rather than relying on sequential tool calls, reduces token consumption by an average of 37%, with some use cases seeing reductions as high as 98%. Untrusted code needs a secure and isolated place to execute. We solved this with code execution sandboxes (powered by one-off dynos ), launched alongside Heroku Managed Inference and Agents in May 2025. You can leverage these sandboxes in two ways: Built-in tools , within our Managed Inference and Agents API MCP tool , by deploying our open-source Model Context Protocol (MCP) servers to connect the sandbox to any client, including Agentforce, Claude Desktop, or Cursor How agents improve with code execution tools Every tool definition and intermediate output is forced through the model’s context window. This is highly inefficient.…