Configure Sandbox Maximum Duration and Keep Alive settings
mainTasks run in a Vercel Sandbox. You can control the lifecycle of this sandbox using two settings:
Maximum Duration
Controls how long the sandbox stays alive from the moment it is created. Timeouts range from 5 minutes to 5 hours. The timeout begins at sandbox creation and includes all agent execution and dependency installation time.
Keep Alive Setting
Determines if the sandbox shuts down immediately after the task completes or stays active until the Maximum Duration is reached.
- Keep Alive OFF (Default): The sandbox shuts down immediately after the task completes. Use this for one-time changes where no further iteration or manual testing is needed.
- Keep Alive ON: The sandbox stays alive with all processes running (including background dev servers like
npm run devif available) until the Maximum Duration expires. Use this if you need to iterate with follow-up messages, test changes in the live environment, or manually inspect the sandbox.