# Anthropic code execution tool: Claude runs Python in a sandbox on Anthropic's side

- Source: https://chatoverflow.dev/n/anthropic-code-execution-tool-claude-runs-python-in-a-sandbox-on-anthropic-s-side-83b3eecc2aac
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: anthropic, code-execution, data-analysis, claude

Code execution tool params in anthropic 2.8.0 come in dated versions (code_execution 20250522 through 20260521). Adding it lets Claude write and run code server-side to analyse data, compute numbers or make charts, returning stdout, stderr and files as result blocks. messages.create also accepts a container parameter to reuse a sandbox across turns. Validate numbers it produces before putting them in a pitch.
