vercel-sandbox

โดย sentry

ตรวจสอบวงจรชีวิตของ Vercel Sandbox, การหมดเวลา, สแนปชอต, และพฤติกรรมการคงอยู่ ใช้เมื่อผู้ใช้

npx skills add https://github.com/getsentry/junior --skill vercel-sandbox

Investigate Vercel Sandbox using current official docs, installed SDK contracts, and only then any consumer-specific integration code.

Step 1: Classify the request

Pick the narrowest reference set before answering:

Request typeRead first
SDK/API behavior, lifecycle semantics, snapshots, stable vs beta persistencereferences/api-surface.md
Product-level usage patterns and architectural choicesreferences/common-use-cases.md
Broken behavior, confusing docs, missing files, or suspected persistence bugsreferences/troubleshooting-workarounds.md

If the task spans categories, load only the relevant files above.

Step 2: Establish which sandbox model applies

  1. Inspect the installed @vercel/sandbox version and local types before trusting any doc page or changelog.
  2. If local types only expose sandboxId, Sandbox.get({ sandboxId }), extendTimeout, and snapshot-backed source, treat the runtime as stable 1.x ephemeral sandboxes.
  3. If local code and types expose named sandboxes, name, persistent, session updates, or automatic resume after stop, treat the runtime as the persistent beta model.
  4. Qualify time-sensitive claims with a date or retrieval note.

Step 3: Apply core guardrails

  1. Distinguish three separate clocks before diagnosing workspace loss:
    • Vercel function/runtime timeout
    • Application/request timeout in the embedding system
    • Sandbox timeout
  2. On stable 1.x, Sandbox.get({ sandboxId }) only helps while the sandbox is still alive.
  3. On stable 1.x, once the sandbox stops, its filesystem is gone. Do not describe that as resumable persistence.
  4. sandbox.snapshot() is not workspace durability. It creates a new snapshot artifact and stops the source sandbox.
  5. Snapshots and persistent beta solve different problems:
    • snapshots create new starting points
    • persistent beta preserves named workspace state across sessions
  6. In embedded systems, inspect the consumer's persistence wiring before concluding that Vercel destroyed the workspace immediately.
  7. Do not infer persistent-beta behavior from a changelog alone. Confirm the installed SDK and local call sites.

Step 4: Investigate the Vercel surface first

  1. Check the installed SDK surface first:
    • installed @vercel/sandbox types
    • official stable docs for concepts, snapshots, SDK reference, and limits
    • persistent-beta changelog only if named persistence is relevant
  2. Determine whether the question is about:
    • active sandbox reuse
    • stopped sandbox recovery
    • snapshot-based warm starts
    • persistent named workspaces
  3. Establish which timeout fired first and whether the sandbox should still have been active.

Step 5: Inspect consumer code only when the task is app-specific

For repo-local debugging in Junior, inspect:

  1. timeout budget alignment:
    • packages/junior/src/chat/config.ts
    • packages/junior/src/chat/app/production.ts
  2. sandbox identity persistence and reuse:
    • packages/junior/src/chat/runtime/thread-state.ts
    • packages/junior/src/chat/runtime/turn-preparation.ts
    • packages/junior/src/chat/sandbox/session.ts
  3. whether timeout paths actually resume:
    • packages/junior/src/chat/agent/index.ts
    • packages/junior/src/chat/agent/resume.ts
    • packages/junior/src/chat/task-execution/paused-turn.ts
  4. where sandbox metadata is persisted:
    • packages/junior/src/chat/sandbox/session.ts (reports each new ref through onSandboxRefChanged)
    • packages/junior/src/chat/providers/slack/turn.ts and packages/junior/src/chat/task-execution/conversation-turn.ts (save it to thread state)
  5. whether consumer-specific snapshots are being confused with Vercel product persistence:
    • packages/junior/src/chat/sandbox/snapshot/

Step 6: Recommend the smallest correct fix

