Windows: reliably terminate CLI process trees - #86
Conversation
Stopping a turn on Windows leaves the CLI's MCP servers running. Every driver spawns its CLI with `detached: true` specifically so the CLI leads its own process group and `process.kill(-pid)` reaps the group — the CLI plus every server and helper it started. Process groups are a POSIX concept: on Windows `process.kill(-pid)` throws EINVAL, the catch falls through to `child.kill()`, and that terminates the CLI alone. Each interrupted or completed turn orphans the MCP servers it started, and they accumulate for as long as the app runs. Windows tracks a parent/child tree instead, which is what `taskkill /T` walks. killTree() picks the right one per platform and keeps the existing best-effort behaviour: it never throws, and it falls back to child.kill() if taskkill is unavailable. Used by all three drivers (claude, codex, acp/core) in place of the identical inline stop() each carried. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgJeiantdRcZSBrc5sqqCp
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
Integrates and hardens #43 on top of the centralized cross-platform process layer now on main.
taskkill /T /Ftaskkilllaunch/failure safely and fall back to stopping the owned CLILocal verification: 190 tests passed (7 platform-specific skips), typecheck, Electron syntax checks, and production build.
Closes #43