Skip to content

fix: delegated progress card keeps the original checklist after the parent yields - #179902

Open
aspalagin wants to merge 3 commits into
openclaw:mainfrom
aspalagin:fix/retained-progress-plan
Open

aspalagin wants to merge 3 commits into
openclaw:mainfrom
aspalagin:fix/retained-progress-plan

Conversation

@aspalagin

@aspalagin aspalagin commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #179867

What Problem This Solves

Fixes: after a turn yields to announcing subagents, the progress card it hands to them on Telegram or Discord keeps the yielding turn's checklist (0/3 complete) while the resumed parent updates its progress_card.

User Impact

User impact: while the requester's settle wake runs on a retained card, the card's checklist follows the parent's progress_card updates (1/3 complete, then later steps), the same as on a live turn's card. Child status rows and prepared operation names are unchanged, and a child's own plan still never reaches the card.

Why This Change Was Made

A live turn gets plan updates only through its own dispatch bridge (stream: "plan" → onPlanUpdate). After adoption the card belongs to the subagent registry (subagent-progress-draft.ts), which already follows the settle wake run for tool activity (requester:tool) but projected only stream: "item" events, and ProgressContinuationDraft had no way to carry a plan.

  • ProgressContinuationDraft gains the optional updatePlan(steps, options) operation, and the registry's follow takes a "child" | "requester" audience: only the settle wake's stream: "plan" phase: "update" events reach updatePlan; child runs stay item-only. This is the same contract and signature proposed in fix(telegram): keep progress and final replies after delegation #173026 by @johan-eilertsen, so this narrow repair and that broader one share one operation instead of competing.
  • Telegram and Discord retained cards implement updatePlan with the compositor's pushPlanProgress, the same call their live turns use (Discord shares its start-on-first-render step between push and updatePlan).
  • Docs: one sentence each in concepts/subagent-yield-handoff.md and concepts/progress-drafts.md.

A new user turn in the same session while a card is retained keeps rendering its plan on its own card; this change only covers the settle wake that owns the retained card.

Evidence

