You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop the whole process tree for every Harness #435
When a Command is interrupted, every process its sessions started is stopped, on every Harness. Today thirdshift signals only the CLI's process group, so a shell command the CLI started in a process group or session of its own (as Grok Build and OpenCode do) keeps running against a worktree thirdshift has left.
Before signalling, thirdshift takes a snapshot of the session's descendant processes with ps, which works on Linux and macOS. It sends each process group in the snapshot the Harness's stop signals in turn, each with the grace period. A second snapshot before SIGKILL catches processes started in the meantime, and then everything gets SIGKILL. Claude and Codex get this as well.
Acceptance criteria
A scenario test: a fake session starts a long command in its own session (as setsid does) and records its pid. After the Run is interrupted, that process no longer exists. The test runs on Claude and on Codex.
Each Harness's own stop signals and grace period are still sent first, so Codex still gets SIGINT before SIGTERM.
A session that exits on its first signal is not waited on any longer than it is today.
The tree-stop belongs to the Harness adapter's shared stop path, so every new Harness gets it without code of its own.
Activity
JacobStephens2 commentedon Oct 6, 2026
Closed by #443, merged into issue-432 by a thirdshift Merge run.