GeezerVison is showing github.com — fix(server): skip Windows cleanup for exited child processes by Alb11747 · Pull Request #16007 · pingdotgg/t3code
Conversation
Alb11747
commented
Oct 5, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
On Windows, Effect launches taskkill /T /F after Node has already observed a child exit. This adds redundant work to failing Git commands and can target a reused PID. See #2537.
Patch the shared Windows cleanup helper to complete its callback without launching taskkill when exitCode or signalCode is set. Live process trees keep the existing cleanup. The patch covers both source and shipped JavaScript for the existing @effect/[email protected] dependency; no dependency versions change.
Verification:
- Frozen-lockfile installation passed.
- Existing process runner and VCS process suites: 43 tests passed.
- A temporary probe using real child processes and simulated Windows taskkill dispatch passed for exited children, repeated kill, and live-child cleanup. Removing the guard makes the probe fail. This does not verify native Windows process-tree behavior.
- Separate simplification and adversarial agent reviews found no actionable issues. No new test files or mock scaffolding added.
Independent Windows benchmark of the equivalent guard reduced failing Git command time from 267–273 ms to 29–32 ms. Exact-head native Windows verification remains outstanding.
Implemented by the original author; takeover review and verification by GPT-6.1-Sol through the Codex harness in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
-
-
⚙️ Run configuration
-
-
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
68e3e016-d273-401e-92fb-68b4f46f0831
📥 Commits
-
-
-
Reviewing files that changed from the base of the PR and between 0471bf997225d3a80aedd6191ba9804079705a3c and 8cee51e.
⛔ Files ignored due to path filters (1)
-
-
-
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
-
-
-
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
-
📝 Walkthrough
-
📝 Walkthrough
-
-
Walkthrough
The patch changes the Windows taskkill helpers to skip PID-based tree cleanup when Node has observed the child leader exit. It also updates the cleanup documentation and registers the patch for @effect/[email protected].
Changes
Windows cleanup
| Layer / File(s) |
Summary |
Guard cleanup by leader status patches/@[email protected], pnpm-workspace.yaml |
The JavaScript and TypeScript helpers call onExit(null) and skip taskkill when exitCode or signalCode is non-null. Otherwise, they retain tree termination. The patch documents this behavior and the workspace config applies the patch to version 4.0.2. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#16850: Applies an equivalent Windows
taskkill helper change to @effect/platform-node-shared version 4.0.1.
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 8cee5
The cleanup change is mergeable after normal checks. Native Windows behavior for the rebuilt 4.0.2 package remains unverified, but no specific failure is established.
Architecture Summary
Architecture risk: 🔵 Low · up to 8cee5
The change affects 2 systems.
Changed systems: patches, pnpm-workspace.yaml
Architecture concerns
No architecture-level concerns identified.
Review details
-
-
-
Systems and components
- observed — patches (service) was modified; 1 changed file maps to changed impact.
- observed — pnpm-workspace.yaml (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in patches/@[email protected]: The JavaScript
taskkill helper now checks whether exitCode or signalCode is non-null; if either is, it calls onExit(null) and skips taskkill. Otherwise, it retains the existing tree-termination command.
- observed — Modified behavior in patches/@[email protected]: The Windows cleanup documentation now limits
taskkill tree termination to when the leader is running and states that descendants outliving the leader are not reclaimed by PID-based cleanup.
- observed — Modified behavior in patches/@[email protected]: The TypeScript
taskkill helper now checks whether exitCode or signalCode is non-null; if either is, it calls onExit(null) and skips taskkill. Otherwise, it retains the existing tree-termination command.
- observed — Modified behavior in pnpm-workspace.yaml: Adds a patched-dependency mapping for
@effect/[email protected] to its patch file.
Pre-merge checks | 4
-
✅ Passed checks (4 passed)
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
The description links the related investigation and explains why this focused fix qualifies without separate approval evidence. |
| Out of Scope Changes check |
 |
The changes remain within the stated scope: they patch Windows cleanup behavior, register the patch, and update related dependency metadata without changing POSIX behavior or dependency versions. |
| Title check |
 |
The title is concise, conventional, and accurately identifies the Windows cleanup change for exited child processes. |
| Description check |
 |
The description clearly covers the problem, implementation, verification results, limitations, issue reference, and agent attribution. It omits a separate Scope and approval heading, but it explains w… |
✨ Finishing Touches
-
-
-
🧪 Generate unit tests (beta)
-
-
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
macroscopeapp
Bot
commented
Oct 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 8cee51e
Macroscope's review found this PR approvable — This is a small, localized Windows process-cleanup fix that avoids stale-PID taskkill attempts while preserving live-process cleanup and POSIX behavior. The dependency patch, workspace registration, and lockfile updates consistently activate only this targeted change.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Follow-up from a Windows 11 24H2 host running T3 0.1.8-nightly.20261109.4433. Three kernel triage dumps on November 9 show bugcheck 0xEF CRITICAL_PROCESS_DIED, victim svchost.exe, and the terminating process object resolves to taskkill.exe. The crashes occurred at 6:36:42 PM, 7:37:20 PM and 8:07:32 PM Eastern. The triage dumps do not contain the killer parent process pages, so I cannot attribute these crashes to T3, a provider, or a project script yet. I am not uploading memory dumps.
The exited-child guard from this PR is present in the installed server. Its shared NodeChildProcessSpawner helper still invokes:
if (hasExited(childProcess)) { onExit(null); return; }
NodeChildProcess.execFile("taskkill", ["/pid", String(childProcess.pid), "/T", "/F"], { windowsHide: true }, onExit);
A temporary host-local IFEO block now records and refuses taskkill. At 8:55 PM it observed repeated /pid <pid> /T /F calls whose caller was the installed T3 Code (Nightly).exe, with its exact start identity checked. These are current cleanup calls, not evidence assigning the earlier crashes to T3.
Installed-byte references:
server.asar SHA256 b4c72c49a28df8474d5888771454f7497997b32df571afeef36d25f573998717.
apps/server/dist/ManagedEndpointRuntime-dymI0Epp.mjs SHA256 b60c46ae7d4937eabdb6bc121f55db03d9ff2e6473658561bd23d3e5e2e2fbcd, helper at character offset 4598661.
Separately, a project-owned QA tree selector had a reproducible stale-parent defect. Windows retains a child's numeric parent PID after the parent exits. A later process reusing that PID was treated as the ancestor of an older boot process. A pure fixture reproduced selection of wininit -> services -> svchost under a newer QA root. Rejecting links where the child predates the current parent fixes that project selector. This does not establish how native taskkill selected any crash victim.
The remaining native cleanup concern is broader than the exited-child guard: a live root alone does not validate every descendant edge. A process handle and creation-time check for each selected process, refusal of critical/unknown processes, and individual termination avoid relying on an unchecked numeric PID tree. I have not tested native /T against system processes and will not do so. The local block remains while the exact caller investigation and permanent repair continue.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
macroscope-review
Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|