Vibeleaderboard
← All Intel
Intel / article

Vercel Sandbox adds session lifecycle webhooks

Source
vercel.com
Publisher
Vercel
Author
Will Hopkins
Date
Why it matters

Sandbox sessions now emit started, expiring and stopped events with stop reason and CPU and network usage. Agents can extend a session one minute before timeout, so long agent runs need less polling and fewer silent kills.

Key takeaways · AI-distilled
  • Vercel now emits sandbox..started, expiring and stopped webhooks. Stopped events include the stop reason (requested, snapshot, timeout, exited or error) plus session duration, active CPU time and network transfer.
  • The expiring event arrives 1 minute before timeout by default, or at the lead time set by expiryNotificationLeadTime, with a fresh warning after each extension. An can listen through Vercel and call extend_session_timeout.
  • Vercel notes an event can be delivered more than once, so handlers should key on the session ID, and on sandbox.expiresAt for expiring events.
  • With the Workflow SDK, a workflow can wait on these lifecycle events and extend its sandbox session while the agent is still working, without polling.
Terms in this piece · Glossary
  • Sandbox — An enforced restriction that confines a process to specified files, network destinations and other resources, applied by the operating system, a container or a virtual machine.
  • Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.
  • Model Context Protocol (MCP) — A published agreement for an AI application to discover what a separate program offers and ask it to run one of those offerings.
  • Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Tools in this story
Recommended reads