claude-failover/internal
Ubuntu 8fdb1937fc feat(switcher): auto-resume dedicated sessions after a swap
When a legitimate quota hit triggered a swap, killAllPoolSessions tore
down the dedicated interactive sessions (ccl-1-conformvault, ccl-2-scanyze)
along with the pool, then recreatePoolSessions re-opened them at a bare
bash prompt. The operator had to manually re-run
  CLAUDE_CONFIG_DIR=<target> claude --dangerously-skip-permissions --resume <uuid>
after every swap, losing whatever conversation was mid-flight.

saveAllSessions only iterates sessions tracked as "working" in state;
user-driven dedicated sessions are rarely in that state so their resume
UUIDs were never saved.

- saveDedicatedUUIDs: capture resume UUID for every configured dedicated
  session regardless of tracked state, before kill.
- relaunchDedicatedSessions(targetHome): after recreate, send a resume
  command on each dedicated session pointing CLAUDE_CONFIG_DIR at the
  target account's home. Missing UUID → leave at shell, no blind launch.
- isValidResumeUUID hardens against a corrupted resume-id.txt.

New TestDedicatedRelaunchAfterSwap verifies end-to-end: pane capture →
UUID persisted → resume command sent with the correct CLAUDE_CONFIG_DIR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 20:24:38 +00:00
..
api feat: SessionLifecycleManager — auto-detect and repair dead tmux sessions 2026-04-14 18:02:25 +00:00
config feat(watcher): Phase 2.1 — SessionWatcher goroutine 2026-04-14 20:27:51 +00:00
dispatcher feat(dispatcher): Phase 2.2 — Task Dispatcher avec fsnotify 2026-04-14 20:30:08 +00:00
janitor feat: Phase 2.7+3 — full integration, config update, systemd unit 2026-04-15 00:15:06 +00:00
lifecycle feat: SessionLifecycleManager — auto-detect and repair dead tmux sessions 2026-04-14 18:02:25 +00:00
notify feat(notify): Phase 2.5 — Notifier Telegram + Resend email 2026-04-14 20:28:46 +00:00
quota fix(quota): veto 5xx errors + tighten patterns to stop false-positive swaps 2026-04-15 19:26:00 +00:00
state fix(quota): add cooldown + 2-poll confirmation to prevent swap ping-pong 2026-04-15 19:18:27 +00:00
switcher feat(switcher): auto-resume dedicated sessions after a swap 2026-04-15 20:24:38 +00:00
tmux feat: SessionLifecycleManager — auto-detect and repair dead tmux sessions 2026-04-14 18:02:25 +00:00
watcher feat(watcher): Phase 2.1 — SessionWatcher goroutine 2026-04-14 20:27:51 +00:00