fix(subagents): reconcile timed-out waits against child session state#75786
fix(subagents): reconcile timed-out waits against child session state#75786carlos-443-diaz wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep this PR open, but it is not merge-ready because the branch conflicts, lacks inspectable real behavior proof, and duplicates the current shared session reconciliation contract without its freshness guard. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was run in this read-only review. Source inspection shows the direct announce wait path can still apply a raw timeout, and the linked report supplies one observed real run. Is this the best way to solve the issue? No, not as submitted. The target seam is plausible, but current main already has a shared freshness-checked reconciliation helper, so the maintainable fix is to reuse it instead of adding a second parser. Security review: Security review cleared: No concrete security or supply-chain concern was found; the diff changes in-repo agent runtime and test code only. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Fixes #75785.
Summary
Reconcile timed-out
agent.waitresults against the persisted child session state before announcing subagent completion.This fixes a false-timeout path where the child run can finish successfully, but the parent-side completion handoff still reports
timed outand falls back to a partial-progress stub.Problem / Motivation
The announce flow currently trusts the immediate
agent.waittimeout result. In the observed failure mode, that timeout can be stale relative to the child session store state. When that happens, the parent announces a timeout even though the child session has already completed successfully.What Changed
src/agents/subagent-announce-output.tswaitForSubagentRunOutcome(runId, timeoutMs, sessionKey?)now optionally re-checks session-store state after a timeoutsrc/agents/subagent-announce.tschildSessionKeyintowaitForSubagentRunOutcome(...)src/agents/subagent-announce.timeout.test.tsWhy this is the smallest reliable guardrail
The reconciliation only runs:
agent.waitreturnstimeoutNormal successful and failed paths are unchanged.
User-visible / Behavior Changes
Parent sessions stop receiving false
timed outcompletion events for already-finished child runs in this path.Diagram
Security Impact
Repro + Verification
Environment
Steps
agent.waitreturntimeout.Expected
Actual
Evidence
Human Verification
agent.waitreturnstimeoutCompatibility / Migration
Risks and Mitigations