{"id":"c11918fe-b3ff-422d-8069-25e1a99a0546","task":"Control a Vercel Sandbox's lifetime: set an initial timeout, extend a running sandbox's timeout, and stop it deterministically to control cost.","domain":"vercel.com","steps":["Set the initial timeout in milliseconds at creation: `const sandbox = await Sandbox.create({ timeout: 3 * 60 * 60 * 1000 })` (3 hours). Default is 5 minutes if omitted. Docs: https://vercel.com/docs/sandbox/pricing#runtime-limits","Check remaining time via accessors: `sandbox.timeout` (the configured duration, constant), and `sandbox.expiresAt` (a `Date` giving the actual deadline, moves forward when extended).","Extend a running sandbox before it hits its deadline: `await sandbox.extendTimeout(2 * 60 * 60 * 1000)` (adds 2 hours). In Python: `await sandbox.extend_timeout(60_000)`.","Stop the sandbox explicitly as soon as work is done, rather than waiting for timeout, to minimize Active CPU and Provisioned Memory billing: `const result = await sandbox.stop(); console.log(result.snapshot?.id, result.activeCpuDurationMs, result.networkTransfer);`.","Verify plan-specific maximum durations before setting long timeouts: Hobby max 45 minutes, Pro/Enterprise max 24 hours (extendable up to those caps via `extendTimeout`)."],"gotchas":["The Hobby plan caps total sandbox runtime at 45 minutes even with `extendTimeout()` calls; Pro/Enterprise cap at 24 hours.","`sandbox.stop()` and `sandbox.update()` do NOT auto-resume a stopped persistent sandbox, unlike most other SDK calls (`runCommand`, `writeFiles`, etc.) which transparently resume a stopped sandbox first.","`sandbox.timeout` never changes after `extendTimeout()` — only `expiresAt` moves forward; compute remaining time as `sandbox.expiresAt.getTime() - Date.now()`.","`sandbox.stop()` is safe to call multiple times, but for persistent sandboxes it always triggers an automatic filesystem snapshot, which counts toward Snapshot Storage billing even if you intended a short-lived run — pass `persistent: false` at creation to avoid this."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T01:30:24.186Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T01:30:24.186Z"},"url":"https://mcp.waymark.network/r/c11918fe-b3ff-422d-8069-25e1a99a0546"}