fix(codex): extend skill_workshop dynamic-tool timeout above approval ceiling#91325
fix(codex): extend skill_workshop dynamic-tool timeout above approval ceiling#91325openperf wants to merge 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 21, 2026, 12:34 PM ET / 16:34 UTC. Summary PR surface: Source +11, Tests +35. Total +46 across 4 files. Reproducibility: yes. at source level: current main and v2026.6.9 route default Skill Workshop lifecycle approval through a 120s wait plus 10s grace while Codex dynamic-tool calls still use a 90s watchdog. I did not run a live Gateway/Codex approval session in this read-only review. 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:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused 150s Do we have a high-confidence way to reproduce the issue? Yes at source level: current main and v2026.6.9 route default Skill Workshop lifecycle approval through a 120s wait plus 10s grace while Codex dynamic-tool calls still use a 90s watchdog. I did not run a live Gateway/Codex approval session in this read-only review. Is this the best way to solve the issue? Yes for the narrow reported bug: selecting a AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c2ee9b0be8ae. Label changesLabel justifications:
Evidence reviewedPR surface: Source +11, Tests +35. Total +46 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
|
06e9a31 to
ed0a198
Compare
ed0a198 to
7ebb723
Compare
32aae0f to
787f9b4
Compare
787f9b4 to
c477695
Compare
c477695 to
9ff0cfc
Compare
9ff0cfc to
3d5b04e
Compare
3d5b04e to
2182083
Compare
…approvals skill_workshop lifecycle approvals (apply/reject/quarantine) require up to 120s plus 10s gateway grace (130s total), but the generic Codex dynamic-tool watchdog fires at 90s. The watchdog fired first with a generic timeout error, leaving the approval pending and the proposal unmodified. Add a 150s per-tool deadline for skill_workshop in readConfiguredDynamicToolTimeoutMs, matching the pattern used for message and image tools. The approval can now complete or expire cleanly before the Codex watchdog fires; non-Codex callers keep the unchanged 120s approval window. Fixes openclaw#91266
2182083 to
dac685f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Summary
skill_workshoplifecycle tool calls (apply/reject/quarantine) invoked from a Codex agent session fail with "OpenClaw dynamic tool call timed out after 90000ms while running tool skill_workshop" before the operator approval prompt can resolve. The proposal is left pending and unmodified. The same failure occurs on the/btwside thread.CODEX_DYNAMIC_TOOL_TIMEOUT_MS = 90_000). Skill Workshop lifecycle calls return arequireApprovalpayload that waits up toDEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS = 120_000plus 10s gateway grace (130s total). The watchdog fires at 90s, before the approval can complete. Additionally,before_tool_callhooks can escalate a non-lifecycle action (e.g.inspect → apply) at runtime, after the timeout has already been resolved from the original arguments — so an action-gated 90s timeout would still fire on the hook-adjusted path.CODEX_DYNAMIC_SKILL_WORKSHOP_TOOL_TIMEOUT_MS = 150_000for allskill_workshopcalls in bothreadConfiguredDynamicToolTimeoutMs(main thread) andresolveSideDynamicToolCallTimeoutMs(side thread). The 150s deadline exceeds the 130s approval ceiling; the unconditional match is correct because the timeout is resolved before hooks run and any action can be escalated to a lifecycle call at runtime. Non-lifecycle calls (list, inspect) complete in milliseconds so the wider window has no practical effect.extensions/codex/src/app-server/dynamic-tool-execution.ts— exportedCODEX_DYNAMIC_SKILL_WORKSHOP_TOOL_TIMEOUT_MS = 150_000; added unconditionalskill_workshopbranch inreadConfiguredDynamicToolTimeoutMs.extensions/codex/src/app-server/side-question.ts— addedCODEX_SIDE_DYNAMIC_SKILL_WORKSHOP_TOOL_TIMEOUT_MS = 150_000; added unconditionalskill_workshoparm inresolveSideDynamicToolCallTimeoutMs.extensions/codex/src/app-server/dynamic-tool-execution.test.ts— extended deadline test covers all five action types; fake-timer before/after proof unchanged.extensions/codex/src/app-server/side-question.test.ts— new test: all five action types return 150s on the side-thread path.src/skills/workshop/policy.ts) unchanged; the 120s approval window is preserved for all callers.docs/reference/config).extensions/api.ts, registry/loader).Reproduction
approvalPolicy: pending.skill_workshop(action="apply", proposal_id="...").Real behavior proof
Behavior addressed (#91266):
skill_workshopcalls from a Codex agent session or/btwside thread no longer surface a generic 90s dynamic-tool timeout. Allskill_workshopactions receive the 150s window regardless of action name, becausebefore_tool_callhooks can escalate any action to a lifecycle call after the timeout is resolved.Real environment tested (Linux, Node 22 — Vitest with fake timers against
handleDynamicToolCallWithTimeout,resolveDynamicToolCallTimeoutMs, andresolveSideDynamicToolCallTimeoutMs): unit tests verify the resolver returns 150s for apply/reject/quarantine/list/inspect on both paths; fake-timer tests confirm the 90s watchdog fires on a never-resolving call (before) and a 120s approval completes within the 150s deadline (after).Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/codex/src/app-server/dynamic-tool-execution.test.ts extensions/codex/src/app-server/side-question.test.tsEvidence after fix:
Observed result after fix: resolver returns 150s for all skill_workshop action types on both the main-thread and
/btwside-thread paths; the before test confirms the 90s watchdog fires while approval is pending; the after test confirms a full 120s approval completes successfully within the 150s window.What was not tested: live Gateway + Codex agent session with an active operator approval prompt in the UI.
Repro confirmation: the before test fails if
timeoutMsis raised to 150_000 (approval would complete); the after test fails iftimeoutMsis lowered to 90_000 (watchdog fires at 90s before the 120s approval).Risk / Mitigation
skill_workshopcalls receive the 150s deadline, including non-lifecycle calls. Mitigation: non-lifecycle calls (list, inspect) complete in milliseconds; the wider window has no observable runtime effect. The unconditional match is required becausebefore_tool_callhooks can escalate any action to a lifecycle call after the timeout has already been resolved.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Fixes #91266