Documentation Index
Fetch the complete documentation index at: https://docs.podflare.ai/llms.txt
Use this file to discover all available pages before exploring further.
Anthropic’s Messages API supports a hosted
code_execution tool. Podflare
can replace the hosted execution with a Podflare microVM — same tool
spec, your compute, your data plane.Install
Use
What handle_code_execution_tool_use does
Takes an Anthropic tool_use block (SDK object or dict) with
{type: "tool_use", id: ..., name: "code_execution", input: {code: "..."}}
and returns the matching tool_result:
is_error: true when exit_code != 0, so Claude can pick up execution
failures.
State across turns
Passing the sameSandbox into multiple handle_code_execution_tool_use
calls gives Claude a persistent Python REPL across the whole conversation.
That’s the single biggest win over Anthropic’s hosted container, where
REPL state depends on tool version + model.
Fork-aware conversations
You can alsoparent.fork(n=...) between turns to let Claude explore
multiple paths, pick a winner, and merge_into to commit — all
transparently to the model.

