Vercel Sandbox Adds Webhooks for Session Lifecycle Events
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, andsandbox.session.stoppedwebhooks 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.