Repository navigation
fix(codex): honor timeoutSeconds for dynamic tool calls when timeoutMs is absent - #100722
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 12:26 PM ET / 16:26 UTC. Summary PR surface: Source -114, Tests +57. Total -57 across 4 files. Reproducibility: yes. source-level reproduction is high confidence: current main reads only Review metrics: none identified. 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 detailsBest possible solution: Land the shared Codex dynamic-tool timeout resolver after the current head has fresh proof and either green Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high confidence: current main reads only Is this the best way to solve the issue? Yes for the code shape: sharing the main dynamic-tool timeout resolver and handler with the side-question path is narrower and less duplicative than maintaining two timeout implementations. Merge readiness still depends on current-head proof and the failing type-check result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0a488bd30b26. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -114, Tests +57. Total -57 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
Review history (6 earlier review cycles)
|
df85454 to
23bc37d
Compare
|
Updated #100722 to address the latest ClawSweeper feedback:
Evidence: pnpm test extensions/codex/src/app-server/dynamic-tool-execution.test.ts extensions/codex/src/app-server/side-question.test.ts
# Test Files 2 passed (2)
# Tests 60 passed (60)
node_modules/.bin/tsx scripts/proof/codex-dynamic-tool-timeout-seconds.mts
# All cases passed (main + side-question, including fractional rejection). |
627bb84 to
b5f1255
Compare
|
@clawsweeper re-review Updated the proof script to exercise the actual runtime handlers:
Local verification: pnpm test extensions/codex/src/app-server/dynamic-tool-execution.test.ts extensions/codex/src/app-server/side-question.test.ts
# Test Files 2 passed (2)
# Tests 60 passed (60)
node_modules/.bin/tsx scripts/proof/codex-dynamic-tool-timeout-seconds.mts
# All cases passed (resolver + runtime for main and side paths). |
|
🦞🧹 I asked ClawSweeper to review this item again. |
b5f1255 to
1bf877a
Compare
|
CI update after the latest push (
Failing checks all report duplicate identifiers in Affected CI jobs: I verified this is a pre-existing upstream Recommendation: wait for upstream |
1bf877a to
90e8713
Compare
… and fractional rejection
|
Maintainer repair is land-ready at
Known gap: no credentialed live Codex app-server session was run; upstream protocol inspection and fake-timer regressions cover the exact forwarded argument and structured-timeout ordering contracts. |
|
Merged via squash.
|
Fixes #98864.
What Problem This Solves
Codex dynamic tool calls forward tool arguments as JSON. Tools such as
sessions_sendexpose an integertimeoutSecondsbudget, but OpenClaw's outer dynamic-tool watchdog only honoredtimeoutMs. Seconds-only calls therefore inherited the generic 90-second watchdog, and a short inner timeout could race the outer bridge after target-resolution/setup work instead of returning its structured timeout result.Why This Change Was Made
timeoutMsprecedence when it is supplied.timeoutSecondswhentimeoutMsis absent, with bounded 30-second outer headroom for setup and structured completion.This is the correct ownership boundary: upstream Codex forwards dynamic-tool arguments unchanged and waits for the returned tool response, while OpenClaw owns the tool schema and watchdog policy. Relevant upstream source: https://github.com/openai/codex/blob/be33f80bc65159c094ecd06bf155afa3061ce23d/codex-rs/protocol/src/dynamic_tools.rs#L45 and https://github.com/openai/codex/blob/be33f80bc65159c094ecd06bf155afa3061ce23d/codex-rs/core/src/tools/handlers/dynamic.rs#L127
User Impact
Seconds-only dynamic tool calls now get the intended bounded budget on both Codex run paths. A tool can finish its own timeout handling and return structured state instead of being preempted by the generic bridge watchdog.
Evidence
sessions_sendresult after setup work.READY FOR /prepare-prand zero findings.git diff --check origin/main...HEAD.