Vercel Sandbox adds session lifecycle webhooks
Vercel Sandbox now sends webhooks for session events including started, expiring, and stopped, enabling real-time updates and automated session management. Developers can subscribe to sandbox.session.started, sandbox.session.expiring, and sandbox.session.stopped events via webhook settings. The expiring event is sent one minute before timeout (configurable via expiryNotificationLeadTime), with a new notification issued upon session extension. Stopped events include stop reason, duration, CPU time, and network transfer data. Handlers should key on session ID and expiresAt for idempotency. Agents can use Vercel MCP to listen and extend sessions. Workflows can leverage lifecycle hooks to wait for events and extend sessions dynamically without polling, using the Workflow SDK.