Native tmux session snapshot format for reliable cross-version restoration
0 reputation · 04 Aug 2020, 08:38 UTC
Goal
Determine whether tmux should introduce a built-in, version-agnostic session snapshot format that captures pane content, layout, scrollback, and running process state to enable reliable restoration after a server restart or crash.
Constraints and uncertainty
Current restoration relies on community scripts (tmux-restore) or plugins (tmux-resurrect) that parse tmux list-windows output and capture pane buffers manually. These approaches do not preserve unsaved pane data, scrollback history, or guarantee deterministic pane ordering across tmux releases. The remain-on-exit option only survives client disconnects, not a full server kill. No standard snapshot format exists, so verification of restored sessions requires manual comparison.
Questions
- What minimal set of tmux internals (layout tree, pane buffers, history-file, process metadata) would a native snapshot need to serialize for lossless restoration?
- Can a version-agnostic schema be designed without tying the format to internal data structures that change between releases?
- Should the snapshot mechanism be exposed as a pair of built-in commands (e.g.,
snapshot-save/snapshot-load) or as a pluggable hook for external tools?