feat(streaming): opt-in persistProgress mode for tool+commentary lines#89850
Conversation
|
Codex review: found issues before merge. Reviewed June 6, 2026, 11:45 AM ET / 15:45 UTC. Summary 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 Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest 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 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 69a406118cbb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +221, Tests +416, Docs +1, Generated 0. Total +638 across 22 files. View PR surface stats
What I checked:
Likely related people:
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. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Verified end-to-end — and fixed a config-validation gap along the wayWhile proving this out (Telegram channel,
Root cause: Fixed in Before / afterSame build, same prompt ("read three files, one line each on what they do"), only
The frozen progress lines appear above the final answer with the flag on, and are absent with it off. ✅ |
469e0a6 to
6edee1d
Compare
Addressed: align the
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
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).
6edee1d to
2a7c39a
Compare
|
Addressed the streaming-mode contract finding: the persist behavior in |
|
🦞👀 Command router queued. I will update this comment with the next step. |
2a7c39a to
8364043
Compare
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).
|
Fixed the [P1] cross-mode leak: the |
|
🦞👀 Command router queued. I will update this comment with the next step. |
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.
8364043 to
c7fe3ec
Compare
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).
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Closing as superseded by #91976, which just landed — it delivers the durable inter-tool commentary record through the core verbose standalone-progress lane ( |
Summary
Opt-in
streaming.progress.persistProgressfor 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):
stop()), not deleted (clear()); the answer goes to its own message below.streamMode === "progress" && persistProgressEnabled); all commentary + tool lines accumulate in one draft. (Tool progress + commentary both use unboundedmaxLineswhen persisted, so the rolling drop is disabled.)Depends on the commentary render fix in #90883 (
noCompact) so commentary renders in full.Tests
tsgoclean;pnpm tsgospills non-final overflow into a new retained message when losslessSpill is setbundled-channel-config-metadata.generated.tsfor the newpersistProgressfield (CIcheck:bundled-channel-config-metadata)Proof
Captured via a local recreation of the Mantis (telegram-desktop-proof) flow on crabbox, persist-on:
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).