Skip to content

feat(sandbox): raise sandbox sleep timeout to 20 minutes - #65

Open
ai-yappa[bot] wants to merge 1 commit into
mainfrom
agent/slack-v1-T07DMLN1JE6-C0BTJCJD69K-1789114690.076429
Open

ai-yappa[bot] wants to merge 1 commit into
mainfrom
agent/slack-v1-T07DMLN1JE6-C0BTJCJD69K-1789114690.076429

Conversation

@ai-yappa

@ai-yappa ai-yappa Bot commented Sep 11, 2026

Copy link
Copy Markdown

What

Raises the Cloudflare Sandbox container's idle/sleep timeout from 10 minutes to 20 minutes.

packages/worker/src/index.ts — the Sandbox Durable Object subclass overrides sleepAfter (how long the sandbox keeps running after the last activity before it is put to sleep and must cold-start again):

- override sleepAfter = "10m";
+ override sleepAfter = "20m";

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 — passes
  • pnpm typecheck — passes (all 8 workspace projects)
  • pnpm test:
    • worker: 491/491 pass
    • shared: 224/224 pass
    • cli: 28/28 pass
    • web: 254/254 pass (24 files)
    • sandbox-image: 112/114 pass; the 2 failures (runtime.test.mjs setup runs a nested pnpm install --frozen-lockfile) fail identically on the unmodified tree in this environment and are unrelated to this change (CI runs the same suite with CI=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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants