fix(codex): stop timed-out resume process trees on Windows#111902
fix(codex): stop timed-out resume process trees on Windows#111902ooiuuii wants to merge 10 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 12:52 PM ET / 16:52 UTC. Summary PR surface: Source +90, Tests +142. Total +232 across 4 files. Reproducibility: no. —not at high confidence in this review. The linked issue gives a concrete Windows path and the source-level timeout path is clear, but the PR provides no observed after-fix Windows process-tree run. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Confirm whether the trusted System32 resolver is an intended plugin SDK contract, then capture redacted after-fix Windows evidence showing a timed-out Codex resume and descendant termination. Do we have a high-confidence way to reproduce the issue? No—not at high confidence in this review. The linked issue gives a concrete Windows path and the source-level timeout path is clear, but the PR provides no observed after-fix Windows process-tree run. Is this the best way to solve the issue? Unclear. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 38df399ed819. Label changesLabel justifications:
Evidence reviewedPR surface: Source +90, Tests +142. Total +232 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
f22614b to
a413b0c
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(codex): stop timed-out resume process trees on Windows This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Closes #111900
What Problem This Solves
Fixes an issue where Windows users resuming a Codex CLI session could have shell or tool descendants continue running after the resume timed out. OpenClaw previously signaled only the direct CLI child, which does not terminate its process tree on Windows.
Why This Change Was Made
Windows timeout cleanup now invokes a trusted, absolute
System32\\taskkill.exepath with/F /T /PIDto terminate the complete process tree. Resolution is private to the Codex extension, so this PR adds no public Plugin SDK contract. Two bounded tree-level attempts share the existing two-second hard-kill budget, and retries stop once the original child exits so a reused PID cannot be targeted. An activetaskkillis allowed to finish descendant cleanup after it causes the parent to exit; if it stalls, the watchdog stops it without retrying the exited PID. Non-Windows behavior remains unchanged.User Impact
Timed-out Codex CLI resume work no longer leaves descendant processes running on Windows. This prevents lingering resource use and commands continuing after OpenClaw has reported a timeout.
Evidence
Real Windows process-tree proof
Environment: Windows 11, Node
v22.22.3, PR headccea7cc8f22e9378fddbee1cf02eb65bda0fe609.The proof driver starts a real hidden PowerShell parent that creates a long-lived descendant, calls the production
signalCodexResumeProcessTreehelper, and polls both OS PIDs after cleanup:Focused regression tests
Coverage includes trusted absolute
System32resolution, malicious/invalid Windows root inputs, successful termination, spawn errors, nonzero exits, the shared two-second hard-kill deadline, bounded watchdog behavior, retry suppression after the original child exits, allowing an active helper to finish descendant cleanup, no-PID fallback, and unchanged non-Windows signaling.Additional checks
oxlintpassed on the changed production and test files.oxfmtcompleted cleanly on the changed files.test/tsconfig/tsconfig.extensions.test.json.git diff --checkpassed.autoreview clean: no accepted/actionable findings reported; overallpatch is correct (0.90). The final type-only commit was also clean (patch is correct, 0.92).Proof limitation: this exercises the production Windows process-tree helper with real OS processes rather than waiting for a live Codex provider session to time out. The resume timeout integration and both timeout signals are covered by focused tests.