Skip to main content
You can configure a sandbox to keep running beyond the default session timeout by enabling long-running mode. This is useful for workloads that need to stay alive well beyond a typical session, such as persistent services, long-running agent tasks, or background jobs. Long-running mode is configured via the metadata field when creating a sandbox. The key is long_running and the value is "true" (as a string).
Do not set timeout or idle_timeout together with long_running. If either timeout or idle_timeout is set, it takes precedence and the sandbox will stop according to that value instead of long-running mode.

Basic usage

Pass the long_running key in the metadata object when creating a sandbox.
Last modified on August 10, 2026