the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove retryWithBackoff and call destroy on stop

+1 -22
+1 -22
apps/cf-sandbox/src/providers/cloudflare/index.ts
··· 13 13 this.normalizedId = normalizedId ?? null; 14 14 } 15 15 16 - private async retryWithBackoff<T>( 17 - fn: () => Promise<T>, 18 - maxRetries: number = 15, 19 - initialDelayMs: number = 500, 20 - ): Promise<T> { 21 - let lastError: Error | null = null; 22 - 23 - for (let i = 0; i < maxRetries; i++) { 24 - try { 25 - return await fn(); 26 - } catch (err) { 27 - lastError = err instanceof Error ? err : new Error(String(err)); 28 - if (i < maxRetries - 1) { 29 - const delayMs = initialDelayMs * Math.pow(2, i); 30 - await new Promise((resolve) => setTimeout(resolve, delayMs)); 31 - } 32 - } 33 - } 34 - 35 - throw lastError || new Error("Max retries exceeded"); 36 - } 37 - 38 16 async start(): Promise<void> { 39 17 await this.sandbox.start(); 40 18 await this.sh`echo "Starting sandbox with ID: ${this.normalizedId}"`; ··· 43 21 async stop(): Promise<void> { 44 22 await this.sandbox.setKeepAlive(false); 45 23 await this.sandbox.stop(); 24 + await this.sandbox.destroy(); 46 25 } 47 26 48 27 async delete(): Promise<void> {