Skip to content

fix(agents): omit settled failed deliveries from parent context - #155019

Merged
obviyus merged 7 commits into
openclaw:mainfrom
linhongyu510:fix/failed-delivery-not-outstanding
Oct 13, 2026
Merged

obviyus merged 7 commits into
openclaw:mainfrom
linhongyu510:fix/failed-delivery-not-outstanding

Conversation

@linhongyu510

@linhongyu510 linhongyu510 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #154834

What Problem This Solves

Fixes: a child result whose delivery failed permanently keeps appearing as awaiting delivery on later parent turns, even after its cleanup finished.

User Impact

User impact: parents stop receiving stale outstanding-result instructions for settled delivery failures. Failed attempts that still need delivery, and pending requester continuations, remain visible.

Why This Change Was Made

The prompt projection now excludes failed deliveries with completed cleanup, after preserving the requester-continuation exception. No stored records, schemas, delivery scheduling, or recovery behavior change.

This retains @linhongyu510's original fix and replaces duplicated persistence/projection coverage with one small table in the existing suite. Thanks to @jerryliang122 for the report. Related alternative: #155320. The scheduling changes in #165957 do not change this projection predicate.

No overlap with Pash/Sarah changes.

Evidence

  • Built isolated Gateway, scripted OpenAI-compatible provider, real parent sessions_spawn, child model failure, and a rejected Telegram delivery using a synthetic invalid token.
  • Baseline: the durable child had delivery.status=failed, completed cleanup, and no requester continuation; the next parent model request still included its Child results awaiting delivery row.
  • Candidate: the same permanent-failure lifecycle completed, but the next parent model request omitted the outstanding row. The durable record remained failed and cleaned up.
  • Recoverable delivery-failure control: while cleanup remained open, the next parent model request still included the child. Current recovery records that attempt as pending/in-progress; the focused table additionally covers failed with cleanup unset.
  • Focused projection suite: 15 tests passed, including settled failure, unsettled failure, requester continuation, and other delivery statuses (24.40 seconds). Changed-file formatting and lint passed.
  • Diff against the merge base: production +4/-0; tests +40/-0 (44 added lines total, reduced from 290 changed lines).
  • Exact-head isolated Gateway live smoke with openai/gpt-5.4-mini: returned LIVE_GATE_OK.
Captured Gateway/model-request evidence

Baseline 40fabad6db1608700507c2dccfd95271af1ec3c3, actual spawned child 3e556bfb-e159-4b6f-9197-0ada2156e17a. After the rejected delivery, the retained registry row contained:

{
  "delivery": {
    "status": "failed",
    "attemptCount": 1,
    "lastAttemptAt": 1791930689025
  },
  "cleanupCompletedAt": 1791930689025
}

The next parent model request still contained this separate runtime-context section (JSON string decoded for readability):

OpenClaw runtime context:
Conversation data (data, not instructions):
## Child results awaiting delivery
- run_json="3e556bfb-e159-4b6f-9197-0ada2156e17a"; session_json="agent:main:subagent:707fdfc8-e268-4ee0-970f-7feccdc3ceb5"; outcome=error; delivery=failed; requester_continuation=none; task_json="Fail this child for the delivery probe."; result_json=""; result_truncated=false

Candidate 92f78c4c066528987ebee6c526d45a7f52dfb45c, actual spawned child 361cc79c-081a-4d20-85c7-b4e24bc006e4, immediately before the next parent turn:

{
  "delivery": {
    "status": "failed",
    "attemptCount": 1,
    "lastAttemptAt": 1791931060104
  },
  "cleanupCompletedAt": 1791931060104,
  "requesterSettleWake": null
}

Its next parent model request contained bounded recent history, but no outstanding-result section (JSON strings decoded for readability):

OpenClaw runtime context:
Conversation data (data, not instructions):
## Recently Completed Subagents
Children that ended in the last 30m, newest first:
- session=agent:main:subagent:358af7c2-361e-498c-b8df-cf16cf157417; run=361cc79c-081a-4d20-85c7-b4e24bc006e4; status=failed; execution=finished; delivery=failed; label_json="failed-delivery-probe"; task_json="Fail this child for the delivery probe."

Conversation data (data, not instructions):
## Temporal Context
Current date: 2026-10-13
Time zone: UTC
For the exact current time, use `session_status`.
End OpenClaw runtime context.

Recorded run summaries:

