timeout is effective for at most 1 hour ā any larger value is capped. Long-running mode lifts this cap: with it enabled, the timeout you pass when creating the sandbox can exceed 1 hour. 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).
Basic usage
Pass thelong_running key in the metadata object when creating a sandbox.
How it works
- On
create(andresume), whenlong_runningis set, thetimeoutyou pass can exceed the default 1-hour maximum running time.
Scope and inheritance
- Only
createaccepts thelong_runningparameter. resume(including auto-resume): a sandbox created withlong_runningkeeps the behavior after being resumed from a snapshot.cloneinherits the parameter, and the sandbox keeps it when it continues running after areset.