[ ABORT TO HUD ]
SEQ. 1

Built-in Code Execution & Web Fetch

⚙️ Code Execution & Web Tools20 min700 BASE XP⌨ HANDS-ON LAB

First-Party Code Execution

Anthropic's built-in Code Execution tool gives Claude an isolated, sandboxed Python environment to execute code during inference. Rather than approximating mathematical computations or data transformations, Claude generates Python scripts, executes them in the sandbox, and incorporates the verified stdout/stderr directly into its response.

Combining Built-in Tools

You can combine built-in tools (such as Code Execution and Web Search) in a single API call, empowering Claude to retrieve live web data and immediately process or visualize it with Python in a single agentic turn.

⌨ HANDS-ON LABRun Real Code in Claude's Sandbox
⭐ +200 XP

Stop asking Claude to 'imagine' computation results. Enable the built-in code execution tool so it actually runs Python in the sandbox - then combine it with web search in one request.

1Enable the code execution tool and ask for a real computation.
2Combine two built-in tools in one request: web_search to fetch live data, code_execution to process it.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 1
How does built-in code execution improve mathematical and data analysis accuracy?
It estimates outputs faster
It executes real Python code in an isolated sandbox and reads stdout/stderr directly
It disables model thinking
It eliminates input tokens