Skip to content

fix(agents): enforce subagent run timeouts#87489

Merged
steipete merged 14 commits into
openclaw:mainfrom
MonkeyLeeT:codex/87444-run-timeout
May 29, 2026
Merged

fix(agents): enforce subagent run timeouts#87489
steipete merged 14 commits into
openclaw:mainfrom
MonkeyLeeT:codex/87444-run-timeout

Conversation

@MonkeyLeeT

@MonkeyLeeT MonkeyLeeT commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: sessions_spawn accepted runTimeoutSeconds, but a plain non-terminal agent.wait timeout could keep the subagent run active after the stored deadline.
  • Intended outcome: explicit subagent run timeouts become terminal timeout outcomes at the stored deadline, including restored/retried runs near that deadline.
  • Cleanup behavior: keep-mode parent wake can proceed while child abort is still unwinding; delete-mode cleanup stays retryable while an active child cannot yet be removed.
  • Intentionally out of scope: manual kill/reap behavior remains tracked by subagents tool should expose 'kill' and 'reap-stale' actions #87445.

Linked context

Which issue does this close?

Closes #87444

Which issues, PRs, or discussions are related?

Related #87445

Was this requested by a maintainer or owner?

Requested through the maintainer workflow for #87444.

Real behavior proof (required for external PRs)

Behavior addressed: sessions_spawn child runs with explicit runTimeoutSeconds no longer remain active after the stored deadline when agent.wait only reports a non-terminal timeout; restored/retried waits now use only the remaining stored deadline budget before completing the timeout path.

Real environment tested: local OpenClaw source worktree running a real gateway/server and real agent RPC against a loopback OpenAI Responses-compatible provider harness. The parent model turn called sessions_spawn, then sessions_yield; the child provider request was held open past runTimeoutSeconds: 1.

Exact steps or command run after this patch: node --import tsx /private/tmp/openclaw-issue-87444-proof.mts; node scripts/run-vitest.mjs src/agents/subagent-registry.test.ts src/agents/subagent-announce.timeout.test.ts; node scripts/run-vitest.mjs src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts src/gateway/server-methods/agent.test.ts; git diff --check. After the latest deadline-before-wait amendment, reran node scripts/run-vitest.mjs src/agents/subagent-registry.test.ts src/agents/subagent-announce.timeout.test.ts, node scripts/run-vitest.mjs src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts src/gateway/server-methods/agent.test.ts, and git diff --check.

Evidence after fix: copied terminal output from the real gateway proof run:

ISSUE_87444_PARENT_WOKE_C7A617
ISSUE_87444_REAL_BEHAVIOR_PROOF pass
{
  "sessionKey": "agent:main:issue-87444-c7a617",
  "taskName": "proof_child_timeout",
  "runId": "6298edb3-70e5-4926-91f3-9e98ebdb4ed1",
  "runTimeoutSeconds": 1,
  "outcomeStatus": "timeout",
  "elapsedMs": 1000,
  "deadlineDeltaMs": 0,
  "activeChildrenAfterTimeout": 0,
  "parentWakeDispatchCompleted": true,
  "providerRequestLabels": [
    "parent:function_call:sessions_spawn",
    "parent:function_call:sessions_yield",
    "child:provider_request_held_open",
    "parent:message:timeout_observed"
  ],
  "childProviderLateResponseServedBeforeParentWake": false
}
ISSUE_87444_PROOF_REQUEST_LOG ["parent:function_call:sessions_spawn","parent:function_call:sessions_yield","child:provider_request_held_open","parent:message:timeout_observed"]

Observed result after fix: the real gateway run accepted sessions_spawn with runTimeoutSeconds: 1, the held-open child recorded outcomeStatus: "timeout" at exactly elapsedMs: 1000, activeChildrenAfterTimeout was 0, and the parent continuation produced the redacted wake token ISSUE_87444_PARENT_WOKE_C7A617.

What was not tested: external hosted provider credentials, external channel delivery, GitHub Actions CI completion, and the separate manual kill/reap path tracked by #87445.

Proof limitations or environment constraints: the provider endpoint was a loopback deterministic OpenAI Responses-compatible harness so no API keys or external messages were used; the exercised OpenClaw path was still the real gateway, real agent RPC, real sessions_spawn, real sessions_yield, registry timeout completion, and parent wake dispatch.

