Tmux Socket Sweep, 2026-05-04¶
URL: https://mkdocs.justinsforge.com/memory/investigations/tmux-socket-sweep-2026-05-04/
Sweep result¶
Ran /home/justinwieb/forge/scripts/forge_tmux_socket_sweep.sh at 16:09 CDT.
Nothing cleaned. Every socket in /tmp/tmux-1000/ had a live tmux server behind it.
/tmp/tmux-1000/ before and after (identical)¶
homebase
spawn-coord-stall-be_Opus47
spawn-coord-stall-debug_Opus47
spawn-extension-host-leak_Opus47
spawn-gcal-reauth_Opus47
spawn-help-with-574e_Opus47
spawn-remind-me-79bd_Opus47
spawn-tmux-socket-sweep_Opus47
spawn-what-all-4e76_Opus47
spawn-what-all-aa3b_Opus47
10 sockets total (1 homebase + 9 spawn-*_Opus47). All passed tmux -S <sock> list-sessions within the 2s timeout, so all are backed by a live server. Zero orphans today.
Dead-socket detection logic¶
The sweep treats a socket as dead iff:
- It is a unix socket (
-S). - Its name is not
homebase(always preserved). timeout 2 tmux -S <sock> list-sessionsreturns non-zero (server gone, or hung past 2s).
Dead sockets are rm -f'd. Live ones are left alone. The orphan-claude reaper (forge-reap-orphan-claudes.timer, 15min) handles the inverse case (claude binary still running but tmux session archived).
Standard operating practice¶
- Sweep runs automatically before every
/spawnand on a 10-min systemd timer (per script header). No manual invocation needed in normal flow. - Manual run:
/home/justinwieb/forge/scripts/forge_tmux_socket_sweep.sh. Idempotent, safe to call any time. homebasesocket is sacrosanct: never swept, even if the server behind it is dead. If homebase is broken, use/rebridge home-baseto republish, do not delete the socket.- If the sweep reports
swept dead socket: <name>for a socket you expected alive, the tmux server died (OOM, manual kill, host reboot remnant). Cross-check with/sessions listandforge-reap-orphan-claudeslogs. - Healthy steady state on Console:
homebaseplus Nspawn-*_Opus47matching the active/spawncount. If N drifts (sockets persist past their session's archive), that's a reaper miss, not a sweep miss; investigate the reaper.
[Claude Code]