Session was closed after inactivity
You might be here because: “Closed after inactivity” · “my session ended by itself” · “I left it open and came back to Session ended” · “idle_timeout” · “how long can I leave a session idle” · “it logged me out / kicked me out” · “session timed out”
Short answer
The session was ended because nothing happened in it for a while. This is normal: it frees the Mac for other work. Launch the profile again; if it uses a profile, its cookies and logins were saved when it closed.
Check first
- The recap under “Session ended” reads “Closed after inactivity — This session was closed after a period of inactivity.”. If it says something else, see that doc instead.
- Did you leave the window open without touching the page? Watching alone does not count as activity for sessions driven from code.
Likely causes and fixes
-
A session that no AI agent drives, left untouched. That is a manual session in the desktop app, or one started from code with
POST /v1/sessions, a profile launch ormode: "manual". These get a 30-minute idle timeout. After 30 minutes without input the session closes. Fix: launch again; interact now and then if you want to keep it. -
AI or pair session (including one started from code with
POST /v1/agent-sessions). These close after about 5 minutes with no step running and no input. They are not closed for inactivity while a step is running or while the session is paused. A session created from code withidle_timeout_secondscloses after that many seconds instead (from 120 up to the default for its mode; it can only be shorter). Fix: send the next task, or launch again. A session started from code withPOST /v1/sessionsor a profile launch has no agent driving it and gets the 30-minute idle time in item 1. -
You want a session that never closes. Not offered: no setting in the app changes these timeouts (the value is a server default), and
idle_timeout_secondsat create can only shorten them. -
From code.
closed_reasonisidle_timeout. Create a new session; there is nothing to retry.
If it still fails
If sessions close after inactivity far sooner than the times above while you are actively using them, press Talk to a person in this chat (or open Help) and include the session id, the time it closed and what you were doing. No account action is needed.