Tighten AutoResume docs and trim use-case examples#200
Merged
Conversation
Rename title to "Auto resume", add a description, and restructure the page around a single web server example. Removes the agent/tool and per-user sandbox use cases.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
mishushakov
requested changes
Apr 21, 2026
|
|
||
| `AutoResume` handles this automatically: a paused sandbox wakes up when activity arrives, so your code does not have to check or manage sandbox state. | ||
| Configure it through the `lifecycle` object when creating a sandbox. | ||
| `AutoResume` handles this automatically: a paused sandbox wakes up when activity arrives, so your code doesn't have to check or manage sandbox state. AutoResume builds on the sandbox [persistence](/docs/sandbox/persistence) lifecycle. |
Member
There was a problem hiding this comment.
there's no such thing as AutoResume
| ## Lifecycle options | ||
| ### Lifecycle options | ||
|
|
||
| - `onTimeout` / `on_timeout` |
Member
There was a problem hiding this comment.
onTimeout (JavaScript) / on_timeout (Python)
| --- | ||
| title: "AutoResume" | ||
| sidebarTitle: AutoResume | ||
| title: "Auto resume" |
Member
| - `onTimeout: "pause"` with `autoResume: false` gives auto-pause without auto-resume. | ||
| - `onTimeout: "pause"` with `autoResume: true` gives auto-pause with auto-resume. | ||
| - [`Sandbox.connect()`](/docs/sandbox/connect) can still be used to resume a paused sandbox manually. | ||
| AutoResume is persistent — if a sandbox resumes and later times out again, it will pause again automatically. To permanently delete a sandbox, call `.kill()`. A killed sandbox cannot be resumed. |
| AutoResume is persistent — if a sandbox resumes and later times out again, it will pause again automatically. To permanently delete a sandbox, call `.kill()`. A killed sandbox cannot be resumed. | ||
|
|
||
| If you use `autoResume: false`, resume explicitly with [`Sandbox.connect()`](/docs/sandbox/connect). | ||
| If `autoResume` is `false`, you can still resume a paused sandbox manually with [`Sandbox.connect()`](/docs/sandbox/connect). |
Member
There was a problem hiding this comment.
lifecycle.autoResume / lifecycle.auto_resume
Comment on lines
-325
to
-328
| ## Cleanup | ||
| Auto-resume is persistent, meaning if your sandbox resumes and later times out again, it will pause again. | ||
| Each time the sandbox resumes, it gets a fresh timeout (at least 5 minutes, or longer if the original creation timeout exceeds that) — so the sandbox keeps cycling between running and paused as long as activity arrives. | ||
| If you call `.kill()`, the sandbox is permanently deleted and cannot be resumed. |
Member
There was a problem hiding this comment.
I think this section was important
| ## Lifecycle options | ||
| ### Lifecycle options | ||
|
|
||
| - `onTimeout` / `on_timeout` |
Member
There was a problem hiding this comment.
you can also do a table like this:
| Setting | Option | Description |
|---|---|---|
onTimeout / on_timeout |
"kill" |
(default) Sandbox is terminated when timeout is reached |
"pause" |
Sandbox is paused when timeout is reached | |
autoResume / auto_resume |
false |
(default) Paused sandboxes do not auto-resume |
true |
Paused sandboxes auto-resume on activity. Valid only when onTimeout / on_timeout is set to pause |
Comment on lines
45
to
48
| @@ -45,14 +47,9 @@ sandbox = Sandbox.create( | |||
| - `true`: paused sandboxes auto-resume on activity | |||
| - `true` is valid only when `onTimeout`/`on_timeout` is `pause` | |||
Member
There was a problem hiding this comment.
truepaused sandboxes auto-resume on activity. Valid only whenonTimeout/on_timeoutispause
|
|
||
| ## Lifecycle options | ||
| ### Lifecycle options | ||
|
|
Member
There was a problem hiding this comment.
mention here that it's lifecycle object options
| sidebarTitle: AutoResume | ||
| title: "Auto resume" | ||
| sidebarTitle: Auto resume | ||
| description: "Automatically resume paused sandboxes when activity arrives — no manual state management needed." |
Member
There was a problem hiding this comment.
when activity arrives > on activity
- Retitle to "Auto-resume on request" - Replace "AutoResume" with "Auto-resume" throughout - Convert lifecycle options list into a table - Reframe option names as "onTimeout (JavaScript) / on_timeout (Python)" - Qualify option references with the `lifecycle.` prefix - Restore the standalone Cleanup section
mishushakov
approved these changes
Apr 22, 2026
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
descriptionfor search/preview..kill()note into the main flow.