Skip to content

feat(streaming): opt-in persistProgress mode for tool+commentary lines#89850

Closed
anagnorisis2peripeteia wants to merge 6 commits into
openclaw:mainfrom
anagnorisis2peripeteia:feat/persist-tool-commentary-progress
Closed

feat(streaming): opt-in persistProgress mode for tool+commentary lines#89850
anagnorisis2peripeteia wants to merge 6 commits into
openclaw:mainfrom
anagnorisis2peripeteia:feat/persist-tool-commentary-progress

Conversation

@anagnorisis2peripeteia

@anagnorisis2peripeteia anagnorisis2peripeteia commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Opt-in streaming.progress.persistProgress for Telegram: the tool + commentary progress draft persists in place above the final answer instead of being deleted when the answer arrives, and it is lossless — it never drops the oldest line and never truncates.

What it does when enabled (progress streaming mode):

  • Persist in place — at final-send the standing progress draft is finalized (stop()), not deleted (clear()); the answer goes to its own message below.
  • Accumulate in one message — the inter-tool commentary no longer rotates the answer lane per segment (gated on streamMode === "progress" && persistProgressEnabled); all commentary + tool lines accumulate in one draft. (Tool progress + commentary both use unbounded maxLines when persisted, so the rolling drop is disabled.)
  • Lossless overflow spill — when the draft outgrows the channel char limit (4096), it spills into a new message (reusing the existing supersede-and-retain primitive) rather than dropping the oldest lines.

Depends on the commentary render fix in #90883 (noCompact) so commentary renders in full.

Tests

  • tsgo clean; pnpm tsgo
  • draft-stream unit test: spills non-final overflow into a new retained message when losslessSpill is set
  • regenerated bundled-channel-config-metadata.generated.ts for the new persistProgress field (CI check:bundled-channel-config-metadata)

Proof

Captured via a local recreation of the Mantis (telegram-desktop-proof) flow on crabbox, persist-on:

one persisted draft: long commentary in full + tool reads, accumulated, answer separate below

One standing progress draft holds all three (long, full) commentary lines interleaved with the tool reads; the answer is a separate message below it — persist + accumulate + full-text commentary in a single turn.

Issues

Part of the #87326 progress UX work. Depends on #90883 (commentary delivery + render) and #89834 (claude-cli producer).

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: telegram Channel integration: telegram size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 3, 2026
@clawsweeper

clawsweeper Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed June 6, 2026, 11:45 AM ET / 15:45 UTC.

Summary
Adds a shared streaming.progress.persistProgress config field, Telegram progress-draft persistence with lossless spill behavior, stacked CLI commentary progress plumbing, docs, generated config metadata, and tests.

PR surface: Source +221, Tests +416, Docs +1, Generated 0. Total +638 across 22 files.

Reproducibility: yes. for the review findings: source inspection shows native draft updates can bypass the generic answer-lane stream that persistProgress retains, and the public config type promises stream-off behavior that is only in a separate open PR. The main requested feature itself has screenshot proof for the progress-mode path.

Review metrics: 2 noteworthy metrics.

  • Public config surface: 1 field added; exposed in 3 channel progress schemas. persistProgress expands the shared channel config contract, so maintainers need API/scope approval before merge.
  • Open stack dependencies: 3 open related PRs. The PR body and related context tie this behavior to still-open commentary producer, bridge, and stream-off accumulator work.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🐚 platinum hermit ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix or explicitly scope the native Telegram draft interaction with persistProgress.
  • Align the public config type/docs with the behavior included in this PR or merge the stream-off accumulator in the same approved stack.

Mantis proof suggestion
A real Telegram Desktop proof would materially help verify the retained progress lane and the native-draft interaction before merge. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

telegram desktop proof: verify persistProgress keeps tool/commentary progress above the final answer and does not lose tool progress when nativeToolProgress is configured.

Risk before merge

