sandbox-lifecycle-debug

作成者: vercel

Sandboxライフサイクルデバッグ(vercel-openclaw向け):作成、再開、停止、スナップショット作成、リセット、古い実行中の調整、永続的なSandbox v2動作、ホット…

npx skills add https://github.com/vercel-labs/vercel-openclaw --skill sandbox-lifecycle-debug

Sandbox Lifecycle Debug

Use this skill when the sandbox state machine is the primary suspect.

For Sandbox v2 truth-model work, also load sandbox-v2-lifecycle. Official Vercel Sandbox v2 docs override older repo guidance that treats manual snapshots as the normal restore source.

Start Here

Read lat.md/sandbox-lifecycle.md sections Status State Machine, Triggers -- What Causes State Transitions, and the specific trigger involved. Run lat locate "Sandbox Lifecycle" or lat search "sandbox lifecycle <symptom>" when unsure.

Collect before edits:

  • GET /api/status and any UI state that triggered the action.
  • GET /api/admin/sandbox-diag.
  • GET /api/admin/logs filtered for sandbox., gateway., watchdog., proxy..
  • Local git rev-parse HEAD, remote git ls-remote origin main, and live deployment proof.

Split The State

Report these separately:

  • metadata status in SingleMeta.status
  • Vercel Sandbox SDK status
  • gateway readiness on port 3000
  • persistent auto-saved state availability
  • manual snapshot/checkpoint availability when relevant
  • lifecycle lock and start lock state when visible
  • UI polling status

Do not use running as shorthand for gateway-ready or user-ready.

Common Paths

  • Admin ensure: /api/admin/ensure -> ensureSandboxRunning() / ensureSandboxReady().
  • Gateway request: auth -> ensureSandboxRunning() -> token refresh -> touchRunningSandbox() -> proxy.
  • Stop/auto-save: stopSandbox() -> cleanup -> cron persistence -> sandbox.stop({ blocking: false }) -> snapshotting host metadata while v2 persists state.
  • Status polling: GET /api/status -> stale running or snapshotting reconciliation.
  • Reset: resetSandbox() destroys active sandbox and snapshots, clears cron and token metadata.

Sandbox v2 Rules

  • Main OpenClaw sandbox is one named persistent sandbox.
  • Normal resume uses the persistent name and auto-saved state, not manual snapshotId.
  • Observation of stopped/snapshotting state must use resume:false.
  • Manual snapshot() is explicit/debug/checkpoint only and shuts the sandbox down.
  • Worker/debug sandboxes are short-lived and must use persistent:false.

Fix Boundaries

  • Primary: src/server/sandbox/lifecycle.ts, src/server/sandbox/controller.ts.
  • Routes: src/app/api/admin/{ensure,stop,snapshot,reset,status}/** and src/app/api/status/route.ts.
  • Tests: lifecycle and harness tests under src/server/sandbox/**.test.ts and src/test-utils/harness.
  • Docs: lat.md/sandbox-lifecycle.md, docs/lifecycle-and-restore.md.

Verification

Use the narrowest command that covers the path, then run the repo verifier when the change has broad lifecycle impact:

node scripts/verify.mjs --steps=test,typecheck
lat check

For live lifecycle incidents, include before/after /api/status, /api/admin/sandbox-diag, and relevant log events.

vercelのその他のスキル

benchmark-sandbox
vercel
Vercel Sandbox上でvercel-pluginの評価シナリオを実行し、ローカルのWezTermパネルの代わりに使用します。Claude Codeとプラグインがプリインストールされた一時的なマイクロVMをプロビジョニングします…
official
emil-design-eng
vercel
このスキルは、Emil KowalskiのUIポリッシュ、コンポーネントデザイン、アニメーションの決定、そしてソフトウェアを素晴らしいものにする目に見えない細部に関する哲学をエンコードしています。
official
vercel-react-best-practices
vercel
Vercel EngineeringによるReactおよびNext.jsのパフォーマンス最適化ガイドライン。このスキルは、React/Next.jsのコードを記述、レビュー、またはリファクタリングする際に使用すべきものです。
official
vercel-react-best-practices
vercel
Vercel EngineeringによるReactおよびNext.jsのパフォーマンス最適化ガイドライン。このスキルは、React/Next.jsのコードを記述、レビュー、またはリファクタリングする際に使用すべきものです。
official
write-guide
vercel
現実世界のユースケースを段階的な例を通じて教える技術ガイドを作成します。概念は読者が必要とするタイミングでのみ導入されます。
official
release
vercel
Vercelプラグインをリリース — ゲートを実行し、バージョンを上げ、アーティファクトを生成し、コミットしてプッシュします。「リリースして」「出荷して」「バージョンを上げてプッシュして」または「リリースを切って」と依頼されたときに使用します。
official
deepsec
vercel
dev3000からチェックアウトしたVercelプロジェクトに対してDeepSecを実行します。ワンクリックDeepSecセットアップ、プロジェクトコンテキストのブートストラップ、制限付きの初回パス処理などに使用します。
official
backport-pr
vercel
マージされたNext.jsのプルリクエストをcanaryからnext-16-2などの以前のリリースブランチにバックポートします。ユーザーがバックポート、チェリーピック、またはオープンを依頼した場合に使用します…
official