feat(sandbox): raise sandbox sleep timeout to 20 minutes - #65
Open
ai-yappa[bot] wants to merge 1 commit into
Open
ai-yappa[bot] wants to merge 1 commit into
ai-yappa[bot] wants to merge 1 commit into
Conversation
Keeps the Cloudflare sandbox container warm for 20 minutes after the last activity (previously 10) before it is put to sleep and must cold-start.
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.
What
Raises the Cloudflare Sandbox container's idle/sleep timeout from 10 minutes to 20 minutes.
packages/worker/src/index.ts— theSandboxDurable Object subclass overridessleepAfter(how long the sandbox keeps running after the last activity before it is put to sleep and must cold-start again):Why
A 10‑minute window means a quiet Slack thread or web session can let the sandbox fall asleep, forcing a cold start (container provisioning + repo/dependency warm-up) on the next Agent Request. 20 minutes keeps active sessions warm across longer lulls while still letting finished sessions wind down.
Verification
pnpm build— passespnpm typecheck— passes (all 8 workspace projects)pnpm test:runtime.test.mjssetup runs a nestedpnpm install --frozen-lockfile) fail identically on the unmodified tree in this environment and are unrelated to this change (CI runs the same suite withCI=true/real network).Notes
No schema, config, or interface changes — this is the container-level idle lifetime only. Session
max_time(30m default) is unchanged.