Durable sessions
Terminals that survive reboots: what persists, for how long, and how recovery works.
A nala terminal is not a process in a window. It is a PTY session owned by the daemon, which means its lifetime is independent of any app window, and usually of the machine's uptime.
What survives what
| Event | What happens |
|---|---|
| Close the desktop window | Nothing is lost. The daemon keeps the PTYs; reopening the app reattaches with full scrollback. |
| Reboot the machine | Sessions restore from disk: terminals, scrollback, and agent conversation state come back where they were. |
| Suspend a session | Suspended sessions persist to disk with a 7-day TTL. Resume any time within the week with nala resume <sessionId>. |
| Agent restart | Resume bindings are captured per agent, so conversations restore exactly, not just approximately. |
Scrollback is configurable from 1,000 to 100,000 lines per pane and is replayed on reattach.
The launch and reattach path
How recovery works
The daemon checkpoints session state to disk continuously. On reattach, nala replays scrollback, restores pane layout and workspace structure, and rebinds agents to their resume points. Shell integration does the quiet bookkeeping:
- OSC 133 marks prompt boundaries, so command history and status survive meaningfully, not just as raw text.
- OSC 7 reports the working directory, so restored panes reopen in the right folder.
- OSC 9/99/777 drive desktop notifications; OSC 7727 keeps the git branch indicator live.
Hooks for PowerShell, Bash, and CMD are injected automatically. Nothing to configure.
Pausing on purpose: /stay and checkpoints
Inside the TUI, /stay pauses a session with a durable checkpoint (options: --now, --after-tool, --detach, --reason). /resume (or its friendly alias /come) picks it back up, in any terminal, on any surface.
nala sessions list # everything the daemon is holding
nala sessions show <id> # details of one session
nala resume <sessionId> # bring it back
nala sessions archive <id> # tidy it away
Why this changes how you work
Durability removes the two classic terminal taxes: the "don't close that window" anxiety, and the "rebuild context every morning" ritual. Long-running agents can run overnight; a week-long debugging saga lives in one session; a reboot for an update is a non-event. It is also what makes A2A messaging trustworthy: envelopes survive restarts and land exactly once, because the same store that holds your scrollback holds the mail.