Live Telegram proof on head e0cace07c84 (artifacts: proof/179902-live, commit d7ed6dc): isolated source Gateway from this branch, a dedicated test bot on production Telegram, a real Telegram user account (client screenshots plus a 2 s recorder of new messages, edits and deletions), streaming.mode: "progress". Only model decisions are synthetic (mock, adapted from the skill's reply-policy-mock.mjs); progress_card, sessions_spawn (completionTarget: "parent"), sessions_yield with an acknowledgment, the child run, the requester settle wake, card adoption and Telegram delivery are real.

After adoption, child running After the settle wake's progress_card (same message)

Recorder timeline (UTC), same Telegram message throughout: 23:08:19 card 0/3 complete → 23:08:20 sessions_yield → 23:08:23 transcribe: running on the same card (adopted) → 23:12:24 child completed → 23:12:36 settle wake progress_card rev 2 → 23:12:38 card edited to 1/3 complete, [x] Fetch the recording, Transcribe it (in progress) → 23:16:38 final message, card deleted.

Same scenario with the four changed production files reverted to upstream/main (08d77cab437): the settle wake called progress_card (1/3) at 22:55:34 and the card stayed 0/3 complete until it was retired with the final at 22:55:56 (events).

Tests and checks:

  • New regression tests, red on main and green with the fix (each production file reverted alone):
    • src/agents/subagents/registry/subagent-progress-draft.test.ts › "shows the resumed requester's checklist but never a child's": a child's plan event while it runs and the settle wake's own plan; updatePlan must be called exactly once with the wake's plan. On main: Number of calls: 0. A mutation that also follows child plans fails with the child step in the second call.
    • extensions/telegram/src/bot-message-dispatch.progress-lifecycle.telegram-http.test.ts › "replaces the retained card's checklist with the requester's plan" (Bot API HTTP fixture: 0/2 complete → 1/2 complete on the retained message).
    • extensions/discord/src/monitor/message-handler.draft-preview.rest.test.ts › "replaces the retained card's checklist with the requester's plan" (REST fixture: ▸ Fetch the recording → ▸ Transcribe it).
  • node scripts/run-vitest.mjs on the three files: 14 + 18 + 21 passed.
  • tsgo: tsconfig.core.json, tsconfig.extensions.json, test/tsconfig/tsconfig.core.test.agents-sessions.json, and a focused config over the two channel test files: clean.
  • oxfmt --check, oxlint, git diff --check, format-docs --check, check-line-cap-ratchet --base upstream/main: clean. check-max-lines-ratchet --base upstream/main reports only two ui/src/pages/*-page-state.ts files that this PR does not touch (their suppressions are already on main).

Review: autoreview --mode branch --base upstream/main on e0cace07c84 (Codex, gpt-6.1-sol, P0 threshold) → scoped-clean, no actionable findings.

…equester

A progress card handed to announcing subagents after `sessions_yield` kept the
yielding turn's checklist, because the adoption owner followed only the settle
wake's tool items. The registry now also follows that wake's `stream: "plan"`
updates and hands them to the card through an optional
`ProgressContinuationDraft.pushPlan`, which the Telegram and Discord retained
cards render with `pushPlanProgress`. Child runs are not followed for plans.

Closes openclaw#179867
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: telegram Channel integration: telegram agents Agent runtime and tooling size: S labels Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Forward resumed-parent checklist updates to retained Telegram and Discord progress cards.

Example: A parent yields after creating a three-step recording transcription checklist, then resumes and completes the first step.

  • Before: The retained card continues showing “0/3 complete” and Fetch the recording in progress.
  • After: The same card shows “1/3 complete”, Fetch the recording completed, and Transcribe it in progress.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, correct repair with inspected live Telegram proof and distinct registry and transport regressions; public SDK direction remains undecided and exact-head CI is pending.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Inspected screenshots and pinned Telegram event/model traces exercise an isolated Gateway on e0cace0 with real Telegram delivery and deterministic model responses: adoption retains the same message, requester settlement advances its checklist, and the final retires it; the base comparison stays frozen, resolving the previous review's proof request.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: A retained progress card looks stuck on the original checklist even as its resumed parent completes steps.
Reason: The user benefit and focused implementation are clear, but introducing the public optional updatePlan operation requires an SDK owner decision.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR fixes a current checklist-forwarding defect without introducing a competing owner; no actionable code defects were found, but the additive public SDK operation needs an owner decision.

Priority: P2
Reviewed head: e0cace07c84a6cbbed7aeff8d4bfbe30da0614f7
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should the public retained-draft contract gain optional updatePlan(steps, options) in this focused repair?
  • Recommendation: Accept the focused SDK extension: Approve optional updatePlan with the existing compositor signature and requester-only forwarding, coordinating the same operation with fix(telegram): keep progress and final replies after delegation #173026.
  • Why: The operation is additive and narrowly fixes the defect, but no written owner acceptance was found here, and the overlapping broader PR explicitly leaves acceptance of this same operation to the channel SDK owner.

Before merge

  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Agent review details

How this fits together

The subagent registry follows delegated work and requester settlement runs, forwards public progress to a retained channel draft, and leaves rendering, throttling, transport authorization, and deletion with each channel.

flowchart LR
  A[Parent yields] --> B[Registry retains draft]
  C[Child activity] --> B
  D[Requester settlement plan] --> B
  B --> E[Channel compositor]
  E --> F[Telegram or Discord card]
Loading

Technical review

Best possible solution:

Use the existing registry subscription and channel compositor queues to update only the resumed requester's checklist through one accepted optional SDK operation.

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

Current-main source drops requester plan events after adoption, and the contributor's inspected base trace reproduces the frozen checklist; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete repair found: extend the existing draft operation, follow the already-selected requester run, and reuse both channels' compositor queues while excluding child plans.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4397e7409d58.

Provenance checked

  • Registry retention and requester event forwarding keeps the original intent (9f4a64d: Keep a confirmed channel card under existing registry settlement ownership while forwarding safe activity and excluding private child content.)
  • Discord retained rendering keeps the original intent (e9c58e9: Provide useful default progress using the shared compositor and channel transport without another state owner.)
  • Discord quiet progress policy keeps the original intent (b1066a5: Hide tool and lifecycle rows by default while retaining authored text, plans, and approval requests.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit 9f4a64d adds src/agents/subagents/registry/subagent-progress-draft.ts:104 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9f4a64d5b130; files: src/agents/subagents/registry/subagent-progress-draft.ts)
  • Ayaan Zaidi: Raw commit 6121469 adds extensions/telegram/src/bot-message-dispatch-progress.ts:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 61214694cc15; files: extensions/telegram/src/bot-message-dispatch-progress.ts)
  • Peter Steinberger: Raw commit f353b88 adds extensions/telegram/src/bot-message-dispatch-progress.ts:121 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f353b8897130; files: extensions/telegram/src/bot-message-dispatch-progress.ts)

PR surface

Source +27, Tests +71, Docs +3. Total +101 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 45 18 +27
Tests 3 73 2 +71
Docs 2 5 2 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 123 22 +101

Review metrics

Metric Value Why it matters
Public SDK addition 1 optional operation Adds updatePlan to the existing retained-draft contract without a new configuration option, required adapter member, or persistence format.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #179867
Summary: This PR directly repairs the reported missing requester-plan forwarding; the broader peer-progress PR partially overlaps it.

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: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status no longer selects a status label.

Label justifications:

  • P2: Delegated requests display stale checklist progress while execution and final delivery continue.
  • merge-risk: 🚨 compatibility: The optional updatePlan member expands a public channel SDK contract and needs owner acceptance, although existing adapter shapes remain compatible.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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 (1 earlier review cycle)
  • reviewed 2026-10-21T21:53:46.108Z sha 787a0fd :: needs real behavior proof before merge. :: none

Reviewed October 21, 2026, 7:29 PM ET / 23:29 UTC (Revision 2).

Match the optional operation proposed in openclaw#173026 (`updatePlan(steps, options)`,
requester-only `follow` audience) so both repairs share one contract. Telegram
forwards the arguments to `pushPlanProgress`; Discord renders them through its
shared start-on-first-render queue.
@aspalagin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale after 7 days without qualifying human activity.
Without new human activity, Barnacle may close it as not planned 7 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Nov 28, 2026

This branch has not been deployed

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

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: telegram Channel integration: telegram docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Retained Telegram progress card keeps the yielding turn's checklist after sessions_yield

1 participant