-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Codex CLI resume timeouts can leave descendant processes running on Windows #111900
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.ClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.ClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect process state after a timeout)
Beta release blocker
No
Summary
On Windows, a timed-out Codex CLI session resume signals only the direct
codex exec resumeprocess, allowing shell or tool descendants to remain running after OpenClaw reports the timeout.Steps to reproduce
timeoutMs.ChildProcess.kill()only on the direct child PID; it never requests Windows process-tree termination.Expected behavior
The timeout should terminate the Codex CLI process and its descendants, with a bounded fallback if the Windows termination helper fails or stalls.
Actual behavior
The timeout sends
SIGTERMand laterSIGKILLonly to the directChildProcess. Node's Windows implementation does not propagate those calls to descendant processes.OpenClaw version
mainat5197428add4787e8773bb26fe695c2e2d19d7b2aOperating system
Windows 11
Install method
Source checkout
Model
Codex CLI session runtime; model-independent
Provider / routing chain
OpenClaw Codex plugin -> local Codex CLI
Additional provider/model setup details
No provider-specific setup is required. The defect is in local child-process timeout cleanup.
Logs
Screenshots, recordings, and evidence
A focused regression harness covers Windows
SIGTERM/SIGKILL, trusted System32 resolution, spawn errors, nonzero exits, stalledtaskkill, successful completion, and non-Windows direct signaling. All 8 cases pass with the proposed fix.Impact and severity
Additional information
The fix uses OpenClaw's trusted Windows System32 resolver, force-terminates the complete process tree, and bounds the
taskkillhelper with a watchdog before falling back to the direct child.