Include delivery errors in subagent announce give-up logs#84281
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level: current main persists lastAnnounceDeliveryError during failed announce cleanup but logAnnounceGiveUp omits it from the final warning. I did not execute tests because this review is read-only. PR rating Rank-up moves:
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. PR egg Rarity: 🥚 common. What is this egg doing here?
Real behavior proof Risk before merge Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused observability fix after normal CI and maintainer review, preserving the existing retry policy, delivery ordering, and cleanup semantics. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main persists lastAnnounceDeliveryError during failed announce cleanup but logAnnounceGiveUp omits it from the final warning. I did not execute tests because this review is read-only. Is this the best way to solve the issue? Yes: the PR uses the existing persisted error field and normal gateway log path, which is the narrow maintainable fix for this observability-only bug. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5c9a8f33b312. |
|
Pushed a fix for the failed Local validation:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks @TurboTheTurtle! I inspected the PR diff, changed files, issue/PR discussion, surrounding delivery/lifecycle code, and current PR checks. Implementation is narrow and does not change delivery behavior, just where the warning is written. Resolves #84272 |
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
…4281) * Include delivery error in subagent announce give-up logs * test(agents): type announce delivery error response
Summary
Fixes #84272.
lastAnnounceDeliveryErrorin subagent announce retry-limit / expiry give-up warnings.gateway.logremains searchable.Root cause
Subagent announce delivery already formatted and persisted the concrete delivery failure on the run entry, but
logAnnounceGiveUp()only emitted run, child, requester, retry count, and ended age. On macOS managed gateways where stderr can be discarded, the finalgateway.logwarning lost the useful delivery cause.Real behavior proof
Behavior or issue addressed:
Subagent announce retry-limit give-up logs now include the underlying delivery error in the normal gateway log output.
Real environment tested:
Local OpenClaw source checkout on macOS using the production
logAnnounceGiveUp()implementation anddefaultRuntime.logcapture.Exact steps or command run after this patch:
Evidence after fix:
{ "loggedLine": "[warn] Subagent announce give up (retry-limit) run=run-proof child=agent:main:subagent:child requester=agent:main:main retries=3 endedAgo=5s deliveryError=\"direct-primary: routed-dispatch-did-not-queue-final steer-fallback: queue_message_failed\"", "hasDeliveryError": true, "multilineCollapsed": true }Observed result after fix:
The normal gateway log warning includes
deliveryError=..., preserves the concrete delivery failure, and collapses multiline errors onto one log line.What was not tested:
No live macOS LaunchAgent was started. The proof exercises the production logging helper directly, and focused tests cover the direct completion announce failure path.
Validation
node scripts/run-vitest.mjs src/agents/subagent-registry-lifecycle.test.tsnode scripts/run-vitest.mjs src/agents/subagent-announce.test.ts src/agents/subagent-announce-dispatch.test.tsgit diff --checkAttribution
If maintainers squash or rework this PR, please preserve author attribution or include:
Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>