Repository navigation
Conversation
Hermes (and similar idle agent TUIs) can keep the ConPTY console non-empty after the first bare kill, so destructive worktree removal fails with "Failed to physically stop every PTY for worktree". - Retry taskkill /T /F once when the root is still alive after the first attempt - Re-tree-kill when immediate/destructive teardown joins a graceful stop - Mid-wait force escalation inside the physical-exit budget (Windows taskkill / POSIX SIGKILL) Closes stablyai#10475
📝 WalkthroughWalkthroughWindows process-tree termination now checks root liveness and can retry 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2ef14ddf-20b0-4068-811c-7507b29822ab
📒 Files selected for processing (7)
src/main/daemon/session-force-kill-escalation.test.tssrc/main/daemon/session.tssrc/main/daemon/terminal-host.test.tssrc/main/providers/local-pty-provider.test.tssrc/main/providers/local-pty-provider.tssrc/main/windows-process-tree-kill.test.tssrc/main/windows-process-tree-kill.ts
…#10475) Address CodeRabbit: tree-kill-only mid-wait on Windows, floor post- escalation waits, join in-flight shutdown if tree-kill throws, escalate only agent/immediate paths, and share a single taskkill wall-clock budget across the live-root retry.
Sync update (
|
|
Closing — superseded, though the core observation was correct and did get fixed.
That is right, and it is the same thing @hanbong5938 found in #9854. It is fixed in #15886: The mid-wait re-escalation and the separate escalation grace window are not carried over. They existed because the first kill could silently do nothing; with the job it either terminates the tree or reports Thanks — the diagnosis held up. |
|
Landed: #15886 is merged ( |
Summary
Fixes
Closes #10475
Test plan
ELI5
On Windows, nested agent processes sometimes survived the first kill, blocking worktree delete. Tree-kill is retried and escalated so stubborn PTYs actually die and delete can finish.