Repository navigation
fix(agents): surface failed subagent completion notices - #128512
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 30, 2026, 8:06 AM ET / 12:06 UTC. ClawSweeper reviewWhat this changesThe PR sends a fixed generic direct-chat failure notice when one trusted subagent completion is non-successful and requester-side synthesis also fails, while preserving cancellation and source-ownership fences. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked until stronger real behavior proof is added - 4 items remain The prior timeout/unknown gap is fixed and the direct fallback is correctly fenced before platform I/O. Keep this PR open for redacted Telegram Test Server evidence, because the generic user-visible direct-message change can affect Telegram but the supplied proof exercises an ephemeral Gateway rather than Telegram. Priority: P1 Review scores
Verification
How this fits togetherA subagent completion enters the announcement coordinator, which first tries requester-side synthesis and then may send a direct fallback to the original requester. This change turns a previously silent failed direct completion into a safe terminal notice without exposing child output. flowchart LR
A[Subagent completion] --> B[Announcement coordinator]
B --> C[Requester synthesis]
C -->|fails| D[Trusted direct fallback]
D --> E[Abort and ownership fence]
E --> F[Direct channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +43, Tests +130. Total +173 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one trusted, direct-only generic fallback at the announcement owner and add redacted Telegram Test Server evidence showing one safe notice after requester synthesis fails, with no notice on a threaded/non-direct control path. Do we have a high-confidence way to reproduce the issue? Yes—source establishes the prior silent path for a trusted non-ok completion plus a normal requester-synthesis error, and the supplied before/after Gateway trace exercises that scenario. The reviewer did not execute it locally. Is this the best way to solve the issue? Yes—the branch repairs the owner of direct completion fallback, uses a bounded non-sensitive notice, and preserves existing non-direct behavior; Telegram-specific visible proof remains the missing merge evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a8c8c8270836. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
Exact-head maintenance refresh for The redacted mock-Gateway behavior proof still uses an authenticated ephemeral Gateway, real {"verdict":"PASS","direct":{"outcome":"delivered","requesterSynthesisRejected":true,"sends":1,"noticeChars":79,"childPrivateContentPresent":false,"providerPrivateContentPresent":false},"nonDirect":{"outcome":"retryable","requesterSynthesisRejected":true,"additionalSends":0}}The one direct send is the bounded generic notice: This head closes the two late lifecycle races identified during review. The direct fallback now carries the request abort signal into outbound delivery and revalidates both cancellation and source ownership immediately before platform I/O. Focused regressions pause inside the outbound seam, then cancel or transfer ownership; both record zero platform sends and return the canonical non-delivery result. Because those authority checks are process-local callbacks, the fallback uses Node 24 focused proof: the full The PR remains within the small-fix window at 3 files, @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Mantis could not complete this proof. Open the failed run. |
75d8e07 to
6f66d4e
Compare
6f66d4e to
947a45c
Compare
|
Thanks @Leon-SK668! Proof: An ephemeral Gateway and a Telegram Test Server direct message forced both the delegated run and requester-side synthesis to fail. The requester received the fixed 79-character notice exactly once, no child or provider error text appeared, and a non-direct control sent no extra notice.
Example
|
) A failed subagent could leave a direct requester without a terminal result when requester-side synthesis failed on the same provider path. Use the trusted non-success completion event to send one fixed direct notice. Revalidate cancellation and source ownership before platform delivery, keep private failure text out of the notice, and preserve existing non-direct delivery paths. Co-authored-by: Ayaan Zaidi <[email protected]>
Related to #128449. This pull request fixes the silent direct-notice path only. The issue stays open for its separate attempt-telemetry classification.
What Problem This Solves
A failed subagent can leave a direct requester with no terminal message when requester synthesis fails on the same provider path.
Shipped documentation requires terminal failed subagent runs to announce failure status without replaying captured child text.
Why This Change Was Made
The direct completion fallback accepted only successful child events. The delivery owner already had the trusted child identity, direct target, idempotency key, abort signal, and current source-owner check, but it did not project a failed child into safe fallback content.
The repair:
status !== "ok";User Impact
Direct requesters receive a generic terminal failure notice when both the delegated task and requester-side synthesis fail. The notice does not expose captured child output or provider errors, and non-direct delivery behavior is unchanged.
Evidence
An authenticated ephemeral Gateway ran the production subagent completion flow with a failed child and a requester provider that returned HTTP 500.
8e1cda9854ad1cbbb52914d777be9dadd91d0ff9947a45c4c45b650f57dff8971e753789e229928cThe exact notice was:
A delegated task failed before it could report a result. Please retry the task.Focused tests:
214/214passed across the completion delivery owner and subagent announcement coordinator.Telegram Test Server proof on the exact head drove the same failed-child and failed-requester-synthesis path through a real direct message. The recorder observed the 79-character generic notice exactly once at 6.0 seconds. Ten provider requests included repeated child and requester failures, and neither injected private error string appeared in any Telegram event.
Local E2E setup could not start because the existing worktree dependency tree lacked two build tools. Exact-head CI owns those repository-wide gates.
Scope and risk:
+43net lines across the two existing announcement owners.+130lines in the existing delivery-owner suite.AI Assistance
Codex assisted with repository investigation, implementation, focused validation, and review. No transcript is attached.