Before evidence (optional but encouraged): before the original registry change, the focused regression kept completedRun?.endedAt undefined after a plain agent.wait timeout. Before the deadline-before-wait amendment, a restored run 59s into a 60s timeout still passed a full 60s budget to agent.wait.

Tests and validation

Which commands did you run?

  • node --import tsx /private/tmp/openclaw-issue-87444-proof.mts
  • node scripts/run-vitest.mjs src/agents/subagent-registry.test.ts src/agents/subagent-announce.timeout.test.ts
  • node scripts/run-vitest.mjs src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts src/gateway/server-methods/agent.test.ts
  • git diff --check

What regression coverage was added or updated?

Added registry coverage for non-terminal agent.wait timeouts at and near the stored explicit run deadline, restored-run coverage proving a resumed run near its deadline waits only for the remaining budget, and announce coverage proving cleanup: "delete" timeout cleanup remains retryable while the embedded child request is still active.

What failed before this fix, if known?

The new restored-run regression failed before the latest production change because a run restored 59s into a 60s timeout still passed timeoutMs: 60000 to agent.wait instead of timeoutMs: 1000. ClawSweeper also found that the previous announce branch could mark delete cleanup complete while deletion was skipped.

If no test was added, why not?

N/A; focused regression tests were added.

Risk checklist

Did user-visible behavior change? (Yes/No)

Yes.

Did config, environment, or migration behavior change? (Yes/No)

No.

Did security, auth, secrets, network, or tool execution behavior change? (Yes/No)

No.

What is the highest-risk area?

Prematurely marking a still-running child as timed out if the gateway wait path returns a plain timeout before the configured child deadline, or finalizing delete cleanup while the child is still active.

How is that risk mitigated?

Fresh subagent waits keep the existing initial wait budget. Resumed/retried waits are capped to the stored deadline, session-store reconciliation still wins before synthetic timeout completion, and focused tests cover pre-deadline retry, boundary timeout completion, restored near-deadline wait capping, and delete-cleanup retryability.

Current review state

What is the next action?

Wait for GitHub CI and ClawSweeper re-review on the updated head/body.

What is still waiting on author, maintainer, CI, or external proof?

GitHub CI has not completed on the latest forced-pushed head; external hosted provider/channel proof was not run.

Which bot or reviewer comments were addressed?

Addressed ClawSweeper’s deadline-before-wait finding, real-behavior proof request, and cleanup-delete finding.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 11:36 PM ET / 03:36 UTC.

Summary
The PR makes subagent runTimeoutSeconds a stored hard deadline across agent.wait, restored runs, lifecycle completion, and announce cleanup, with regression tests.

PR surface: Source +250, Tests +915. Total +1165 across 6 files.

Reproducibility: yes. Current main's source path retries plain agent.wait timeouts without closing at the stored deadline, and the PR body supplies a real gateway proof run showing the parent wake after a one-second timeout; I did not execute a repro in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Let exact-head CI complete on 50f00ea before landing.
  • Maintainers should explicitly accept the hard-deadline behavior for late child success.

Risk before merge

  • [P2] Merging intentionally changes session-state semantics: after an explicit run deadline, late child success is ignored and the parent-facing timeout remains terminal.
  • [P1] This read-only review did not execute the submitted validation commands, so exact-head CI or maintainer-run proof should gate landing.

Maintainer options:

  1. Accept the hard deadline semantics (recommended)
    Proceed once exact-head CI is green if maintainers agree that runTimeoutSeconds is a parent-facing terminal deadline even when the child later succeeds.
  2. Ask for broader live proof first
    If maintainers want transport-level confidence, request one more live provider or channel replay that shows a timed-out child unparking the parent on the current head.

Next step before merge

  • No automated repair is indicated; maintainers need to accept the session-state semantics and require exact-head CI before merge.

Security
Cleared: The diff only changes agent runtime logic and tests; it does not add dependencies, workflows, permissions, secret handling, or supply-chain surfaces.

Review details

Best possible solution:

Land this after exact-head CI passes and maintainers accept the hard-deadline subagent semantics, while keeping manual kill/reap behavior tracked separately in #87445.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main's source path retries plain agent.wait timeouts without closing at the stored deadline, and the PR body supplies a real gateway proof run showing the parent wake after a one-second timeout; I did not execute a repro in this read-only review.

