Skip to main content

Create an owner for the primary path

AsyncComputerSandbox.create() requires an explicit Modal environment and a supported narrow or Workspace-granted granular region selector. It also requires an ingress and ownership mode that can produce a session handle. Invalid handoff settings fail before Modal allocation.
The owner terminates its desktop on exit. Keep it open until every dispatched Function call reaches a terminal outcome.

Borrow inside the placed Function

Borrowing acquires one trajectory lease and one pooled client. It verifies placement, readiness, protocol capabilities, and policy before mutation. The borrower releases the lease and detaches. It never terminates the owner’s desktop.

Attach without ownership

Use one explicit selector when a desktop already has an owner:
An attached context closes its connection on exit and leaves the Sandbox running.

Use an explicit low-level owner

AsyncComputerSandbox.create_unplaced() supports compatibility workflows with caller-owned topology. Local clients and direct daemon clients remain available for debugging and REST use.

Keep cleanup order stable

  1. Stop new mutations.
  2. Resolve or seal an ambiguous outcome.
  3. Close the borrowed client and release its lease.
  4. Wait for the Function call to reach a terminal state.
  5. Close the owner client and terminate the owned Sandbox.
Cancellation leaves any input that reached the desktop in place for explicit recovery.