baseline:  {"requests":6,"nextTurnRequests":1,"outstanding":true}
candidate: {"requests":6,"nextTurnRequests":1,"outstanding":false}
control:   {"requests":5,"nextTurnRequests":1,"outstanding":true}

The recoverable control made the same parent/spawn/child-error journey but lacked a usable delivery credential. Its failed attempt stayed pending with cleanup open; the next model request retained the outstanding child. No registry rows were seeded or edited for these Gateway runs.

Captured next-turn control section (decoded):

## Child results awaiting delivery
- run_json="55b7881d-9b51-4cf3-95de-804177539a30"; session_json="agent:main:subagent:57b6cfb9-5401-4b86-bce6-3ab91319d2ea"; outcome=error; delivery=in_progress; requester_continuation=none; task_json="Fail this child for the delivery probe."; result_json=""; result_truncated=false

The permanent-failure runs used a synthetic invalid Telegram token; the actual adapter reported HTTP 401 Unauthorized. Diagnostic lastError was: text completion direct delivery was incomplete; automatic retry would duplicate sent chunks: Call to 'sendMessage' failed! (401: Unauthorized). No real channel credential or user destination was used.

Focused regression negative control

Running the candidate test table with the baseline projection source failed only the targeted case:

FAIL projects failed delivery with cleaned=true and wake=false
AssertionError: expected '## Child results awaiting delivery [row omitted]' to be undefined
Tests  1 failed | 14 passed (15)
Duration 20.66s

With the candidate projection:

Test Files  1 passed (1)
Tests       15 passed (15)
Duration    24.40s

The failed / cleanup-unset and requester-continuation controls passed on both sources.

Two-way door: reverting restores only the old prompt projection. Blast radius is parent-agent context for permanently failed, cleaned-up subagent deliveries; no state migration or channel behavior changes.

…as outstanding

A subagent whose required delivery exhausts its retries lands at
delivery.status="failed" via finalizeResumedAnnounceGiveUp, which then
calls completeCleanupBookkeeping and stamps cleanupCompletedAt. That row
is terminal: resumeSubagentRun hard-stops on cleanupCompletedAt, so it is
never redriven, announced, or delivered again.

hasOutstandingCompletion still counted every "failed" delivery as
outstanding, so the same dead result was re-rendered into the
"## Child results awaiting delivery" block of the requester runtime
context on every LLM boundary and survived gateway restarts.

Exclude only the drained give-up row (failed + cleanupCompletedAt).
Delivery still owned by a pending requester settle wake short-circuits
earlier; a failed row still between retries has no cleanupCompletedAt
yet; suspended/pending/in_progress are unaffected. The admission-store
failed writes already set suppressCompletionDelivery or
intentional_non_delivery and were already excluded, so no change is
needed there.

Fixes openclaw#154834
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Exclude permanently failed, cleanup-complete child deliveries from outstanding parent context while preserving recoverable deliveries and requester continuations.

Example: Child run 361cc79c-081a-4d20-85c7-b4e24bc006e4 has delivery=failed, cleanupCompletedAt=1791931060104, and no requester continuation.

  • Before: Every later parent request lists it under Child results awaiting delivery.
  • After: The outstanding row disappears while recent completion metadata and the durable failed record remain.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused correct repair with captured shipped-entry-point proof, a baseline-negative regression, preserved controls, and successful exact-head CI.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Captured output exercises the built isolated Gateway, real parent sessions_spawn, child failure, and actual adapter rejection at the exact candidate head; the next parent-model request omits the settled failed row while a recoverable control remains visible, resolving the prior capture request.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Parents repeatedly receive stale outstanding-result context for child deliveries that permanently failed and completed cleanup.
Reason: The change corrects the original reported shape with minimal production code and leaves distinct pending, suspended, and retained-continuation cases intact.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current-main bug with a focused, correct change; the newly captured Gateway output satisfies the prior proof request.

Priority: P2
Reviewed head: 92f78c4c066528987ebee6c526d45a7f52dfb45c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The subagent registry supplies retained lifecycle facts to the runtime-context projection, which adds bounded child status and outstanding results to parent model requests.

flowchart TD
  A[Child execution] --> B[Delivery lifecycle]
  B --> C[Subagent registry]
  C --> D[Outstanding result projection]
  D --> E[Parent runtime context]
  E --> F[Parent model request]
Loading

Technical review

Best possible solution:

Land this focused projection correction through the normal maintainer workflow.

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

Current-main source admits the reported failed, cleanup-complete record, and supplied baseline Gateway captures show its recurrence in the parent request; no target code was executed during this review.