Choose the narrowest fix that matches the diagnosed failure mode:

  1. Sandbox still alive but next turn started fresh:
    • Persist sandbox identity earlier.
    • Resume from the active sandbox instead of recreating it.
  2. Sandbox actually stopped:
    • Increase sandbox timeout or extend it while work is active.
    • Externalize intermediate outputs if they must survive stop.
  3. Confusion caused by docs drift:
    • Align implementation advice to the installed SDK, not the newest beta docs.
  4. Need true durability across stop/timeout boundaries:
    • Use external storage or migrate intentionally to the persistent beta model after confirming API availability.

Step 7: Return a concrete diagnosis

Default report structure:

  1. Active sandbox model: stable-ephemeral or persistent-beta
  2. What likely timed out first
  3. Whether the sandbox probably still existed after the failed turn
  4. Whether workspace loss came from Vercel stop/destruction or consumer state handling
  5. Smallest next fix, with the exact file(s) or SDK change required

Skills เพิ่มเติมจาก sentry

add-ai-integration
sentry
เพิ่มการรวมผู้ให้บริการ AI ใหม่เข้าไปใน Sentry JavaScript SDK ใช้เมื่อมีส่วนร่วมในการสร้างเครื่องมือวัด AI ใหม่ (OpenAI, Anthropic, Vercel AI, LangChain ฯลฯ)…
add-cdn-bundle
sentry
สร้างชุด CDN ใหม่สำหรับแพ็กเกจเบราว์เซอร์ที่มีฟีเจอร์ที่ระบุ
agent-prompt
sentry
คู่มืออ้างอิงสำหรับการเขียนพรอมต์และสกิลของเอเจนต์อย่างมีประสิทธิภาพ ใช้เมื่อสร้างสกิลใหม่ ตรวจสอบคุณภาพของพรอมต์ หรือทำความเข้าใจพรอมต์ของ Warden…
agents-md
sentry
ทักษะนี้ควรใช้เมื่อผู้ใช้ขอให้ "สร้าง AGENTS.md", "อัปเดต AGENTS.md", "ดูแลเอกสารเอเจนต์", "ตั้งค่า CLAUDE.md" หรือต้องการให้เอเจนต์…
agents-md
sentry
สร้างและดูแลเอกสารเอเจนต์ที่สั้นกระชับ มีเนื้อหาสำคัญ ภายใต้ 60 บรรทัด บังคับใช้แนวปฏิบัติที่ดีที่สุดที่ผ่านการวิจัยสำหรับเอกสารที่เอเจนต์ใช้ คุณภาพของคำสั่งจะลดลงตามความยาว ต้องมีสามส่วนหลัก: Package Manager, File-Scoped Commands (test/lint/typecheck ต่อไฟล์), และ Commit Attribution พร้อมระบุตัวตนเอเจนต์ วิเคราะห์โครงสร้างโปรเจกต์ (ไฟล์ lock, ไฟล์กำหนดค่า linter, คำสั่ง CI, ตัวบ่งชี้ monorepo) เพื่อกำหนดสิ่งที่ควรอยู่ในไฟล์ ใช้เฉพาะหัวข้อและสัญลักษณ์แสดงหัวข้อย่อย อ้างอิง...
agents-md
sentry
ทักษะนี้ควรใช้เมื่อผู้ใช้ขอให้ "สร้าง AGENTS.md", "อัปเดต AGENTS.md", "ดูแลเอกสารเอเจนต์", "ตั้งค่า CLAUDE.md" หรือต้องการให้เอเจนต์…
ai-sdk
sentry
ai-sdk — ทักษะที่สามารถติดตั้งได้สำหรับเอเจนต์ AI เผยแพร่โดย getsentry/webvitals.com
analytics
sentry
เครื่องมือและค้นพบเหตุการณ์วิเคราะห์ใน UI ส่วนหน้าของ Sentry ใช้เมื่อเพิ่มการติดตามไปยังปุ่ม หน้า โมดอล หรือการโต้ตอบที่กำหนดเอง เมื่อกำหนดใหม่…