Is this the best way to solve the issue?

Yes. The patch fixes the existing documented runTimeoutSeconds contract at the registry/lifecycle boundary, caps restored waits to remaining time, and keeps manual kill/reap behavior out of scope.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against cb085ec5f1f5.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes terminal output from a real OpenClaw gateway/server and real agent RPC path showing the timeout outcome and parent wake after the fix.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes terminal output from a real OpenClaw gateway/server and real agent RPC path showing the timeout outcome and parent wake after the fix.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: The linked bug can leave parent agent workflows parked indefinitely past an explicit timeout and require gateway restart to recover.
  • merge-risk: 🚨 session-state: The PR deliberately makes timeout outcomes terminal and prevents late child success from changing the recorded subagent session state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes terminal output from a real OpenClaw gateway/server and real agent RPC path showing the timeout outcome and parent wake after the fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes terminal output from a real OpenClaw gateway/server and real agent RPC path showing the timeout outcome and parent wake after the fix.
Evidence reviewed

PR surface:

Source +250, Tests +915. Total +1165 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 278 28 +250
Tests 2 915 0 +915
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 1193 28 +1165

What I checked:

  • Repository policy read: Read the full root AGENTS.md and the scoped src/agents/AGENTS.md; the session-state merge-risk guidance and agent test guardrails shaped this review. (AGENTS.md:1, cb085ec5f1f5)
  • Current main still lacks hard deadline completion: On current main, a plain non-terminal agent.wait timeout only schedules another wait after session reconciliation and does not complete the run at the stored runTimeoutSeconds deadline. (src/agents/subagent-registry-run-manager.ts:218, cb085ec5f1f5)
  • Current restore path waits with the full timeout: On current main, restored pending runs call waitForSubagentCompletion with the full resolved wait timeout instead of the remaining stored deadline budget. (src/agents/subagent-registry.ts:674, cb085ec5f1f5)
  • PR merge result enforces deadlines before and after waits: The merge result adds deadline resolution, caps resumed waits to the stored deadline, converts plain wait timeouts at the deadline into terminal timeout outcomes, and caps late completions to the deadline. (src/agents/subagent-registry-run-manager.ts:49, 310c48aede89)
  • PR merge result preserves terminal timeout state: Lifecycle completion now turns post-deadline completions into timeout outcomes and preserves already-published timeout outcomes against later lifecycle success. (src/agents/subagent-registry-lifecycle.ts:99, 310c48aede89)
  • Regression coverage added: The PR adds focused coverage for plain wait timeout completion, late lifecycle success preservation, restored-run remaining-budget waits, terminal timeout capping, and delete cleanup retryability. (src/agents/subagent-registry.test.ts:406, 310c48aede89)