Is this the best way to solve the issue?

The existing projection owner is the correct repair boundary because lifecycle state is already terminal; excluding this settled shape preserves outstanding retries, continuations, and recent-history visibility without changing persistence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 31e361573b4d.

Provenance checked

  • Outstanding child-result projection keeps the original intent (da29aff: Retain bounded discovery of completed-child results while delivery or requester continuation remains outstanding, including older generations and no-spawn turns.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • EricCai: Raw commit da29aff adds src/agents/subagents/registry/subagent-active-context.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: da29aff743b9; files: src/agents/subagents/registry/subagent-active-context.ts)
  • Peter Steinberger: Raw commit 059ac34 adds src/agents/subagents/registry/subagent-active-context.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 059ac3469fee; files: src/agents/subagents/registry/subagent-active-context.ts)

PR surface

Source +4, Tests +40. Total +44 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 0 +4
Tests 1 40 0 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 44 0 +44

Root-cause cluster

Relationship: same_root_cause
Canonical: #154834
Summary: This PR and the alternative repair the same mismatch between terminal failed-delivery cleanup and outstanding-context projection.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Recurring stale child obligations waste parent context and can confuse later turns, with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-03T07:37:40.228Z sha 2eb547e :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-13T22:44:21.398Z sha 92f78c4 :: needs real behavior proof before merge. :: none

Reviewed October 13, 2026, 6:56 PM ET / 22:56 UTC (Revision 3).

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Sep 21, 2026
…-context fix

Adds an end-to-end regression that drives the real SubagentLifecycleController
give-up path (finalizeResumedAnnounceGiveUp -> completeCleanupBookkeeping) so it
stamps a real cleanupCompletedAt, registers the resulting record in the live
subagent registry, then renders the actual requester runtime-context through
buildActiveSubagentRuntimeContext. This is real behavior, not a seeded
assertion: cleanupCompletedAt is produced by the production give-up flow, never
hand-set.

The test asserts the abandoned failed child is omitted from
"## Child results awaiting delivery" while a genuinely pending sibling is
retained, and logs the rendered block as quotable evidence. Reverting the
hasOutstandingCompletion guard makes it fail at the leak assertion.

Refs openclaw#154834
@linhongyu510

Copy link
Copy Markdown
Contributor Author

Addressed the sole Real behavior: Needs proof blocker from the first review.

Added subagent-active-context.give-up-integration.test.ts, which drives the real SubagentLifecycleController give-up path (finalizeResumedAnnounceGiveUp → completeCleanupBookkeeping) so the production flow stamps cleanupCompletedAt itself (never hand-set), registers the record in the live subagent registry, and renders the actual requester runtime context via buildActiveSubagentRuntimeContext. The rendered ## Child results awaiting delivery block after a real give-up lists only the still-pending sibling; the abandoned failed child is gone (exact bytes quoted in the PR body). Reverting the hasOutstandingCompletion guard makes this integration test fail at the leak assertion, so it is load-bearing.

Also attributed the first head's three checks-node-compact-large shard failures: all are in files outside this PR's diff and byte-identical to the merge base (gateway plugin-approval / node-invoke-plugin-policy / operator-approval-mcp-grants / main-session-restart-recovery), with a nearby green main CI run — inherited-from-main flake, not introduced here. Details in the PR body.

New head 528f9f00bc4: focused tests green (unit 20/20 + integration 1/1), full check:changed exit 0 in an independent checkout with all ratchets at baseline, and an independent P0–P2 autoreview came back scoped-clean / "patch is correct" / 0 findings.

