Sessions and the daemon
The app is a client of thurmd. The daemon owns shell processes, terminal state,
and the saved window, tab, and split layout.
Quit, close, and restart
Section titled “Quit, close, and restart”| Action | Result |
|---|---|
Quit with session.quit = "detach" (default) |
Shells continue to run in the daemon |
| Open the app again | The app connects to the existing session |
| Close a pane | Its process stops |
Quit with session.quit = "terminate" |
Shells stop |
Upgrade the daemon (thurm daemon upgrade) |
Shells and scrollback continue |
| Reboot or restart the daemon | The saved layout returns with empty panes; new processes start |
A disk snapshot cannot restore the memory of a stopped process.
Saved state
Section titled “Saved state”With session.persist = true, the daemon saves state under
~/Library/Application Support/Thurm. THURM_STATE_DIR overrides this directory.
The default snapshot interval is 15 seconds. A snapshot holds the layout and each
pane’s working directory, command and agent session, never its scrollback:
terminal output often holds tokens and keys, so it stays in the daemon’s memory
(terminal.scrollback, 10,000 lines by default). Older versions saved scrollback
in a scrollback folder there; the daemon deletes it when it starts.
An in-place upgrade passes every terminal to the new daemon in a file sealed with AES-256-GCM. Its key never touches the disk: the new daemon reads it from a pipe it inherits from the old one.
thurm savethurm layoutthurm daemon statussave writes a snapshot now. layout prints the saved layout as JSON.
Set session.persist = false to disable persistence.
When session.resume_agents = true, restored panes can run configured agent
resume commands. This starts an agent process again; it does not recover its
previous process memory. Hooks can provide session IDs for a specific resume.
Daemon controls
Section titled “Daemon controls”thurm daemon startthurm daemon upgradethurm daemon install-launchd # macOSthurm daemon install-systemd # Linuxinstall-launchd installs a per-user LaunchAgent to start the daemon at login.
Use thurm daemon uninstall-launchd to remove it. On Linux, install-systemd
writes and enables a systemd user unit (~/.config/systemd/user/thurmd.service)
instead, and starts it when no daemon is running; thurm daemon uninstall-systemd
removes it. The unit is not restarted when it stops, so thurm daemon stop holds
until the next login. Lingering (loginctl enable-linger) keeps the daemon up
after you log out; install-systemd warns when it is off. See
Linux server.
upgrade replaces an older daemon with the installed binary. Compatible
versions transfer terminal state and open process handles so that programs
continue to run. Older daemons without this protocol need a restart, which
cannot preserve running processes.
thurm daemon stop stops the daemon and its running session. Save your work
before you use it. Do not use it as the first step to fix a display problem.
The default socket is /tmp/thurm-UID/thurmd.sock. XDG_RUNTIME_DIR replaces
/tmp; THURM_SOCKET overrides the whole socket path. The app and CLI must use
the same path to control the same daemon.