Daily Edition Sources +5

The Crush Patch That Isolated Agent Shells

Kieran Klukas changed how Crush runs child processes so shell jobs cannot seize the parent session or corrupt the terminal UI.

Diagram Punk poster on torn paper showing a Crush TUI, a setsid process-group door, a child shell room, and source scraps for d3af321b, exec_unix.go, tests, and run.go.
Diagram PunkCrush gives child shell processes their own room.
repo charmbracelet/crush evidence
5 source signals 1 repo 2 linked commits
Evidence: 2 linked commits / June 18, 2026 / Daily Edition
Open Edition Evidence below

Kieran Klukas's June 17 commit d3af321b is a small maintenance story with a concrete human target: anyone running an agent command inside Crush should not lose the parent TUI because zsh job control or a child signal grabbed the terminal.

The Public Trail

The patch adds internal/shell/exec_unix.go, creates a process-group exec handler, sets SysProcAttr.Setsid, and sends cancellation signals to the negative child PID so a whole child process group is interrupted or killed.

The change also rewires run.go away from the default shell exec handler because the default appends an execution path without the process isolation Crush needed.

Why This Contribution Matters

The tests explain the user pain better than a feature label. One test checks that a child sending SIGINT to its own process group does not reach the parent. Another simulates interactive zsh job control and fails if it hangs or loses the expected output.

Klukas also landed nearby Crush work on scroll filtering and model discovery, but this patch is the clearest maintenance arc: a terminal agent is only useful if its helper process cannot damage the interface that is supervising it.

The Conversation To Open

The fair question for the Crush maintainers is what other shell surfaces still need this kind of isolation contract: sudo prompts, long-running grandchildren, Windows parity, or plugin-spawned commands.

Evidence Trail

Receipts below the story

The article above is the public narrative. This section keeps the source trail, limits, and reporting notes on the same page.

Edition
DateJune 18, 2026
LaneDaily Edition
Confidence78%
Sources5
Reposcharmbracelet/crush

Reporter Notes

The test names are unusually useful public evidence. They translate process groups into user-facing risks: parent process signals, blocked TTY reads, zsh job control, and lingering child processes.

Primary Evidence

Evidence Limits

  • This evidence proves the shell isolation mechanism and tests in the public repository; it does not prove every terminal, sudo, Windows, or plugin-spawned process issue is fixed.
  • The article uses public GitHub author metadata only and does not infer private identity, employer, or motivation.
Letters & Corrections

Send a note to the desk

Corrections, missing context, or a follow-up lead.