github asheshgoplani/agent-deck v1.7.43

latest releases: v1.15.0, v1.14.0, v1.13.0...
4 months ago

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:

  1. internal/tmux/controlpipe.goreader() saw stdout EOF on tmux subprocess death but never reaped. Added sync.Once-guarded reap() called from both reader() defer (natural EOF) and Close() (manual shutdown).
  2. internal/mcppool/socket_proxy.gobroadcastResponses saw MCP stdout EOF, flipped status to StatusFailed, but never called Wait(). Zombie lingered until Stop()/RestartProxy() which for idle MCPs may be never. Same waitOnce/reap() pattern wired into all three paths (EOF, Stop, socket-create fallback).
  3. internal/watcher/triage.goAgentDeckLaunchSpawner.Spawn() was fire-and-forget. Every triage event produced one zombie. Added async reaper goroutine after Start().

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-deck

Quick Install:

curl -fsSL https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/install.sh | bash

Go Install:

go install github.com/asheshgoplani/agent-deck/cmd/agent-deck@v1.7.43

Changelog

  • d007991 fix(lifecycle): reap tmux + MCP + triage subprocesses to kill zombie leak (#677, v1.7.43)

Full Changelog: v1.7.42...v1.7.43

Don't miss a new agent-deck release

NewReleases is sending notifications on new releases.