Vercel Sandbox Adds Webhooks for Session Lifecycle Events

Vercel BlogVercel Blog·Original
Operator Bae ChangHyun

Key point

Vercel Sandbox now sends webhooks when sessions are ready, nearing timeout, or stopped, allowing apps and agents to respond to lifecycle events.

Details

  • Vercel Sandbox now sends sandbox.session.started, sandbox.session.expiring, and sandbox.session.stopped webhooks so applications can update state, extend agent sessions, or clean up.
  • Each event includes sandbox and session details; stopped events also report the stop reason, session duration, active CPU time, and network transfer.
  • Expiring notifications arrive one minute before timeout, or according to expiryNotificationLeadTime; each session extension triggers a new warning. Since events can be delivered more than once, handlers should key on the session ID and, for expiring events, sandbox.expiresAt.
  • Agents can subscribe through Vercel MCP, and a workflow can wait for lifecycle events and extend a session while an agent is working, without polling.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.