timeout when you create it. The timeout is capped by your account tier — 1 hour on Free, 3 on Paid, 4 on Enterprise — and long-running mode lifts that cap. You can extend a running sandbox’s timeout at any time, or pause it to keep its state without a running clock.
Details
Your tier’s cap is returned by the quota API as
limit.max_length_hours (Python) / limit.maxLengthHours (JavaScript). A long-running sandbox keeps running until its timeout, an idle timeout, or kill(), and bills per second the whole time — always set an explicit timeout, and an idle timeout for services that can sleep.