fix(agents): honor configured CLI resume timeouts#90912
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 10, 2026, 9:58 AM ET / 13:58 UTC. Summary PR surface: Source +30, Tests +53. Total +83 across 8 files. Reproducibility: yes. at source level: current main applies the 180-second resumed watchdog despite deliberate longer timeout intent, and the focused resolver path clearly demonstrates that mismatch. The broader custom Anthropic scenario has not been reproduced. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow timeout-intent correction if maintainers accept configured run timeouts as authoritative for resumed CLI watchdog scaling, while keeping the broader linked issue open for independent reproduction of its custom-provider path. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main applies the 180-second resumed watchdog despite deliberate longer timeout intent, and the focused resolver path clearly demonstrates that mismatch. The broader custom Anthropic scenario has not been reproduced. Is this the best way to solve the issue? Yes for the confirmed CLI-backed path: carrying explicit timeout intent is narrower and more maintainable than inferring intent from resolved values, and it preserves backend overrides and inherited resume behavior. AGENTS.md: found and applied where relevant. Codex review notes: reasoning high; reviewed against bb6e47729cf8. Label changesLabel justifications:
Evidence reviewedPR surface: Source +30, Tests +53. Total +83 across 8 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
|
4ccca30 to
86df1c3
Compare
86df1c3 to
5069567
Compare
bb915da to
a10c9c1
Compare
a10c9c1 to
b7b061f
Compare
|
Maintainer verification complete. The original change had the right intent but timeout provenance was incomplete across normal channel runs, queued follow-ups, heartbeats, and CLI-backed subagents. I moved the decision to the shared CLI boundary, carried explicit reply timeout provenance through the queue/fallback paths, and preserved the shorter inherited resume watchdog for subagents.
Best-fix judgment: landable. The final shape distinguishes deliberate/configured run timeouts from inherited defaults at the shared CLI owner boundary instead of guessing from the final numeric timeout. |
* fix(agents): honor configured CLI resume timeouts * fix(agents): pass explicit CLI timeout overrides * fix(agents): preserve timeout provenance * test(agents): cover configured timeout provenance * fix(agents): resolve CLI timeout provenance centrally * fix(agents): carry reply timeout provenance * fix(agents): forward CLI run lane --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(agents): honor configured CLI resume timeouts * fix(agents): pass explicit CLI timeout overrides * fix(agents): preserve timeout provenance * test(agents): cover configured timeout provenance * fix(agents): resolve CLI timeout provenance centrally * fix(agents): carry reply timeout provenance * fix(agents): forward CLI run lane --------- Co-authored-by: Vincent Koc <[email protected]>
Summary
Real behavior proof
behavior: A resumed CLI-backed embedded run with a deliberate 600s timeout should not keep the default 180s no-output ceiling. The watchdog should scale from the configured run timeout, while ordinary inherited user resumes keep the existing 180s guard.
environment: Local source checkout rebased on
0a08625d79, Nodev22.22.2, pnpm11.2.2, branchai-hpc/90764-embedded-timeout.steps:
github/mainsource insrc/agents/cli-runner/reliability.ts: resumed CLI runs only switch to fresh watchdog defaults whentrigger === "cron", so user-triggered resumed runs stay onCLI_RESUME_WATCHDOG_DEFAULTS.maxMs = 180000.timeout: "600"reachesrunAgentAttemptasrunTimeoutOverrideMs: 600000.evidence:
{ "inherited": 180000, "configured": 480000, "explicitRun": 480000, "cron": 480000 }observedResult: After the fix, configured/default and explicit per-run 600s resumed CLI runs resolve the no-output watchdog to 480s. A plain inherited user resume still resolves to 180s, preserving the default guard.
notTested: I did not replay the direct custom-api Anthropic run from #90764. This PR covers the confirmed CLI-backed resumed-session watchdog branch only. I also did not run a live long-running CLI provider session because the resolver path and CLI reliability tests cover the timeout calculation without waiting 180s.
Verification
OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/cli-runner.reliability.test.tsOPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/cli-runner.reliability.test.ts -- -t resolveCliNoOutputTimeoutMsOPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/agent-command.live-model-switch.test.ts -- -t "passes explicit timeout overrides"OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/agent-command.live-model-switch.test.tsOPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/command/attempt-execution.cli.test.tspnpm tsgo:core:testOPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 pnpm check:changed --base github/main --head HEADRelated: #90764