[Launch options](https://cdpfleet.com/docs/options)

# `inactivity_timeout`

End the session after this long with no traffic on its WebSocket.

**Use it for:** Freeing the thread quickly when a script dies (short), or giving a person or a slow step time to think (long), up to your plan's cap.

**Browsers:** [Google Chrome](https://cdpfleet.com/docs/browsers/chrome#opt-inactivity_timeout), [Microsoft Edge](https://cdpfleet.com/docs/browsers/edge#opt-inactivity_timeout), [Brave](https://cdpfleet.com/docs/browsers/brave#opt-inactivity_timeout), [Opera](https://cdpfleet.com/docs/browsers/opera#opt-inactivity_timeout), [Naver Whale](https://cdpfleet.com/docs/browsers/whale#opt-inactivity_timeout), [Yandex Browser](https://cdpfleet.com/docs/browsers/yandex#opt-inactivity_timeout), [Chromium](https://cdpfleet.com/docs/browsers/chromium#opt-inactivity_timeout), [Patchright](https://cdpfleet.com/docs/browsers/patchright#opt-inactivity_timeout), [Rebrowser](https://cdpfleet.com/docs/browsers/rebrowser#opt-inactivity_timeout), [Camoufox](https://cdpfleet.com/docs/browsers/camoufox#opt-inactivity_timeout), [Firefox](https://cdpfleet.com/docs/browsers/firefox#opt-inactivity_timeout), [WebKit](https://cdpfleet.com/docs/browsers/webkit#opt-inactivity_timeout).

## Details

-   **Type:** `number | string`
-   **Default:** 120s
-   **Example:** `{"inactivity_timeout":"2m"}`

The timer resets on any protocol traffic in either direction. A number of seconds (`90`, `1.5`) or a string with a unit: `500ms`, `45s`, `10m`, `2h` (digits only, no spaces or decimals). Clamped to 1 s – 24 h. An unparseable value silently falls back to the default.

Up to 10 minutes on shared threads, 5 on Community and 24 h on dedicated; a longer value is cut to your plan's maximum. Idle minutes are billed like any others. A slow page load through a proxy can produce no traffic for a while, so keep it at 60 s or more. Never longer than the session's overall timeout.

## Used in

-   [Case 78: keep\_alive: an agent run that survives its client going away](https://cdpfleet.com/docs/cases/keep-alive-reconnect)
-   [Case 58: Do it by hand in live view, then let your code finish in the same browser](https://cdpfleet.com/docs/cases/launch-interactive-to-code)
-   [Short-lived sessions for burst jobs](https://cdpfleet.com/docs/examples#burst-timeouts)
-   [Chrome you can disconnect from and come back to](https://cdpfleet.com/docs/examples#chrome-keep-alive)
-   [Microsoft Edge over CDP that survives a disconnect](https://cdpfleet.com/docs/examples#edge-keep-alive)
-   [Headful Opera over CDP that survives a disconnect](https://cdpfleet.com/docs/examples#opera-keep-alive)
-   [Long-running session](https://cdpfleet.com/docs/examples#long-session)

All options: [launch options](https://cdpfleet.com/docs/options).

---
Source: https://cdpfleet.com/docs/options/inactivity_timeout · Markdown: https://cdpfleet.com/docs/options/inactivity_timeout.md · All docs for AI tools: https://cdpfleet.com/llms.txt
