Fixed
Zombie tmux clients and MCP subprocesses no longer accumulate in long-running agent-deck TUI and web processes (#677).
Four exec.Cmd.Start() call sites paired cmd.Wait() only with their manual-shutdown path, so any child that exited on its own became a zombie process-table entry that was never reaped. On one live conductor this week: 10 zombies on the TUI (all npm exec / uv MCP children from broadcastResponses) plus 43 zombies across web/TUI cascades earlier the same day. Per-zombie memory is tiny but growth is unbounded: over a week-long session with an attached MCP pool and active watcher triage this bloats the process table and eventually trips the per-UID process limit, manifesting as fork/exec failures far from the real cause.
Four fix sites:
internal/tmux/controlpipe.go—reader()saw stdout EOF on tmux subprocess death but never reaped. Addedsync.Once-guardedreap()called from bothreader()defer (natural EOF) andClose()(manual shutdown).internal/mcppool/socket_proxy.go—broadcastResponsessaw MCP stdout EOF, flipped status toStatusFailed, but never calledWait(). Zombie lingered untilStop()/RestartProxy()which for idle MCPs may be never. SamewaitOnce/reap()pattern wired into all three paths (EOF, Stop, socket-create fallback).internal/watcher/triage.go—AgentDeckLaunchSpawner.Spawn()was fire-and-forget. Every triage event produced one zombie. Added async reaper goroutine afterStart().
Regression coverage:
TestControlPipe_NoZombie_*(20 kill-session cycles, asserts zombie count doesn't grow)TestSocketProxy_NoZombie_OnProcessExit(15 MCP death cycles)TestAgentDeckLaunchSpawner_NoZombie(25 triage spawns)
Each test reads /proc/<pid>/status for State: Z (zombie) — RED before fix printed exactly N zombies per N cycles (linear growth); GREEN after fix holds at zero.
Upgrade notes: restart any long-running agent-deck TUI or web process to pick up the fix. Existing zombies reaped by the OS once the parent exits.
Changelog: CHANGELOG.md
Agent Deck v1.7.43
Terminal session manager for AI coding agents.
Installation
Homebrew (recommended):
brew install asheshgoplani/tap/agent-deckQuick Install:
curl -fsSL https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/install.sh | bashGo Install:
go install github.com/asheshgoplani/agent-deck/cmd/agent-deck@v1.7.43Changelog
Full Changelog: v1.7.42...v1.7.43