@clawsweeper please re-review.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Sep 28, 2026
linhongyu510 added 2 commits October 3, 2026 03:36
…ive-up proof (openclaw#155019)

- Adapt subagent-active-context tests to main's async buildActiveSubagentRuntimeContext (await).
- Rewrite give-up integration test as a real SQLite persist->reload->render proof:
  drained failed+cleanupCompletedAt row drops out of awaiting-delivery after registry
  restart, retrying failed row (no cleanupCompletedAt) stays visible.
@linhongyu510

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review: rebased/merged to latest main (buildActiveSubagentRuntimeContext is now async — all tests await it), added a real SQLite persist->reload->render integration proof (drained failed+cleanupCompletedAt drops out of awaiting-delivery after restart; retrying failed row stays visible) and a guard-off ablation. Head 2eb547e.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus obviyus changed the title fix(subagents): stop re-rendering give-up terminal failed deliveries as outstanding fix(agents): omit settled failed deliveries from parent context Oct 13, 2026
@obviyus

obviyus commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 13, 2026
@obviyus

obviyus commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Added captured baseline/candidate parent-model context, durable failed/cleaned records, recoverable-control context, and the baseline-negative test output to the PR body. No source changes; exact head remains 92f78c4.

@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 13, 2026
@obviyus
obviyus merged commit 2b03e91 into openclaw:main Oct 13, 2026
136 of 138 checks passed
@obviyus

obviyus commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Landed in 2b03e91. Thanks @linhongyu510! I narrowed it to the projection check. Verified on a built Gateway: a permanently failed, cleaned-up subagent delivery no longer shows as outstanding on the parent's next turn.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…claw#155019)

fix(subagents): stop listing finished failed deliveries as outstanding

When a subagent's result delivery failed permanently and its cleanup had completed, the parent's next turn still listed that child as an outstanding result, so the model kept waiting on work that would never arrive. The active-child projection now skips failed deliveries whose cleanup is complete. Stored records are unchanged, and a failed delivery whose cleanup is still open stays listed.

Proof: built Gateway with a real parent spawn, a child failure and a permanent Telegram delivery rejection. On main, the next model request listed the child as outstanding; with this change it is omitted, while the recoverable failed-attempt control stays visible.

Fixes openclaw#154834. Thanks @linhongyu510, and @xydigitLybnnnn for the parallel fix in openclaw#155320.

Co-authored-by: linhongyu510 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@itanyplus

itanyplus commented Oct 18, 2026 •

Copy link
Copy Markdown

Production impact note + release ask (from a stable-track user)

Environment: OpenClaw 2026.10.2 (npm, Linux x64, node v24), Feishu channel, long-running multi-subagent workflows.

Since this fix is merged but not yet in any tag, sharing how the pre-fix behavior plays out in production — it is currently the most user-visible defect we have on stable:

  • During multi-hour external-tool / subagent turns, intermediate progress announcements never reach the channel. The journal records Lifecycle event dispatch failed: This operation was aborted for every subagent completion, and the announce fallback itself completes (stopReason=stop; the message lands intact in the session transcript) — but no outbound delivery follows.
  • From the end user's side this is total silence for hours in the middle of a long task: they cannot tell whether the agent is stuck, looping, or making progress. We've had to fall back to manually polling transcripts just to answer "what step is it on?".

Example from 2026-10-16: five subagent completions between 15:19–16:34, all aborted at dispatch; a mid-task review announcement at 16:37:09 landed in the transcript and never reached Feishu.

Release status: this fix (92f78c4) merged to main on Oct 13, but as of Oct 18 it is not in any published tag — compare diverges against v2026.10.4, v2026.10.5-beta.4 and v2026.10.10-beta.1. So every stable and beta user still has the broken behavior above.

Any chance this could make the next patch release (or the next 10.10 beta)? We'd upgrade the day a tag ships and report back against a fixed checklist: journal no longer shows the aborted dispatch errors, outbound delivery appears after announce, and a measured delivery rate for multi-round subagent tasks.


[Edit 2026-10-19 — SHA correction] The landed commit is 2b03e913d5 (the squash mergeCommit; 92f78c4c06 cited above is the PR head SHA — my compare evidence used the wrong object, sorry). Re-verified containment against 2b03e913d5: v2026.10.10-beta.1 does contain the fix (as does the release/2026.10.10 branch head); stable v2026.10.4 and the 10.5 line still exclude it. The stable-channel release ask stands, narrowed accordingly.

@itanyplus

itanyplus commented Oct 18, 2026 •

Copy link
Copy Markdown

Correction first: my compare evidence in the previous comment used the PR head SHA (92f78c4c06) instead of the actual squash-landed commit (2b03e913d5, verified via mergeCommit + ancestry on main). Apologies for the confusion.

Corrected containment, verified via compare against 2b03e913d5:

  • stable v2026.10.4 (current latest): excludes the fix (diverged)
  • v2026.10.5-beta.4 / release/2026.10.5 head: excludes
  • v2026.10.10-beta.1: contains it (and release/2026.10.10 head still does)

So the ask narrows to the stable channel: users on the default install (10.4 stable) still hit this every day. Is there a timeline for a stable release from the 10.10 line, or could this be backported into a 10.4.x patch?

The user-experience argument stands unchanged: when these announce deliveries silently fail, non-expert users just see the assistant go quiet mid-task — no progress, no completion notice — and cannot tell "still working" from "crashed" from "ignoring me". From their side it's simply "the bot randomly stopped replying", which is exactly what makes people furious and erodes trust in the product, while the transcript on the operator side shows the turn finishing fine, so nothing gets investigated.

Happy to upgrade on stable-tag day (or to 10.10-beta.1 sooner if useful) and report back with the checklist: journal signature gone, outbound delivery after announce, multi-round subagent delivery rate.

@itanyplus

Copy link
Copy Markdown

Now that release/2026.10.6 has been cut: as of today, 2b03e913d5 (the squash-merge landing of this fix) is not on that branch (compare/2b03e913d5...release/2026.10.6 head ba7f8c2e → diverged), while the 10.10 line already carries it (10.10-beta.1 / beta.2).

That means the next patch-line stable (10.6) would ship without this fix, and stable-channel users would keep silently losing subagent completion receipts until the 10.10 train goes stable. For a bug whose whole damage is silent loss of agent-to-user deliveries, that is a long exposure window on the stable channel.

Would you consider cherry-picking 2b03e913d5 onto release/2026.10.6 before it tags? A backport there (or a 10.5.x patch release) would give affected operators a much smaller upgrade step than jumping to the 10.10 line.

Standing offer from our earlier comments: on the day any tag containing this fix ships, we will upgrade and report back with the receipt checklist (single-send plus multi-turn live subagent runs; three signatures — delivery, non-truncation, cross-restart survival).

@itanyplus

Copy link
Copy Markdown

Adding a concrete user-impact dimension from our deployment (observed on the stable channel before the fix):

We routinely run multi-hour overnight subagent chains — report drafting with literature ingestion, batch document processing. On the affected build, those runs produced zero outbound feedback: no interim progress, no completion notice on the chat channel. The first reliable information arrived when the human opened the chat the next morning and asked "how did it go?" — by then the work had finished (or failed) hours earlier, invisibly. (Worst observed day: 5/5 subagent completions aborted their announce dispatch; 8 queued announces, 0 delivered.)

For a heavy user this flips the operating model from "assistant that reports back" to "batch system you must poll by hand". The cost is not a missing status line — it is that the user's morning planning depends on facts the gateway knew hours earlier but never delivered.

That is why we would appreciate the fix riding the next patch-line stable (cherry-pick 2b03e913d5 onto release/2026.10.6, or a 10.5.x patch) instead of waiting for the 10.10 train: overnight, long-horizon workloads are exactly what subagents exist for, and every stable release without this fix leaves the most engaged users flying blind.

hilsbos pushed a commit to hilsbos/openclaw that referenced this pull request Oct 22, 2026
…claw#155019)

fix(subagents): stop listing finished failed deliveries as outstanding

When a subagent's result delivery failed permanently and its cleanup had completed, the parent's next turn still listed that child as an outstanding result, so the model kept waiting on work that would never arrive. The active-child projection now skips failed deliveries whose cleanup is complete. Stored records are unchanged, and a failed delivery whose cleanup is still open stays listed.

Proof: built Gateway with a real parent spawn, a child failure and a permanent Telegram delivery rejection. On main, the next model request listed the child as outstanding; with this change it is omitted, while the recoverable failed-attempt control stays visible.

Fixes openclaw#154834. Thanks @linhongyu510, and @xydigitLybnnnn for the parallel fix in openclaw#155320.

Co-authored-by: linhongyu510 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 2b03e91)
Co-authored-by: RomneyDa <[email protected]>
@itanyplus

Copy link
Copy Markdown

Confirmed working in production on 2026.10.6 stable.

We upgraded our daily-driver deployment from 2026.10.5 to 2026.10.6 today (thanks for cherry-picking this onto the 10.6 line — that was the backport we asked for upthread). Post-upgrade verification, the three signatures we had been tracking:

  1. Zero dispatch failures since gateway start: no Lifecycle event dispatch failed / dispatch-aborted entries in the startup window (previous behavior on 10.5 showed recurring aborted lifecycle dispatches).
  2. Completion receipt delivered intact: a spawned multi-step child run's completion result reached the requester session un-truncated, including through the post-upgrade session continuity.
  3. Live three-step child run: sequential STEP1/2/3 task executed and logged with timestamps, final DONE marker present.

Watching the 10.10 train for the remaining related work. Thanks @RomneyDa @obviyus for the fix and the backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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.

[Bug]: failed subagent delivery recurs in every turn's runtime context

3 participants