Maintainer options:

  1. Fix scope and native-draft gaps first (recommended)
    Before merge, align the public config contract with the behavior included in this PR and make persistProgress preserve tool progress even when native Telegram drafts are configured.
  2. Approve the shared contract intentionally
    Maintainers can choose to land persistProgress as a shared channel config surface, but should record the intended channel/mode scope and merge order first.
  3. Pause until the stack is ready
    If the desired behavior depends on the open producer, bridge, and stream-off accumulator PRs, hold this PR until the stack can be reviewed as one coherent user-facing change.

Next step before merge

  • [P2] The code issues are concrete, but the shared config surface and stack order require maintainer product/API judgment before automation should repair or land it.

Security
Cleared: No dependency, workflow, credential, package, or supply-chain changes were found; the opt-in retained-progress exposure is covered as message-delivery merge risk.

Review findings

  • [P2] Disable native drafts when progress must persist — extensions/telegram/src/bot-message-dispatch.ts:909
  • [P2] Remove the unimplemented stream-off contract — src/config/types.base.ts:80-81
Review details

Best possible solution:

Merge only after maintainers approve the shared config scope, the public comments/docs match behavior that lands in the same stack, and Telegram persistence either bypasses native drafts or materializes native draft progress into the persisted lane with coverage.

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

Yes for the review findings: source inspection shows native draft updates can bypass the generic answer-lane stream that persistProgress retains, and the public config type promises stream-off behavior that is only in a separate open PR. The main requested feature itself has screenshot proof for the progress-mode path.

Is this the best way to solve the issue?

No; the proposed direction is plausible, but the current patch is not the best merge shape until native-draft persistence and the public off-mode/shared-contract wording are fixed or explicitly approved as part of the stack.

Full review comments:

  • [P2] Disable native drafts when progress must persist — extensions/telegram/src/bot-message-dispatch.ts:909
    With persistProgress enabled, a configured native Telegram tool-progress draft can still win the tryNativeUpdate path. That stores the line but never updates the answer-lane stream, so activeAnswerDraftIsToolProgressOnly stays false and the final retain path is skipped; tool-only progress in a DM with streaming.preview.nativeToolProgress: true remains ephemeral instead of persisted. Gate native drafts off for persisted progress or materialize them into the persistent lane, with a regression test.
    Confidence: 0.83
  • [P2] Remove the unimplemented stream-off contract — src/config/types.base.ts:80-81
    The public config type promises that persistProgress in streaming.mode: "off" delivers an accumulated lane before the answer, but this PR only implements live progress mode and the stream-off accumulator is still separate in feat(telegram): non-streaming tool+commentary progress accumulator #89890. Until that behavior lands in the same stack, this comment exposes a config contract current code does not satisfy.
    Confidence: 0.86

Overall correctness: patch is incorrect
Overall confidence: 0.84

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 69a406118cbb.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The inspected Telegram Desktop screenshot shows the main after-fix behavior: a persisted progress draft remains above a separate final answer, though it does not cover the native-draft edge case called out in review.

Label justifications:

  • P2: This is a normal-priority user-facing Telegram progress improvement with bounded but real config and delivery risk.
  • merge-risk: 🚨 compatibility: The PR adds a shared config/default surface and public config type behavior that can affect upgrades and channel schema expectations.
  • merge-risk: 🚨 message-delivery: The PR changes whether Telegram tool/commentary progress is retained, dropped, or sent as durable chat messages.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The inspected Telegram Desktop screenshot shows the main after-fix behavior: a persisted progress draft remains above a separate final answer, though it does not cover the native-draft edge case called out in review.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected Telegram Desktop screenshot shows the main after-fix behavior: a persisted progress draft remains above a separate final answer, though it does not cover the native-draft edge case called out in review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected Telegram Desktop screenshot shows the main after-fix behavior: a persisted progress draft remains above a separate final answer, though it does not cover the native-draft edge case called out in review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram chat behavior by retaining progress messages above the final answer.
Evidence reviewed

PR surface:

