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
Windows: turn.submit fails with Process did not exit after termination: <pid>, plus UV_HANDLE_CLOSING assertion on bb CLI exit (0.45.0) #5195
Environment. bb 0.45.0 desktop, Windows 11 (x64), Node v24.14.1, local host daemon.
Related. This looks like the same underlying Windows process-teardown race as #4866 (Process did not exit after termination: <pid> on thread stop / idle runtime shutdown). Filing separately because the trigger path here is turn.submit between turns rather than thread-stop/idle-shutdown — please close as a duplicate of #4866 if you'd rather track it there.
Symptom. Sending a new message while the previous turn is still finishing fails with:
Command turn.submit failed
Process did not exit after termination: 33268
The lingering PID (33268 in this run) is a bb.exe child from the prior turn. The work from the previous turn had already completed; retrying the submit recovers and nothing is actually left running.
Companion crash on CLI exit. In the same sessions, individual bb <command> invocations frequently print, on process exit:
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
This is emitted after the command's normal output has already been written to stdout, so the command's effect lands and only the clean shutdown fails. Example: bb plugin reload <id> reports the plugin as running and then exits non-zero with this assertion.
Impact. Benign but disruptive to automation: any script or agent that chains bb subcommands, or submits a turn promptly after the previous one, hits spurious failures even though the operations succeeded.
Reproduction (observed, not a minimal repro).
On Windows, drive bb via the CLI/ACP so turns run back to back.
Submit a new user message right as the previous turn is wrapping up.
Intermittently: turn.submit failed: Process did not exit after termination: <pid>.
Separately, run several bb subcommands in sequence; some exit with the UV_HANDLE_CLOSING assertion from src\win\async.c:76 after printing their output.
Suggested fix. Same as proposed in #4866: when the win32 root-exit wait times out, treat the stop as confirmed if the process is already terminated (process.kill(pid, 0) throwing ESRCH) instead of throwing, and allow a longer wait once termination is confirmed. The turn.submit path appears to go through the same waitForRootExit / process-stop logic, so that fix should cover this trigger too.
Verdict: PARTIALLY REPRODUCED · Confidence: medium · Reproduction label:partial-repro.
Evidence: The delayed-notification regression fails in two clean trusted-main checkouts: the real root PID is gone, but the Windows helper rejects. Both added controls and 11 existing process-tree tests pass in each checkout. Native Windows submission and the companion CLI assertion remain unverified.
Root cause: The Windows helper's one-second timeout treats a missing exit notification as failed termination; the managed-stop wrapper separately requires exit metadata. This mechanism is verified in a model, not a native Windows session.
No PR: The reported native Windows failure was not directly reproduced, so the automatic-fix gate is not met.
Consolidated into #4866 at the maintainer's request. Added the source context, evidence links and any distinct/unverified follow-up scope to the canonical tracker: #4866 (comment)
Closing this report for tracking consolidation, not as fixed. Please continue investigation and updates in #4866; this report remains linked as original evidence.
Activity
bb-slop-cop commentedon Oct 8, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification: Bug · Priority: High · Effort: Medium ·
host,cli.Report: Reproduction and root-cause report.
Verdict: PARTIALLY REPRODUCED · Confidence: medium · Reproduction label:
partial-repro.Evidence: The delayed-notification regression fails in two clean trusted-main checkouts: the real root PID is gone, but the Windows helper rejects. Both added controls and 11 existing process-tree tests pass in each checkout. Native Windows submission and the companion CLI assertion remain unverified.
Root cause: The Windows helper's one-second timeout treats a missing exit notification as failed termination; the managed-stop wrapper separately requires exit metadata. This mechanism is verified in a model, not a native Windows session.
No PR: The reported native Windows failure was not directly reproduced, so the automatic-fix gate is not met.
SawyerHood commentedon Oct 19, 2026
Consolidated into #4866 at the maintainer's request. Added the source context, evidence links and any distinct/unverified follow-up scope to the canonical tracker: #4866 (comment)
Closing this report for tracking consolidation, not as fixed. Please continue investigation and updates in #4866; this report remains linked as original evidence.