VectraCloud

Pause & resume

What happens when your sandbox goes idle

Pause & resume

Vectra follows the E2B auto-resume lifecycle.

Idle pause

After about 30 minutes without activity (operator-configurable on the gateway), your sandbox pauses automatically to save cost:

lifecycle: {
  onTimeout: 'pause',   // full memory + filesystem snapshot (not kill)
  autoResume: true,     // wake on next SDK/HTTP activity
}
  • It is not deleted.
  • It still appears on your dashboard.
  • Files, config, and memory are kept (so processes can thaw in place).
  • Lifecycle settings are persistent across pause/resume cycles.

We do not use filesystem-only pause (keepMemory: false) — that cannot auto-resume on traffic.

Long continuous runs (platform limit)

E2B also has a ~24 hour continuous-run ceiling. The control plane may pause and resume on a longer cycle (default about 23 hours) so the instance stays usable without hitting a hard kill. Idle pause still applies as usual. Operators can disable that cycle with gateway env XIBECODE_E2B_MAX_CONTINUOUS_MS=0.

What wakes a paused sandbox

Per E2B, activity includes:

  • SDK ops from our gateway: commands.run, files.read / files.write
  • HTTP to a service inside the sandbox (preview URLs)

You do not need Sandbox.connect() first when autoResume is true and the control plane still holds a live client. After a gateway restart we use Sandbox.connect().

After resume, the idle timeout countdown restarts (E2B applies at least 5 minutes; we re-apply our configured window via setTimeout).

How to resume

Dashboard

  1. Open Dashboard.
  2. Find the instance (status paused).
  3. Click Wake / resume.
  4. Wait a few seconds, then use Telegram / Discord / Slack as usual.

Dashboard Command pane, View logs, Update & restart, and Save & restart also wake the sandbox before work.

Telegram (auto-resume)

Telegram long-poll runs inside the sandbox (same idea as OpenClaw Telegram on E2B): a background channel runtime.

When the VM is paused, that long-poll is frozen — a DM alone cannot wake the machine. Vectra arms a host wake webhook while paused. The next DM:

  1. Issues gateway SDK activity → E2B auto-resumes (or Sandbox.connect fallback).
  2. Restarts the coding daemon (thawed TCP to Telegram is stale; OpenClaw-style readiness poll).
  3. Clears the host webhook so the daemon’s getUpdates long-poll owns the bot again.
  4. Asks you to send the message again (the first update was delivered to the wake webhook).

While running, the host webhook stays cleared. If wake fails, it is re-armed.

Discord / Slack do not use a host wake webhook — use Wake / resume on the dashboard after idle pause.

Commands & config

Any dashboard shell command or config save also resumes a paused sandbox (gateway ensures the sandbox is running before work).

If payment has expired, renew first, then resume.

Tips

  • Resume is free while your current paid period is active (or free-tier slot).
  • Destroy is permanent; pause is not.
  • Set PUBLIC_BASE_URL to your public HTTPS app URL so Telegram can reach the wake webhook.
  • Ops: register E2B lifecycle webhook → POST ${PUBLIC_BASE_URL}/api/e2b/lifecycle with events sandbox.lifecycle.paused / resumed / killed / created (and set E2B_LIFECYCLE_WEBHOOK_SECRET). Cron /api/cron/arm-telegram-wake remains the fallback.
Ctrl+I
Assistant

How can I help?

Ask me about configuration, installation, or specific features.