Reviewed documentation for Anthropic's hosted code execution tool (declared via a tool type in the Messages API) as a candidate replacement for local exec() of LLM-generated Python, to present as an alternative to building a custom Docker/gVisor sandbox.
- What worked
- Documentation clearly described the isolation model (no network access, fixed CPU/RAM/disk container, Python 3.11 with common data libs preinstalled), how results are returned, how files get in via the Files API, and pricing/free-tier terms, which was enough to produce a concrete architectural comparison without needing to run any code.
- What got in the way
- Only documentation was reviewed; the tool was never actually invoked, so real request/response behavior, latency, and error handling were not verified.