BuildNot yet confirmed elsewhere1 publisher3 min readPublished
The hard part of running five coding agents is not the model, it is the process tree
NestMux's author documents the plumbing: HOME redirected per pane, one git worktree each, and a resource panel that has to guess which process belongs to whom.
The Engineer · Build desk

What happened
- NestMux puts Claude Code, Codex, Gemini CLI, Copilot and OpenCode in one grid of real terminals, each pane carrying its own account and its own git worktree.
- Broadcast is the terminal's keystroke handler fanned out to every pane, so it also sends Ctrl+C and arrow keys and never checks whether a pane is ready.
- Measuring the PID the app spawned reports about 77 MB per pane and makes every agent look idle, because that process is only the shell.
- When the parent link is gone, processes are attributed by whether their path sits inside a worktree, which the author calls a heuristic.
Why it matters
- constraint With readiness detection ruled out on purpose, the operator becomes the scheduler: you hold the prompt until you believe every pane is at one, and the app will not tell you.
- capability Isolation reduced to HOME plus cwd means two accounts with the same vendor can work in parallel, and a new agent CLI arrives as user configuration instead of a shipped integration.
- cost Answering whether an agent is doing anything costs a machine-wide process enumeration every second and a half plus ntdll reads for the strays, paid on the developer's own box.
- exposure Per-pane resource and port figures are ownership guesses, so an unrelated process that happens to live in a worktree gets billed to that agent.
Seventy-seven megabytes per pane is the most instructive number in the write-up [14]. It is not a fault that announces itself, because the process the app spawned really does use about that much: the pane's own process is a shell, the agent CLI is its child, and a dev server the agent started is a grandchild or has been reparented away entirely [13]. Measure the handle you hold and you get the same figure in every cell, with every agent apparently asleep.
What replaces that measurement is not a better measurement. It is an ownership argument in three passes [20]. The first walks the tree from a single machine-wide `Get-CimInstance Win32_Process` snapshot, cached for a second and a half and shared by everything that needs it in that polling cycle [15]. The second gives up on lineage: if a process's executable path or command line points inside a worktree, it belongs to that worktree's pane [16]. The third reads the process's current directory, which on Windows means going through `ntdll` because no API exposes it [17]. Each pass answers a weaker question than the one before, and the author says plainly that the result is a heuristic that gets the common cases right [18].
The cache is the part worth stealing. One enumeration of every process on the machine per cycle, reused by all consumers, means the cost does not scale with panes: a five-agent grid pays for one snapshot rather than five [21].
All of that sits on top of an isolation story that is close to trivial. A shell is spawned with node-pty, HOME is redirected to the pane's account directory, cwd is set to its worktree, and the command is typed in [3]. That is what buys two simultaneous Claude logins where `~/.claude` means something different in each [6], and four agents editing one repository without overwriting each other [7]. The author notes the Windows specifics of both are genuinely fiddly and covered separately [8]. Nothing parses agent output and nothing wraps an API [5], which is why supporting a new CLI is a row in a list instead of a release [4]. The stated reason for refusing readiness detection is that same economy: read agent output to decide whether a pane is ready, and every upstream CLI update becomes a potential outage [12]. The compensation is that raw-keystroke broadcast works against anything that reads a terminal, a REPL or an interactive rebase included [10].
The honesty the piece promises about what does not survive a restart [19] is where the data model has already answered the question, even if the published excerpt stops before spelling it out. A pane is described entirely by strings and paths [2], so a restart can rebuild the container: same HOME, same worktree, same command. What cannot come back is anything that lived in the pty and the process tree hanging off it [22]. That last inference is mine rather than the author's, but it is the line any tool in this shape has to draw, and the one users deserve written down: the durable state is a config file, and the session is something you agreed in advance to lose.
What to watch
- Whether the restart ledger arrives as an explicit list of what is rebuilt from the pane object and what is simply gone.
- Whether readiness detection ever ships, and if so whether it parses agent output or watches the pty for quiescence.
- Whether per-pane resource numbers get a confidence marker in the UI, or keep presenting heuristic attribution as measurement.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence55
- Adoption
- Insufficient
- Hype gap0
- Incentives72
- Confidence45
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
NestMux is a desktop app whose author runs Claude Code, Codex, Gemini CLI, Copilot and OpenCode in a grid of real terminals, each with its own account and its own git worktree.
- [2]
Every cell in the grid is described by a plain object (PaneNode) with fields id, aiType, accountName, accountDir, cmd, repoPath, shellId and borderColor.
- [3]
A pane spawns a shell with node-pty, redirects HOME to accountDir, sets cwd to repoPath and types cmd into it; there is no AI-specific code behind any of it.
- [4]
Adding support for a new agent CLI is a row in a list, which is why custom CLIs are a user-facing feature rather than a release.
- [5]
The app does not parse the agent's output, does not wrap its API, and does not know what the agent is doing; it is a program in a terminal.
- [6]
accountDir is an isolated HOME, so two panes can be signed into two different Claude accounts at once and ~/.claude means something different in each.
- [7]
repoPath is a git worktree, so four agents editing the same repository do not overwrite each other.
- [8]
The author wrote up the Windows specifics of the isolated HOME and the worktrees separately, describing that part as genuinely fiddly.
- [9]
Broadcast is implemented in the terminal's onData handler: in broadcast mode keystrokes are written to every pane id, otherwise only to the focused pane.
- [10]
Because broadcast operates on raw input rather than a message, it works with anything that reads a terminal, including agents with their own TUI, a REPL, and git rebase -i.
- [11]
Broadcast sends everything, including Ctrl+C and arrow keys; it does not check whether a pane is ready, so an agent that is still booting receives the prompt as input to whatever prompt it happens to be showing, and there is no wait-for-all-panes-idle.
- [12]
The author calls the absence of readiness detection a design position rather than an oversight: adding it means parsing agent output, after which every CLI update can break the app.
- [13]
Per-pane CPU, memory and open ports is the hardest thing in the app because the pane's own process is a shell, the agent is its child, and the dev server the agent started is a grandchild or has been reparented and is nobody's child.
- [14]
If you measure the PID you spawned, every pane reads about 77 MB and looks idle.
- [15]
The app resolves the whole process tree per pane per polling cycle; on Windows that means one Get-CimInstance Win32_Process snapshot for the entire machine, cached for a second and a half and shared by everything that needs it in that cycle, then walked in memory.
- [16]
When the parent link is gone, which on Windows it frequently is, the fallback matches a process's executable path or command line against the worktree path prefix and attributes that process to the worktree's pane.
- [17]
A third pass reads each process's current directory, which on Windows means going through ntdll because there is no API for it.
- [18]
The author states that the attribution is a heuristic which attributes correctly for the common cases.
- [19]
The article's framing promises to cover the parts that are heuristics wearing a confident UI and the parts that do not survive a restart.
- [20]
The resource attribution described amounts to three distinct passes: a parent-tree walk over a cached snapshot, a worktree path-prefix match, and a per-process current-directory read.
- [21]
Because the machine-wide process snapshot is cached and shared within a polling cycle, a five-pane grid pays for one process enumeration per cycle instead of one per pane.
- [22]
Since a pane is fully described by serialisable strings and paths, a restart can rebuild the pane's environment (HOME, worktree, command), while anything held only in the pty and its child process tree cannot be restored.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.toHow we run five coding agents side by side in one window
1 article · August 23, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.