Agent hibernation

Let Orca pause idle background agent terminals and auto-resume them when you reopen the worktree.

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 the next time you open the worktree.

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.
  • The terminal isn't in the active worktree or any worktree currently rendering a foreground terminal.
  • It hasn't received keystrokes since the agent finished.
  • The agent is one with a resumable session: Claude, Codex, Gemini, Antigravity, OpenCode, Droid, or Grok.
  • It's been idle for at least the configured idle window (default 30 minutes).
  • No mobile session is currently driving the terminal.

A terminal that fails any check stays running. If a worktree has multiple agent panes, they hibernate together as a unit so a partially-paused worktree never ships.

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 done update; any keystroke or new output resets it.

Longer windows trade memory savings for fewer pauses; shorter windows pause more aggressively but cost a resume next time you switch back.

Resuming

When you open a hibernated worktree, Orca relaunches the agent CLI with the same resume flags it would use from Agent Session Historyclaude --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.

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, Pi, Copilot, 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.