From 6e17efaf6fb43df76f30de4e36fb785a0899fc68 Mon Sep 17 00:00:00 2001 From: Codevil Agent Date: Fri, 11 Sep 2026 08:41:58 +0000 Subject: [PATCH] feat(sandbox): raise sandbox sleep timeout to 20 minutes 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. --- packages/worker/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index f28c603..c201f27 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -30,7 +30,9 @@ export type { Env } from "./worker-env.js"; // Subclass the Cloudflare Sandbox so Codevil can keep active agent sessions // alive and persist stop diagnostics across abnormal socket closures. export class Sandbox extends BaseSandbox { - override sleepAfter = "10m"; + // Keep the sandbox container warm for 20 minutes after the last activity + // before it is put to sleep and must cold-start again. + override sleepAfter = "20m"; private readonly redactionSecrets: readonly string[]; constructor(ctx: DurableObjectState<{}>, env: RuntimeEnv) {