Repository navigation
fix(discord): keep tool rows in the progress draft under verbose - #111947
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 12:32 AM ET / 04:32 UTC. ClawSweeper reviewWhat this changesThe branch changes Discord progress streaming so tool lines remain in the live progress draft during verbose sessions, while commentary and narration can still yield to the durable verbose-message lane. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open. The targeted Discord fix appears to preserve tool-progress rows while the verbose lane owns commentary, but the branch still includes the previously flagged release-owned changelog edit and has no after-fix real Discord behavior proof; GitHub also reports the draft branch as dirty, so it needs a rebase and refresh before merge. Priority: P2 Review scores
Verification
How this fits togetherDiscord receives agent progress callbacks and turns them into a live editable progress draft. A separate durable verbose lane can send commentary and summaries, so the channel must decide which events belong only in the draft versus which have a standalone counterpart. flowchart LR
A[Agent progress callbacks] --> B[Discord progress runtime]
B --> C{Commentary or tool line?}
C -->|Commentary or narration| D[Durable verbose lane]
C -->|Tool start item command patch| E[Live Discord progress draft]
D --> F[Discord channel messages]
E --> F
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +43, Docs +1. Total +50 across 3 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the narrow event-ownership split, remove the release-owned changelog entry, rebase onto current Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction proof is present. The source-level callback split and focused regression tests make the reported path reproducible from code, but no real Discord run has been shown after the fix. Is this the best way to solve the issue? Unclear. The proposed separation is a narrow, plausible fix because commentary and tool events have different durable-lane counterparts, but the branch must first remove the release-owned changelog edit and demonstrate the live channel behavior after rebasing. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a2eceb9b2fd9. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
ac07ed9 to
8282431
Compare
|
Maintainer proof for exact head
The live run initially exposed duplicate commentary when the same text arrived under changing producer IDs. The updated head moves that dedupe into the shared durable-commentary buffer and adds a focused regression, while retaining the contributor's clean Discord tool-lane ownership fix. |
8282431 to
38a0b90
Compare
8a0478e to
eeb38dd
Compare
eeb38dd to
c6b0a39
Compare
Co-authored-by: zeroaltitude <[email protected]>
a7c49aa to
b4f347e
Compare
|
Merged via squash.
|
* origin/main: fix(zalo): stop provider startup after gateway shutdown (#115763) fix(agents): bound completed background process retention (#115760) fix(plugins): bound hook execution and retire stale registrations (#115695) fix(ui): collapse custodian startup error gap (#115720) fix(gateway): reload edited hook transforms (#107875) refactor: centralize channel streaming config hints (#115739) fix(msteams): finalize sent replies after dispatch (#82354) fix(cron): deliver explicitly configured failure alerts (#115762) fix(hooks): resolve inbound claim conversation once (#115491) refactor: retire legacy provider and secret paths (#115655) fix(memory): reject malformed QMD result entries (#115705) fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261) fix(ui): localize remaining control surfaces (#115730) fix(gateway): prevent model owner mismatch after plugin activation (#115747) fix(agents): run reply hooks for restart recovery (#115711) fix(cron): initialize detached hook run sessions (#115765) fix(ios): keep stop available for staged voice notes (#115744) fix(doctor): preserve config includes during cleanup (#115723) fix(memory): keep dreaming consolidation within project scope (#115721) fix(discord): keep tool rows under verbose progress (#111947) # Conflicts: # ui/src/pages/custodian/custodian-surface.ts # ui/src/styles/custodian.css
Co-authored-by: Peter Steinberger <[email protected]>
Summary
With
channels.discord.streaming.mode: progressand session verbose on (agents.defaults.verboseDefault: on), tool progress rendered nowhere on Discord. Users saw thinking messages and the final reply, but zero tool rows in the progress draft — andprogress.toolProgress: truechanged nothing.Root cause — mutual deferral between two lanes
The durable verbose lane (added in
a397fcabd9e) exposesonVerboseProgressVisibility, a live getter so a draft-rendering channel can yield its ephemeral lines while the durable standalone lane delivers the same content — avoiding double render. Crucially, that durable lane carries only commentary (preamble items) and tool-result summaries — it never emits tool-start rows (shouldSendToolStartStatusesis hard-false), andonCommandOutput/onPatchSummaryhave no standalone core delivery at all (their only standalone path,maybeSendWorkingStatus, is gated off).The Discord progress runtime (
extensions/discord/src/monitor/message-handler.process-progress.ts) wired that commentary-visibility getter into the tool lane as well:onToolStartonItemEventonCommandOutputonPatchSummarySo when verbose was on, the getter returned true and the draft early-returned on every tool line — deferring to a durable lane that never renders those rows. Meanwhile the standalone verbose messages that do exist (tool-result summaries, commentary) are a different content stream. Net: tool activity appeared in neither lane.
resolveChannelStreamingSuppressDefaultToolProgressMessagesreturningtruein progress mode (src/channels/streaming.ts) is correct and unchanged — that flag only governs quiet channel-owned callback forwarding, not the standalone lane, and is not the defect.Fix
Scope the yield to the lines that genuinely have a durable-lane counterpart — commentary/preamble (and narration) — and let tool lines always stay in the draft. Implemented as option (a) from the issue: the visibility getter is renamed
shouldYieldDraftCommentaryand removed from the four tool-lane callbacks.Guarantees:
streaming.mode: off→ standalone verbose tool-result messages still fire (untouched; the draft is inactive there anyway).Change Type
Bug fix (channel: Discord).
Regression Test Plan
extensions/discord/src/monitor/message-handler.process.draft-progress.test.ts:Validation
Run from the topic worktree with the pinned
[email protected]:vitest message-handler.process.draft-progress.test.ts— 19 passedvitest test/scripts/check-changelog-attributions.test.ts— 10 passedpnpm tsgo:extensions— clean;pnpm tsgo:extensions:test— cleanpnpm oxlint <touched files>— clean;git diff --check— cleanThe maintainer improvement also touches the shared durable-commentary buffer; current focused and hosted core proof is recorded in Evidence below.
Linked Issue
Tracked internally as Beads
openclaw-7cd.🤖 Generated with Claude Code
What Problem This Solves
With Discord progress streaming and verbose delivery enabled, the channel yielded tool lifecycle rows to a durable lane that does not own those rows. Users therefore saw commentary and the final answer but no live tool activity. During maintainer live proof, the same commentary text also arrived under changing producer IDs and was sent twice; the improved patch deduplicates that shared durable lane at its owner boundary.
Evidence
b4f347e41aa97c3016c5c412f865754e0035a296.pnpm check:changedpassed the selected core, core-test, extension, and extension-test lanes on Blacksmith Testbox.commentaryCount=1andfinalCount=1.