Session Persistence

Remote sessions

When you create a session on a remote host, Haven's daemon manages the PTY process independently of your SSH connection. If you disconnect — close the app, lose network, sleep your laptop — the session keeps running on the remote machine.

When you reconnect, Haven reattaches to the existing session and restores full scrollback. No lost output.

Local sessions

Local sessions are standard shell processes on your Mac. They persist while Haven is running but won't survive an app quit or system restart. Persistence is designed for remote sessions where the daemon keeps things alive.

How the daemon works

On first connect, Haven uploads haven-session-daemon to ~/.haven/bin/ on the remote host. The daemon:

  • Manages PTY sessions via Unix sockets
  • Persists session state and scrollback across disconnects
  • Encrypts all IPC with ChaCha20-Poly1305
  • Starts automatically when Haven connects
  • Supports both x86_64 and aarch64 Linux
  • Fully open source — audit what runs on your machines

Session status indicators

ColorMeaning
GreenRunning / idle
GoldBusy (process actively producing output)
OrangeWaiting for input
RedDisconnected