Repository navigation
fix: honor foreground node command timeouts in Codex - #149267
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 2:28 PM ET / 18:28 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR carries remote-node command timeouts through OpenClaw’s Codex adapter, preserving configured defaults, explicit overrides, and cancellation, with documentation and regression coverage. Merge readiness✅ Ready for maintainer review This fix remains necessary on current main. No blocking patch defects were found, and the recorded live observations and documented core/plugin rollout address the earlier compatibility concern. Priority: P2 Review scores
Verification
How this fits togetherThe Codex adapter forwards model-requested tools to OpenClaw. For remote commands, the exec tool sends work through the Gateway to a paired node, then returns the result through two adapter watchdogs. flowchart LR
A[Codex tool request] --> B[Matching thread and turn]
B --> C[Exec timeout policy]
C --> D[Tool and request watchdogs]
C --> E[Gateway node invocation]
E --> F[Paired node command]
F --> D
D --> G[Result returned to Codex]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +87, Tests +720, Docs +18. Total +825 across 22 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one exec-owned command budget across adapter layers and ship the supporting core and Codex plugin together under the documented API-floor contract. Do we have a high-confidence way to reproduce the issue? Yes: current main routes foreground node commands through the 90-second default or 600-second dynamic-tool cap despite longer exec budgets. This review established the mechanism from source without executing it. Is this the best way to solve the issue? Yes: reusing the exec owner’s resolved budget avoids competing timeout policy, and the patch preserves bounded transport waits, cancellation, and existing configuration semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d158d08d0c2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
4638d04 to
ca5c41a
Compare
|
The PR description now records the core/plugin rollout contract and the completed live evidence.
Verification: the full real Codex → packaged plugin setup/update-finalize → isolated Gateway → paired node suite passed all four cases, including 690,004 ms execution and Stop killing a zero-timeout process. Nine focused release/packaging checks also passed for version synchronization, compatible/incompatible host admission, and generated plugin peer metadata. These checks support the matched core/plugin release path; they do not claim that a new plugin can load on an older unsupported core. |
ca5c41a to
5e2a917
Compare
|
Merged via squash.
|
* fix: honor foreground node command timeouts in Codex * test: separate foreground node timeout coverage * test: keep live node cleanup requests awaitable * test: verify public node results in live proof * test: assert the node stop cancellation envelope
What Problem This Solves
Fixes foreground node commands being cut off by OpenClaw's Codex adapter after 90 seconds, or after 600 seconds with a longer explicit command timeout. The enclosing app-server watchdog could also stop the request at 660 seconds.
User Impact
node_execfollows the exec tool's configured, per-agent, runtime, and per-call command budget. Ordinary dynamic tools retain the 90-second default and 600-second cap. Per-call zero disables only the process timer; node transport waits stay bounded, and Stop, turn deadlines, and authority expiry remain effective. No configuration migration is needed. This behavior ships as a core-and-Codex-plugin update; upgrade both together.Why This Change Was Made
The actual exec tool carries its resolved node wait budget through lazy tools and target projection. Node execution and its metadata share one timeout calculation. The owning Codex handler hands that budget to the app-server watchdog once, with completion grace at each outer layer. Node watchdogs use the same safe timer ceiling, including saturated overrides.
The timer helper is exposed through the existing private-local
number-runtimefacade, not a new typed-public SDK subpath. The normal release workflow raises official pluginopenclaw.compat.pluginApifloors and build versions to the core release version; packaged peer metadata uses that floor, and installation rejects an older host API before loading the plugin. A Codex-only publication containing these imports must not retain an older API floor. Source checkouts should pair core and plugin from the same checkout.This follows the existing release compatibility contract, version-sync owner, and install admission check.
Follow-up to #148508 for foreground node execution.
Evidence
The canonical run encountered a long Blacksmith 32-vCPU runner queue, so the native capacity fallback was also dispatched. Its supplemental Windows job hit the existing 120-second limit in
vitest-worker-artifacts.test.ts(builds changed source despite valid stale dist and fails visibly on build errors). That test, its runner/compiler, fixture helpers and SQLite execution path are unchanged by this PR and do not invoke Codex ornode_exec. One initial compile alone took 40.95 seconds for 9,373 inputs/13,829 outputs; the case copies that tree and performs several more builds. This is a separate Windows fixture throughput gap, not proof of a node timeout regression. No retry, skip or deadline increase was used to mask it. The compiled corpus includes changed source files, so this does not claim identical compile cost or a proven precise stall phase.