fix: tmux remain-on-exit prevents session loss when Claude exits

Previously, when Claude exited inside tmux (exitCode=0 or crash), tmux
destroyed the entire session — losing buffer, history, and causing crash
loops on restart attempts. Now:

- Set remain-on-exit on for all tmux sessions
- Detect dead panes via #{pane_dead} instead of assuming session is gone
- Respawn dead panes with tmux respawn-pane -k (preserves session)
- Applied to both startInteractive and startShell paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkonandClaude Opus 4.6 committed 2026-02-19 22:37:45 +01:00
1 parent 1b21e1b8d8
commit db3893d608
5 files changed
+114 -7

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claudeman",
"version": "0.1561",
"version": "0.1562",
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
"type": "module",
"main": "dist/index.js",