Overview of Self-Hosted Sandbox variants
mainSelf-hosted sandboxes allow you to run Claude Managed Agent sessions against compute environments you control. Each implementation follows a standard contract:
- Listen for the
session.status_run_startedwebhook (verified usingclient.beta.webhooks.unwrap()). - Drain the environment work queue to recover missed items.
- Launch a per-session sandbox that executes the SDK/CLI tool runner (supporting
bash,read,write,edit,glob, andgrep), heartbeats the lease, and poststool_results back to the session.
Security Note: The runner does not receive the organization API key. Instead, it authenticates using the environment key, which is the single credential used for both the control plane and per-session calls.