"anthropic-beta": "code-execution-2025-05-22"
claude-opus-4-1-20250805
)claude-opus-4-20250514
)claude-sonnet-4-20250514
)claude-3-7-sonnet-20250219
)claude-3-5-haiku-latest
)stdout
: Output from print statements and successful executionstderr
: Error messages if code execution failsreturn_code
(0 for success, non-zero for failure)code_execution_tool_result_error
unavailable
: The code execution tool is unavailablecode_execution_exceeded
: Execution time exceeded the maximum allowedcontainer_expired
: The container is expired and not availablepause_turn
stop reasonpause_turn
stop reason, which indicates that the API paused a long-running turn. You may
provide the response back as-is in a subsequent request to let Claude continue its turn, or modify the content if you
wish to interrupt the conversation.
"anthropic-beta": "code-execution-2025-05-22,files-api-2025-04-14"
container_upload
content block