Source +221, Tests +416, Docs +1, Generated 0. Total +638 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 12 227 6 +221
Tests 7 416 0 +416
Docs 2 3 2 +1
Config 0 0 0 0
Generated 1 17 17 0
Other 0 0 0 0
Total 22 663 25 +638

What I checked:

  • Repository policy read and applied: Root, scoped docs/extensions/agents/channels policy, and Telegram maintainer notes were read; they make config/default surfaces and Telegram streaming/message delivery compatibility-sensitive review areas. (AGENTS.md:17, 69a406118cbb)
  • Current main lacks the new config contract: On current main, ChannelStreamingProgressConfig has label, labels, maxLines, maxLineChars, render, toolProgress, commandText, and commentary, but no persistProgress. (src/config/types.base.ts:56, 69a406118cbb)
  • Current main clears progress drafts: Current Telegram dispatch clears the tool-progress answer lane before final delivery, so main does not already implement the requested persisted draft behavior. (extensions/telegram/src/bot-message-dispatch.ts:1120, 69a406118cbb)
  • PR adds live persistence but still allows native draft bypass: The PR computes persistProgressEnabled, but native Telegram tool-progress drafts can still be created and used through tryNativeUpdate; successful native updates do not update the answer lane that the persist finalization path retains. (extensions/telegram/src/bot-message-dispatch.ts:909, c7fe3ec274d7)
  • Native drafts are ephemeral by design: The Telegram native tool-progress draft uses sendMessageDraft via createNativeTelegramToolProgressDraft; stop() only stops future draft updates and does not materialize a persisted Telegram message. (extensions/telegram/src/native-tool-progress-draft.ts:51, 69a406118cbb)
  • PR documents stream-off behavior not implemented here: The public config type says Telegram delivers the accumulated lane in off mode, while this PR body and docs describe progress-mode persistence and the separate stream-off accumulator remains open. (src/config/types.base.ts:80, c7fe3ec274d7)

