Skip to main content
You can use the Sandbox.connect() method to connect to a running or paused sandbox and continue controlling it with the SDK. This is useful for reusing the same sandbox instance across serverless function invocations, restoring a web app user session, reconnecting to long-running work, or resuming a paused sandbox after a short period of inactivity.

1. Get the sandbox ID

You need to get the ID of the sandbox before connecting. You can use the Sandbox.list() method.

2. Connect to the sandbox

You can use the Sandbox.connect() method to connect to the sandbox once you have the sandbox ID.
Last modified on June 24, 2026