Hacker News
A Local Merge Queue for Parallel Claude Code Agents Serializes Builds With a Machine-Wide Lock and PID Crash Recovery
funador/claude-code-merge-queue (92 stars, MIT, 39 points on HN) targets a problem builders running agent fleets hit immediately: several agents landing, building and testing at once cause push races, redundant heavy builds and shared-resource test flakiness. Each agent gets a numbered worktree lane with dedicated directories and ports, a machine-wide lock permits one build at a time across all lanes, and the land command rebases and pushes through a FIFO queue behind a pre-push check hook. Locks detect dead processes by PID and auto-reclaim rather than waiting out timeouts, and unlike GitHub's enterprise merge queue it runs locally at zero cost.
↳ Follow the thread