Summary
When cmux updates via Sparkle (auto-update or manual "Install Update"), the app quits and relaunches. All terminal sessions are destroyed in the process — running shells, background processes, SSH connections, and AI agents (Claude, Codex) are all killed. The update behaves like fully quitting the app and opening it fresh.
This is a major disruption for power users who may have dozens of workspaces with long-running processes. A single update wipes out all active work.
Expected behavior
Terminal sessions should survive app updates. Options include:
- Session persistence across restart — serialize pty file descriptors and restore them after relaunch (like tmux/screen session detach/reattach)
- Process preservation via fd passing — hand off pty FDs to a helper daemon before quit, then reclaim them on relaunch
- Sparkle in-place update without restart — update the binary on disk but keep the running process alive (only restart on next manual quit)
- At minimum: warn before updating — if sessions are active, show a confirmation dialog listing what will be lost ("12 workspaces with active processes will be terminated")
Current behavior
- Sparkle triggers app quit → relaunch
- All ptys are closed, sending SIGHUP to all child processes
- Shells, SSH sessions, running commands, and AI agents are all killed
- On relaunch, workspaces are recreated but with fresh empty shells
- No warning is shown about active sessions being destroyed
Suggested approach
The most robust solution is a session daemon (similar to how VS Code's terminal works, or tmux's server):
- A lightweight
cmuxd helper process owns the pty file descriptors
- The GUI app connects to
cmuxd to display terminal output
- On update/restart,
cmuxd keeps running — ptys stay alive
- On relaunch, the GUI reconnects to
cmuxd and reattaches to existing sessions
A simpler intermediate fix would be to at least warn the user before an update kills active sessions, and let them defer the update.
Impact
- Every update kills all running agents and terminal sessions
- Users lose unsaved work, SSH connections, long-running builds
- Discourages updating, leading to users running stale versions
Summary
When cmux updates via Sparkle (auto-update or manual "Install Update"), the app quits and relaunches. All terminal sessions are destroyed in the process — running shells, background processes, SSH connections, and AI agents (Claude, Codex) are all killed. The update behaves like fully quitting the app and opening it fresh.
This is a major disruption for power users who may have dozens of workspaces with long-running processes. A single update wipes out all active work.
Expected behavior
Terminal sessions should survive app updates. Options include:
Current behavior
Suggested approach
The most robust solution is a session daemon (similar to how VS Code's terminal works, or tmux's server):
cmuxdhelper process owns the pty file descriptorscmuxdto display terminal outputcmuxdkeeps running — ptys stay alivecmuxdand reattaches to existing sessionsA simpler intermediate fix would be to at least warn the user before an update kills active sessions, and let them defer the update.
Impact