Default sandbox timeout to 0 (persistent, never hibernate)#130
Open
Default sandbox timeout to 0 (persistent, never hibernate)#130
Conversation
Change the default idle timeout across SDKs, CLI, and backend from 300s to 0, where 0 now means "persistent — never auto-hibernate". Callers who want auto-hibernate opt in by passing an explicit timeout. - TS SDK: `Sandbox.create` and `sandbox.wake` default to 0. - Python SDK: `Sandbox.create` and `create_from_checkpoint` default to 0. - CLI: `oc sandbox create`, `oc sandbox wake`, `oc checkpoint spawn` `--timeout` flag defaults to 0 with updated help text. - Server API: create / wake / from-checkpoint / setTimeout endpoints stop coercing `timeout == 0` to 300 and pass 0 through to the router, which already handles `timeout == 0` as "no auto-hibernate timer". - Worker gRPC: CreateSandbox / ForkFromCheckpoint / WakeSandbox paths do the same, so 0 flows through multi-worker setups too. - setTimeout endpoint now accepts 0; only negative values are rejected. Negative values are normalized to 0 (persistent) for safety.
Explains the new default (persistent, `timeout=0`), how to opt into auto-hibernate, idle-based semantics, that hibernation snapshots the VM and costs nothing, and that any SDK operation transparently wakes a hibernated sandbox. Added to the Sandboxes group in mint.json.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
300sto0across TS SDK, Python SDK, CLI, server API, and worker gRPC.0now means persistent — never auto-hibernate; callers opt into auto-hibernate by passing an explicit timeout.Motivation
Users running always-on agents (e.g. a Claw that listens for Telegram messages) currently get hibernated every 5 minutes, defeating the purpose. Exposing a `timeout=0` semantic and making it the default matches the mental model of "my sandbox stays alive until I kill it."
Behavior
timeout0> 0< 00.Any SDK operation transparently wakes a hibernated sandbox — no caller changes needed.
Files
Breaking change
Clients that relied on the implicit 300s default will now get persistent sandboxes by default. They should either:
Other reference docs still say "default 300" in ~20 files (param tables, examples). Left as a follow-up since most of them are param tables rather than code-correctness issues.
Test plan
🤖 Generated with Claude Code