Likely related people:

  • steipete: Peter Steinberger authored the latest PR commit that keeps subagent run timeout terminal and has recent adjacent agents timeout commits in the local history. (role: recent area contributor and PR follow-up owner; confidence: high; commits: 50f00ea6e3ef, f2dfb67f2c5b, b0d9d1d2dae8; files: src/agents/subagent-registry-run-manager.ts, src/agents/subagent-registry-lifecycle.ts, src/agents/subagent-registry.ts)
  • Vincent Koc: Current-main blame for the central wait and lifecycle paths points to the local snapshot commit, and runTimeoutSeconds history includes recent subagent timeout fixes by Vincent Koc. (role: recent adjacent owner; confidence: medium; commits: 60392a1136ff, 34c57487b44c, 170a3a39d41b; files: src/agents/subagent-registry-run-manager.ts, src/agents/subagent-registry-lifecycle.ts, src/agents/subagent-announce.ts)
  • Tyler Yust: Local history ties earlier nested subagent orchestration and timeout handling to Tyler Yust, making them a plausible routing candidate for subagent session semantics. (role: feature-history contributor; confidence: medium; commits: b8f66c260db8, 8d2f98fb01a6; files: src/agents/subagent-registry.ts, src/agents/subagent-announce.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from f8233cf to 26ce8bc Compare May 28, 2026 03:21
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: ✨ hatched 🥚 common Cosmic Branchling. Rarity: 🥚 common. Trait: finds missing screenshots.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Cosmic Branchling in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@MonkeyLeeT MonkeyLeeT changed the title [codex] fix subagent run timeout deadline fix(agents): enforce subagent run timeouts May 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 28, 2026
@MonkeyLeeT MonkeyLeeT marked this pull request as ready for review May 28, 2026 03:23
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels May 28, 2026
@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from 26ce8bc to 057f3d4 Compare May 28, 2026 03:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 057f3d4685

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/subagent-announce.ts Outdated
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 28, 2026
@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from 057f3d4 to 4177a29 Compare May 28, 2026 04:25
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 28, 2026
@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from 4177a29 to 3e8fe49 Compare May 28, 2026 04:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e8fe49490

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/subagent-registry-run-manager.ts Outdated
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 28, 2026
@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from 3e8fe49 to 1ae2de0 Compare May 28, 2026 04:57

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the deadline-before-wait finding on the latest head: restored/retried explicit runTimeoutSeconds waits now cap agent.wait to the stored deadline's remaining time, with focused coverage for a restored run near its deadline.

@clawsweeper clawsweeper Bot added the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label May 29, 2026
@MonkeyLeeT MonkeyLeeT force-pushed the codex/87444-run-timeout branch from 74971aa to 50f00ea Compare May 29, 2026 03:29
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 29, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 29, 2026
@steipete steipete force-pushed the codex/87444-run-timeout branch from 50f00ea to 8c09f04 Compare May 29, 2026 04:33
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c09f041f7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +190 to +192
return isFreshForRun(sessionEntry, params.notBeforeMs)
? freshSessionStartedAt(sessionEntry, params.notBeforeMs)
: undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor running session starts for run deadlines

When agent.wait returns a plain timeout after the child has only emitted a lifecycle start, the persisted session entry is still status: "running" with startedAt but no terminal endedAt/updatedAt after the run. This new helper therefore always returns undefined because isFreshForRun requires a terminal timestamp, so the run-manager fallback computes the explicit timeout from the registry createdAt instead of the observed child start and can time out/announce runs early whenever the child actually starts later than registration.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor

Behavior addressed: explicit subagent runTimeoutSeconds is now treated as the terminal deadline across agent.wait, lifecycle, session-store reconciliation, sweeper recovery, pending delivery retry, and in-flight cleanup paths. Successful waits without startedAt now use the fresh session-store start before deadline checks, so restored/racy completions do not get misclassified.

Real environment tested: local focused Vitest/type/lint proof on the rebased branch, Codex autoreview, and GitHub PR CI on head 8c09f04.

Exact steps or command run after this patch:

  • pnpm test src/agents/subagent-registry.test.ts src/agents/subagent-announce.timeout.test.ts src/cron/schedule-identity.test.ts
  • pnpm check:test-types
  • node scripts/run-oxlint.mjs src/agents/subagent-registry.ts src/agents/subagent-registry-lifecycle.ts src/agents/subagent-registry-run-manager.ts src/agents/subagent-session-reconciliation.ts src/agents/subagent-registry.test.ts src/agents/subagent-announce.ts src/agents/subagent-announce.timeout.test.ts src/cron/schedule-identity.ts src/cron/schedule-identity.test.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
  • gh pr checks 87489 --watch --interval 30

Evidence after fix: focused local tests passed, check:test-types passed, targeted oxlint passed, diff check passed, autoreview clean with no accepted/actionable findings, and GitHub checks passed including CI, CodeQL Critical Quality, OpenGrep, security high, dependency guard, workflow sanity, and real behavior proof.

Observed result after fix: explicit run timeout outcomes are stable at the configured deadline, late success/error sources cannot overwrite already-published deadline timeouts, restored successful waits use the session-store start when agent.wait lacks one, and cron schedule identity matches runtime stagger normalization.

What was not tested: no live provider/subagent execution was run; coverage is unit/CI/autoreview plus GitHub PR gates.

@steipete steipete merged commit 8a60f39 into openclaw:main May 29, 2026
114 checks passed
@MonkeyLeeT MonkeyLeeT deleted the codex/87444-run-timeout branch June 4, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gateway should enforce runTimeoutSeconds and emit terminal child.timeout event

3 participants