Repository navigation
fix(slack): progress card keeps a recovered tool failure red after the turn succeeds - #137523
Conversation
A tool failure during a Slack progress turn became a red openclaw_attention row that stayed red even when a retry succeeded and the turn completed, because native task rows cannot be removed and the presentation never reconciled them. Successful completion now settles the failure row as "Recovered: …" (complete) in native cards and in the Block Kit session card; failed turns keep the red row. Fixes #137491 Refs #39406 Reported-by: @joncursi
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Prepared unchanged at The lead accepted these local checks before handing off landing:
|
|
Codex review: blocked before merge. Reviewed September 3, 2026, 3:56 PM ET / 19:56 UTC. ClawSweeper reviewWhat this changesThe PR updates Slack progress cards so a tool failure followed by a successful turn is shown as recovered rather than as a terminal error. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this protected, maintainer-authored PR cleanly repairs a current Slack presentation defect. No blocking patch defect was found; explicit maintainer handling remains required. Priority: P2 Review scores
Verification
How this fits togetherSlack’s progress presentation converts tool and turn lifecycle events into native task-card updates or Block Kit sections. It receives structured progress lines and terminal status, then renders the state shown beside the assistant reply. flowchart LR
A[Tool lifecycle events] --> B[Progress compositor]
B --> C[Slack progress presentation]
D[Turn terminal outcome] --> C
C --> E[Native task-card updates]
C --> F[Block Kit progress card]
E --> G[Slack user view]
F --> G
Decision needed
Why: Repository policy keeps maintainer-authored and maintainer-labeled items open for explicit human handling even when the patch is otherwise correct. Before merge
Agent review detailsSecurityNone. PR surfaceSource +5, Tests +66, Docs 0. Total +71 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep terminal status centralized in the shared Slack attention renderer, with red error rows for failed turns and completed recovered rows for successful ones, after explicit maintainer review. Do we have a high-confidence way to reproduce the issue? Yes—source inspection provides a high-confidence reproduction shape: a failed progress line persists through a successful terminal update on current main, and the added tests model that exact order. Is this the best way to solve the issue? Yes—the shared presentation helper is the narrowest owner covering both native and Block Kit cards, while its callers already provide the authoritative final success/error outcome. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 99c589fefe69. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The completed ClawSweeper review has no actionable code findings and no separate
No behavior change or re-review request is needed. The live Slack capture gap remains recorded in the original PR body. |
|
Merged via squash.
|
openclaw#137523) A tool failure during a Slack progress turn became a red openclaw_attention row that stayed red even when a retry succeeded and the turn completed, because native task rows cannot be removed and the presentation never reconciled them. Successful completion now settles the failure row as "Recovered: …" (complete) in native cards and in the Block Kit session card; failed turns keep the red row. Fixes openclaw#137491 Refs openclaw#39406 Reported-by: @joncursi
Closes #137491
Related: #39406
What Problem This Solves
Fixes an issue where Slack users running
streaming.mode: "progress"would see a completed turn whose progress card still carried a redBash — exit 1style attention row when a tool call had failed earlier in the turn but the agent retried successfully and finished the work. The final answer said the task was done while the card next to it still signaled failure, so people interrupted or re-ran work that had already succeeded. Reported by @joncursi in #137491, with an operator screenshot of the same symptom on the Block Kit session card in #39406.Why This Change Was Made
The shared progress compositor intentionally keeps attention lines for the whole turn, and Slack native task rows cannot be removed, only updated. The Slack progress presentation never reconciled that row at completion, so it stayed
errorforever. The terminal-state decision now lives in one place in the Slack progress presentation: while the turn is working a failure is still a red attention row; when the turn completes successfully the row settles asRecovered: <failure>withcompletestatus (native card) or aRecovered: …line (Block Kit card); when the turn fails the red row stays. Pending approvals at completion are retired the same way as before, now through the same helper instead of two caller-side filters. No configuration was added and the compositor, reconciler, and dispatch code are unchanged.User Impact
A Slack progress card whose turn completed successfully no longer looks failed. Operators still see that a transient failure happened (the row reads
Recovered: …), and turns that actually fail keep the red row. Docs for the Slackprogressmode describe the behavior.Evidence
extensions/slack/src/progress-blocks.test.ts: native sequence (failed command → error row → completion settles it asRecovered: … / complete; failed completion keepserror), Block Kit card for working/success/error states, and pending approval retirement at completion. The new assertions fail onmain(3 failures: missing recovered update in both native paths, raw failure title on the success card).extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts: boundary run through the real Slack dispatch path with a nonzero-exitcommand_outputevent followed by a successful final reply; theopenclaw_attentiontask updates sent to Slack are exactly[error, Recovered … complete].pnpm test extensions/slack2,746 passed;pnpm check:changedpassed; Codex autoreview (branch vsorigin/main, P0/P1) scoped-clean.task_updatechunk payloads the Slack plugin sends.