Agent hibernation
Let Orca pause idle background agent terminals and auto-resume them when you return to them.
When you keep dozens of worktrees open, idle agents add up — each one is a live PTY holding a model session in memory. Agent hibernation lets Orca quietly stop those terminals once they've been done and untouched long enough, then resume the same session when you return to that agent's tab.
What gets hibernated
Orca only hibernates an agent terminal when all of the following are true:
- The agent is in a done state — it has finished its last turn and isn't waiting on input.
- Its terminal tab isn't visible on screen (the active tab, a tab shown in another split group, or a terminal shown on the Activity page). Other tabs in the active worktree can still hibernate.
- It hasn't received keystrokes since the agent finished.
- The agent is one with a resumable session: Claude, Codex, Gemini, Antigravity, OpenCode, Pi, MiMo Code, Droid, Grok, Devin, or OMP.
- It's been idle for at least the configured idle window (default 30 minutes).
- No mobile session is currently driving the terminal.
- No orchestration Dispatch is still unsettled (
pending,dispatched, or unknown). Sleep is allowed again after runtime-confirmedcompleted,failed, orcircuit_broken. - No live subagent / teammate roster remains on the pane (provider "done" alone is not enough while children are still attached).
A terminal that fails any check stays running. Each agent pane is checked and hibernated on its own, so a finished pane can sleep while a sibling pane or tab in the same worktree keeps running.
Manual sleep is different: it stops the whole worktree at once. Sleep a worktree from the sidebar (use Sleep → With Descendants when nested children exist). See Worktrees. Manual sleep keeps finished and interrupted resumable sessions so reopening the worktree can still relaunch with the same resume flags — it does not wipe those session records just because the pane was no longer "live."
Tuning the idle window
Under the Agent hibernation toggle, Hibernate after sets how many idle minutes a finished background agent has to wait before Orca pauses it.
- Default: 30 minutes.
- Range: 1 minute to 24 hours.
- The clock starts from the agent's last
doneupdate; any keystroke, new output, or returning to the agent's terminal tab resets it.
Longer windows trade memory savings for fewer pauses; shorter windows pause more aggressively but cost a resume next time you switch back.
Finding sleeping worktrees
The sidebar filter menu controls whether sleeping worktrees are shown. If you hide them often, assign Toggle Sleeping Workspaces under Settings → Shortcuts to show or hide them without opening the filter menu.
Resuming
When you switch back to a hibernated agent's tab, Orca relaunches the agent CLI with the same resume flags it would use from Agent Session History — claude --resume <id>, codex resume <id>, and so on — so the conversation, working directory, and provider session pick up where they left off. There's nothing to click; the resume happens as part of bringing the terminal back into the foreground.
Resume also reuses the launch command, arguments, and private environment captured when Orca first opened the agent.
If the agent CLI can't resume the session for any reason (the transcript was deleted, the provider rotated the session ID), the terminal opens to a fresh prompt and the previous transcript stays available under the agent's session history.
Limitations
Only the listed resumable agents hibernate. Cursor CLI, Hermes, Copilot, Trae, and other non-resumable terminals are left running.
Next steps
- Agent session history — manually resume any past session, including ones Orca didn't hibernate.
- Hot-swap Codex accounts — swap the active Codex login without restarting the session, which works alongside hibernation.