Configure a connection
Prepare the target workspace and an API key with appropriate access. Each connection stores its own workspace and credential instead of relying on process-global workspace settings. The API key stays in the control plane, not Sandbox environment.
The image field configures a provider base image; it does not establish support for Hexagon OCI Harness registration/execution. The default tag floats. Record actual deployed image and verification date when reproducibility matters.
These examples read private environment configuration and use a local management client. See self-hosting for hosted initialization. Each execution creates a new connection; retain and reuse its ID.
Run a task and preview
Use connection.id as sandbox_connection_id in the first Session tutorial, with a compatible Harness/model. Independently run creation, task, artifact, and close through Python and TypeScript. The default image is Alpine/musl; built-in OpenCode installation adapts native binary selection. This does not make arbitrary third-party executables compatible. Start the application in the workspace and use authorized private preview. The connector creates a public=false preview resource for the port, using X-Blaxel-Preview-Token in the control plane. Browsers use Hexagon authorization, never provider API keys or preview Tokens. Blaxel ingress uses IPv6. The connector prepares a bridge for IPv4-only user applications; native IPv6 applications do not need that bridge. Diagnose the listening service and port before checking bridge/private endpoint state. Do not bypass authorization by making the port public.Automatic standby and recovery
The declared capability is automatic_standby, not platform-controlled pause_resume. The provider chooses standby timing. Neither DEPLOYED state nor a local idle timer establishes actual compute or billing state. Submit the next Run to the same Session; the platform checks and prepares Runtime. Arbitrary background commands are not treated as safely replayable services. Verify file, conversation, and process continuity separately for each Harness. A successful request, elapsed wait, or successful single turn does not prove the idle journey. Keep unobservable billing state unknown; do not promise zero idle charges.Networking and cleanup
Network allowlists are unsupported; a request requiring one is rejected before allocation. Do not silently weaken the policy to make an example pass. Choose a supporting provider when domain restrictions are required. Close checks both compute and associated preview endpoints. The connector lists, deletes, and rechecks previews, then confirms Sandbox absence or provider terminal state. Terminated compute alone does not prove endpoint removal. Associated resources still need reconciliation if compute disappears for another reason. Timeouts, authentication failures, and network errors do not mean resource absence. Creation derives an exact name from the persisted operation ID. Investigate that original name after a lost response rather than creating another Session as a substitute for reconciliation. The control plane must remain running to enforce the deadlines and cleanup it owns promptly.Diagnose and complete
Complete a real task with response, file bytes, preview authorization, continuation, and confirmed compute/endpoint cleanup. Add independent recovery checks for standby-dependent applications. Historical Blaxel evidence and the execution matrix retain dates and scope. No cloud task was rerun while writing this page.
Sources: connector, lifecycle strategies. Next: idle and wake, reconciliation, Sandbox overview.