Skip to content

feat: add E2B auto-pause provider lifecycle support#261

Merged
NathanFlurry merged 1 commit into
mainfrom
e2b-autopause-provider
Mar 16, 2026
Merged

feat: add E2B auto-pause provider lifecycle support#261
NathanFlurry merged 1 commit into
mainfrom
e2b-autopause-provider

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Summary

  • add E2B auto-pause defaults with explicit pause, kill, and reconnect lifecycle hooks
  • surface SandboxDestroyedError on reconnect to deleted E2B sandboxes and expose pauseSandbox/killSandbox in the SDK
  • restore example helper modules used by the E2B, Daytona, and Vercel example tests

Verification

  • pnpm --filter sandbox-agent typecheck
  • pnpm --filter sandbox-agent test -- --run tests/provider-lifecycle.test.ts
  • cargo build -p sandbox-agent
  • set -a && source ~/misc/env.txt && set +a && pnpm --filter sandbox-agent test -- --run tests/providers.test.ts -t "SandboxProvider: e2b"
  • pnpm --filter @sandbox-agent/example-e2b typecheck
  • set -a && source ~/misc/env.txt && set +a && pnpm --filter @sandbox-agent/example-e2b exec vitest run tests/e2b.test.ts
  • pnpm --filter @sandbox-agent/example-daytona typecheck
  • pnpm --filter @sandbox-agent/example-vercel typecheck

…ifecycle

Add `pause()`, `kill()`, and `reconnect()` methods to the SandboxProvider interface so providers can support graceful suspension and permanent deletion as distinct operations. The E2B provider now uses `betaCreate` with `autoPause: true` by default, `betaPause()` for suspension, and surfaces `SandboxDestroyedError` on reconnect to a deleted sandbox. SDK exposes `pauseSandbox()` and `killSandbox()` alongside the existing `destroySandbox()`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@railway-app
railway-app Bot temporarily deployed to sandbox-agent / sandbox-agent-pr-261 March 16, 2026 22:10 Destroyed
@railway-app

railway-app Bot commented Mar 16, 2026

Copy link
Copy Markdown

🚅 Deployed to the sandbox-agent-pr-261 environment in sandbox-agent

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Mar 16, 2026 at 10:20 pm
foundry-mock ❌ Build Failed (View Logs) Mar 16, 2026 at 10:11 pm
foundry-api ❌ Build Failed (View Logs) Mar 16, 2026 at 10:11 pm

@NathanFlurry
NathanFlurry merged commit 9ce71c0 into main Mar 16, 2026
3 of 6 checks passed
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.

1 participant