DiceTermAlpha

Session restore

Close DiceTerm and reopen — layout, scrollback, names, colors, and window state come back exactly.

When you close DiceTerm and reopen it, everything comes back exactly as you left it. You don't need to do anything — session restore is always on.

What is restored

Item Details
Layout & pane positions The full split tree for every workspace, including which pane was focused
Scrollback The complete xterm buffer for each pane (up to your configured scrollback limit)
Pane names Names set via the terminal (OSC 0/2 sequences) or manually
Pane colors Per-pane accent colors
Working directory The last directory each pane was in (via OSC 7)
Maximized pane If a pane was maximized, it reopens maximized
Window size and position Exact window geometry, stored separately
Saved servers SSH server entries (host, user, port — no passwords or keys)
All settings Every setting in Settings, including remapped shortcuts
Named arrangements All saved pane layouts from the Layouts menu

How it persists

Session state is written to %APPDATA%\DiceTerm\session.json using an atomic write — DiceTerm writes to a temporary file, calls fsync, then renames it into place. This prevents a partial write from corrupting your session.

A rolling backup is kept at %APPDATA%\DiceTerm\session.backup.json. If session.json is ever unreadable on startup, DiceTerm falls back to the backup automatically.

Saves are debounced ~1.2 seconds — changes accumulate briefly before being written, so resizing panes or switching workspaces rapidly doesn't cause a flurry of disk writes. A final flush happens immediately when you quit, so the last state is always captured.

Window geometry (size and position) is stored in a separate file, %APPDATA%\DiceTerm\window.json, and restored independently of the session.

SSH panes on relaunch

SSH panes can't stay connected across a restart, but they don't come back empty. When DiceTerm reopens an SSH pane, it:

  1. Seeds the pane with the saved scrollback so your previous output is immediately visible.
  2. Shows a ──session restored · reconnecting── banner.
  3. Reconnects automatically using the saved server details.

The reconnect uses the same ssh.exe call as a normal connection — authentication goes through your system OpenSSH client as usual.

Tip: If a reconnect fails (for example, the server is unreachable), the scrollback and pane name are still there. You can reconnect manually at any time by clicking the server in the rail.

See also

  • Workspaces — workspaces and named arrangements are part of what session restore saves.
  • Panes & grids — pane layout, names, and the maximized state are all restored.