Likely related people:

  • obviyus: Recent current-main history introduced shared progress-draft compositor primitives and Telegram commentary progress paths that this PR extends. (role: feature owner / recent channel progress contributor; confidence: high; commits: 04f93c2fb494, a4b09d72b92b, 41ee6b1dd68c; files: src/channels/progress-draft-compositor.ts, src/channels/streaming.ts, extensions/telegram/src/bot-message-dispatch.ts)
  • vincentkoc: Most recent current-main change in shared channel progress formatting is directly adjacent to this PR's progress-draft formatting changes. (role: recent channel progress maintainer; confidence: medium; commits: d90a94ad165b; files: src/channels/streaming.ts)
  • jmao0001: Recent Telegram preview duplication work touched the same Telegram dispatch file and streaming-preview behavior this PR changes. (role: recent Telegram streaming contributor; confidence: medium; commits: e4993ec00f05; files: extensions/telegram/src/bot-message-dispatch.ts)
  • steipete: Recent docs/config/channel/CLI path history shows repeated adjacent work on public contracts and CLI agent helpers affected by this stack. (role: adjacent docs/config and CLI area contributor; confidence: medium; commits: ca9249e35729, 34f7d78449da, fa2b2ffab46f; files: src/channels/streaming.ts, src/agents/cli-output.ts, docs/channels/telegram.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added 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. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 3, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the channel: discord Channel integration: discord label Jun 3, 2026
@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

Verified end-to-end — and fixed a config-validation gap along the way

While proving this out (Telegram channel, claude-cli backend) the gateway rejected the config:

channels.telegram.streaming.progress: invalid config: must not have additional properties: "persistProgress"

Root cause: persistProgress was added to the streaming progress type + zod schema, but the generated channel-config metadata wasn't regenerated — so pnpm config:channels:check was failing (stale output) and the flag was rejected by channel-config validation on every channel.

Fixed in 22780b5: ran pnpm config:channels:gen → regenerated src/config/bundled-channel-config-metadata.generated.ts (1 file, +17/-17; persistProgress now present). config:channels:check passes and the flag validates.

Before / after

Same build, same prompt ("read three files, one line each on what they do"), only streaming.progress.persistProgress toggled.

persistProgress: false — progress wiped, final message is the answer only:

• src/channels/streaming.ts — Normalizes/resolves channel streaming config …
• src/channels/progress-draft-compositor.ts — Stateful compositor for live progress drafts …
• src/config/types.base.ts — Core channel config types/enums …

persistProgress: true — the tool-progress record is frozen and prepended above the answer:

Tidepooling

📖 Read: first 50 lines of …/src/channels/streaming.ts
📖 Read: first 50 lines of …/src/channels/progress-draft-compositor.ts
📖 Read: first 50 lines of …/src/config/types.base.ts

• src/channels/streaming.ts — Normalizes/resolves channel streaming config …
• src/channels/progress-draft-compositor.ts — Stateful compositor for live progress drafts …
• src/config/types.base.ts — Core channel config types/enums …

The frozen progress lines appear above the final answer with the flag on, and are absent with it off. ✅

@anagnorisis2peripeteia anagnorisis2peripeteia marked this pull request as ready for review June 5, 2026 16:34
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jun 5, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. and removed 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. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 5, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label Jun 6, 2026
@anagnorisis2peripeteia anagnorisis2peripeteia force-pushed the feat/persist-tool-commentary-progress branch from 469e0a6 to 6edee1d Compare June 6, 2026 12:19
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jun 6, 2026
@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

Addressed: align the persistProgress config contract ([P2])

Good catch — the prior revision added persistProgress to the runtime zod schema (zod-schema.providers-core.ts) but left the public TS type and docs out of sync. Fixed in 6edee1d:

  • src/config/types.base.ts — added persistProgress?: boolean to ChannelStreamingProgressConfig with a doc comment, so the public config type matches validation.
  • docs/concepts/streaming.md — the progress-mode bullet (which said the draft is cleared at completion) now documents persistProgress: true as the opt-in to persist it in place + accumulate losslessly.
  • docs/channels/telegram.md — added the streaming.progress.persistProgress config bullet, and corrected the "progress-mode finals clear the status draft" line to note the persist exception.

No behavioral change — type/docs only. pnpm tsgo clean; the schema field + regenerated bundled-channel-config-metadata.generated.ts are unchanged.

@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

anagnorisis2peripeteia added a commit to anagnorisis2peripeteia/openclaw that referenced this pull request Jun 6, 2026
When streaming.mode is off, nothing streams during a turn, so tool and
commentary progress were lost entirely. With streaming.progress.persistProgress
enabled, accumulate the commentary + tool-progress lines silently as the turn
runs and deliver them as their own message (commentary first, then the tool
lines) immediately before the final answer — so the user gets the full
progress lane once, when the answer is ready.

- Accumulate into a per-turn log on onItemEvent (preamble) and onToolStart,
  gated on persistProgress; emit it as a durable set in emitPersistedProgressSet
  before the answer when there is no live draft stream (stream-off path).
- Allow progress callbacks to fire when source delivery is suppressed but
  persistProgress is set, so the accumulator runs with the stream off.
- Add resolveChannelStreamingProgressCommentaryEnabled: a guard-free reading of
  the commentary opt-in for the stream-off accumulator (the public
  resolveChannelStreamingProgressCommentary keeps its progress-mode guard).

Builds on streaming.progress.persistProgress (openclaw#89850).
@anagnorisis2peripeteia anagnorisis2peripeteia force-pushed the feat/persist-tool-commentary-progress branch from 6edee1d to 2a7c39a Compare June 6, 2026 14:55
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 6, 2026
@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

Addressed the streaming-mode contract finding: the persist behavior in rotateAnswerLaneAfterToolProgress is now gated on streamMode === "progress" (matching the skip-rotate gate), so persistProgress is inert in partial/block modes — the guard-free resolver stays (the #89890 stream-off accumulator needs it) but only the live progress-draft path is affected. Added a strict-schema assertion test for streaming.progress.persistProgress (top-level + per-account). @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 6, 2026
@anagnorisis2peripeteia anagnorisis2peripeteia force-pushed the feat/persist-tool-commentary-progress branch from 2a7c39a to 8364043 Compare June 6, 2026 15:17
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 6, 2026
anagnorisis2peripeteia added a commit to anagnorisis2peripeteia/openclaw that referenced this pull request Jun 6, 2026
When streaming.mode is off, nothing streams during a turn, so tool and
commentary progress were lost entirely. With streaming.progress.persistProgress
enabled, accumulate the commentary + tool-progress lines silently as the turn
runs and deliver them as their own message (commentary first, then the tool
lines) immediately before the final answer — so the user gets the full
progress lane once, when the answer is ready.

- Accumulate into a per-turn log on onItemEvent (preamble) and onToolStart,
  gated on persistProgress; emit it as a durable set in emitPersistedProgressSet
  before the answer when there is no live draft stream (stream-off path).
- Allow progress callbacks to fire when source delivery is suppressed but
  persistProgress is set, so the accumulator runs with the stream off.
- Add resolveChannelStreamingProgressCommentaryEnabled: a guard-free reading of
  the commentary opt-in for the stream-off accumulator (the public
  resolveChannelStreamingProgressCommentary keeps its progress-mode guard).

Builds on streaming.progress.persistProgress (openclaw#89850).
@anagnorisis2peripeteia

Copy link
Copy Markdown
Contributor Author

Fixed the [P1] cross-mode leak: the losslessSpill answer-lane flag is now gated on streamMode === "progress" (the persistProgressEnabled const stays guard-free for the stream-off accumulator, but this live-draft usage is gated), so persistProgress no longer changes partial/block preview overflow/retention. Added regression coverage that partial mode keeps losslessSpill:false with the flag set while progress mode still enables it. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 6, 2026
Persisted progress keeps every accumulated tool/commentary line (no rolling
maxLines drop) and, when the live draft outgrows a message, rolls the overflow
into a fresh message via the existing supersede primitive (retain the filled
message) instead of truncating. At turn end the standing progress message is
finalized in place rather than deleted, and the final answer goes to a new
message. Gated on streaming.progress.persistProgress.
@anagnorisis2peripeteia anagnorisis2peripeteia force-pushed the feat/persist-tool-commentary-progress branch from 8364043 to c7fe3ec Compare June 6, 2026 15:37
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 6, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 6, 2026
anagnorisis2peripeteia added a commit to anagnorisis2peripeteia/openclaw that referenced this pull request Jun 6, 2026
When streaming.mode is off, nothing streams during a turn, so tool and
commentary progress were lost entirely. With streaming.progress.persistProgress
enabled, accumulate the commentary + tool-progress lines silently as the turn
runs and deliver them as their own message (commentary first, then the tool
lines) immediately before the final answer — so the user gets the full
progress lane once, when the answer is ready.

- Accumulate into a per-turn log on onItemEvent (preamble) and onToolStart,
  gated on persistProgress; emit it as a durable set in emitPersistedProgressSet
  before the answer when there is no live draft stream (stream-off path).
- Allow progress callbacks to fire when source delivery is suppressed but
  persistProgress is set, so the accumulator runs with the stream off.
- Add resolveChannelStreamingProgressCommentaryEnabled: a guard-free reading of
  the commentary opt-in for the stream-off accumulator (the public
  resolveChannelStreamingProgressCommentary keeps its progress-mode guard).

Builds on streaming.progress.persistProgress (openclaw#89850).
@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@obviyus

obviyus commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded by #91976, which just landed — it delivers the durable inter-tool commentary record through the core verbose standalone-progress lane (/verbose on, every channel, no new config key), so a persist mode on the streaming draft is no longer needed. Thanks for iterating to the better design, @anagnorisis2peripeteia!

@obviyus obviyus closed this Jun 11, 2026
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: telegram Channel integration: telegram docs Improvements or additions to documentation mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants