120
timeout budget
The user gave you one second. Every hop spends from that second. Do not give each hop its own one second.
What is timeout budget?
A timeout budget is the time left for a request, passed down so callees stop before the caller has already given up. If the edge allows 800ms and the database is given 2s, the edge returns an error while the database keeps working.
Why does timeout budget matter when vibe coding?
Models set `timeout: 30` on every client. Stacked, a page can wait minutes, or the front times out and the back continues a write the user thinks failed. One budget, sliced.
How do you do timeout budget?
Pick the user-facing limit. Subtract hops as you go. Cancel downstream work when the budget is gone. A write that might have committed needs an idempotency key, not a longer wait.
How do you ask a model for timeout budget?
One timeout budget for (request). Downstream timeouts must fit inside it. Cancel leftover work when time is up. Writes use an idempotency key so a retry is safe. Do not give every client 30s.
What goes wrong with timeout budget?
A deadline that is checked once at the start and never again. The budget has to travel with the call.