Skip to content

fix(slack): hide command failures in quiet progress - #145285

Closed
roboclaw-bot wants to merge 1 commit into
mainfrom
fix/slack-quiet-command-failure-progress
Closed

roboclaw-bot wants to merge 1 commit into
mainfrom
fix/slack-quiet-command-failure-progress

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #140037, #92085

What Problem This Solves

Fixes an issue where users in shared Slack conversations would see a persistent list of recovered command failures after a successful answer when quiet progress was enabled. Turning off the ordinary tool log did not remove these rows from native task cards or the Block Kit fallback.

Why This Change Was Made

Filter known intermediate command-failure events at Slack's existing compositor event-projection boundary, before any card publishes them. Both command-output and command-bearing item events use this policy; native cards, Block Kit cards, and compact drafts consume the same filtered state. No new configuration, execution changes, transcript changes, or global error-suppression switch are introduced.

User Impact

  • Quiet progress (the default, explicit progress.toolProgress: false, or its preview alias) retains authored progress, plans where supported, and approvals without a recovered-command log.
  • Explicit toolProgress: true remains unchanged. Existing compact/card selection is unchanged; use style: "card" to keep plan cards with explicit toolProgress: false.
  • Blocked/action-required and unknown outcomes, malformed exit statuses, and unrelated tool errors are not newly suppressed. Final error replies and the unconditional no-visible-reply warning remain intact.
  • This intentionally changes the older quiet-mode behavior that retained intermediate command failures. Other channels, including Telegram, are unchanged; this PR does not close the Telegram report in [Bug]: Telegram progress mode exposes failed tool rows when toolProgress is false #140037.

Evidence

Transport-boundary proof, not a live Slack screenshot. The real Slack dispatch, compositor, native task projection/reconciler and Block Kit renderer were exercised with provider transport doubles. Identical fixtures used six distinct failed commands (four exit 1, two exit 8), authored narration, two plan steps, an approval lifecycle, and then a successful/error/no-reply outcome. No retry was needed to produce the old recovered rows.

Baseline: 7932371ea5a864326078706b98975458a2310abb.

Observed output Before After
Quiet native card, successful final 6 permanent Recovered: Bash — exit N tasks 0 command-failure tasks ever published
Quiet Block Kit card, successful final 6 recovered lines in final card 0 recovered command lines
Native/Block Kit plans and approvals Present Present
Failed final / failed run without a reply payload Error card state Error card state preserved
Detailed toolProgress: true Command outcomes retained Unchanged
Compact quiet draft Transient failed-command rows Omitted; existing cleanup and no-checklist behavior unchanged

Representative emitted native task update, repeated under six distinct call IDs before:

{"type":"task_update","id":"openclaw-attention-fail_0_39de6b49","title":"Recovered: Bash — exit 1","status":"complete"}

After: no command task update is emitted for those six IDs. Plan and approval updates remain, followed by the delivered final answer. Suppression happens before publication because already-published native task rows cannot be removed.

Validation:

  • 404 tests passed across Slack dispatch/projection/renderers/account configuration, core no-reply warning generation, shared quiet composition, and Telegram renderer smoke coverage.
  • 30 additional disposable before/after dispatch proof scenarios cover defaults, the preview alias, compact/card/native/fallback modes, and terminal outcomes. Regression fixtures fail against the exact baseline for the unwanted rows and pass with the candidate.
  • Extension production and test typechecks passed with physically checkout-local dependencies. Changed-source format/lint, architecture/ratchet/dependency/dead-export guards, changed-page MDX checks and git diff --check passed across the recorded validation runs.
  • Mandatory independent autoreview completed scoped-clean at the repository's default P0 threshold. No production behavior changed in subsequent mechanical test-lint corrections.

No live Slack sends or authenticated Slack UI capture were performed. A browser-generated illustration was not substituted for live UI proof. Full synthetic payload captures are retained with the task evidence; the table and excerpt above are taken from those captures. The separate existing inference that eviction can label a quiet row “Recovered” is not changed here.

Worked on by: @Solvely-Colin

Filter known intermediate command outcomes before Slack publishes progress rows. Keep approvals, blocked and unknown states, authored plans, detailed tool logs, final errors and the no-reply warning unchanged. Document the quiet-mode compatibility change.

Worked on by: @Solvely-Colin

Co-authored-by: Solvely-Colin <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 11, 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: slack Channel integration: slack size: M maintainer Maintainer-authored PR labels Sep 11, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 11, 2026 21:08
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 5:16 PM ET / 21:16 UTC.

ClawSweeper review

What this changes

Slack quiet progress filters command-failure events before publishing cards or compact drafts, with corresponding documentation and regression coverage.

Merge readiness

⛔ Blocked before merge - 3 items remain

This is a focused, useful Slack presentation change that current main does not implement. No introduced correctness defect was found, but suppressing previously visible failures changes a shipped quiet-mode contract and warrants an explicit maintainer choice.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with meaningful boundary coverage and no identified correctness defect; the compatibility tradeoff is explicit.
Proof confidence 🌊 off-meta tidepool Not applicable: The bot-authored PR is exempt from the external-contributor proof gate. Its supplied before/after evidence exercises Slack dispatch, compositor, and renderers with transport doubles; it does not establish live Slack UI behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The bot-authored PR is exempt from the external-contributor proof gate. Its supplied before/after evidence exercises Slack dispatch, compositor, and renderers with transport doubles; it does not establish live Slack UI behavior.
Evidence reviewed 8 items Pinned introduction and current-main comparison: The independently inspected production diff matches the pinned introduced changes: one Slack projection helper and its compositor callback. Current main lacks this filtering; unrelated base-branch changes were excluded.
Existing extension point and implementation boundary: The shared event adapter already accepts a channel-specific line builder before compositor admission. Slack consumes this existing SDK contract without expanding it; the changed behavior does not depend on the Codex runtime or protocol.
Shipped visibility contract: The v2026.9.4 Slack documentation explicitly preserves failed-command rows in quiet cards and compact progress. The candidate documents the changed behavior and points operators to toolProgress=true to retain command outcomes.
Findings None None.
Security None None.

How this fits together

Slack progress translates agent activity into native task cards, Block Kit cards, or temporary text drafts. The changed projection filters display events before those surfaces share compositor state; final replies use separate delivery paths.

flowchart TD
  A[Agent activity] --> B[Slack visibility policy]
  C[Streaming preferences] --> B
  B --> D[Shared progress compositor]
  D --> E[Native task card]
  D --> F[Block Kit or compact draft]
  G[Final reply and run outcome] --> H[Final delivery and card completion]
Loading

Decision needed

Question Recommendation
Should existing Slack quiet-progress configurations stop displaying intermediate command failures on upgrade? Accept the narrower quiet default: Adopt the documented Slack-only suppression while retaining toolProgress=true for command diagnostics.

Why: The patch deliberately changes behavior documented in v2026.9.4; source inspection can verify the implementation but cannot choose the preferred diagnostic visibility contract.

Before merge

  • Resolve merge risk (P1) - Existing quiet-progress installations will stop showing intermediate command failures after upgrading; operators who relied on those diagnostics must enable toolProgress=true.
  • Complete next step (P2) - Confirm acceptance of the documented quiet-mode visibility change for existing Slack installations.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +53, Tests +34, Docs +7. Total +94 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 53 0 +53
Tests 2 162 128 +34
Docs 3 15 8 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 230 136 +94

Review metrics

Metric Value Why it matters
Configuration contract 0 new settings; 1 existing visibility contract changed Existing quiet configurations change output without a config migration.
Production versus test growth Production +53 lines; tests net +34 lines Production growth implements one Slack projection policy; test changes replace a formatter double with the real builder.

Merge-risk options

Maintainer options:

  1. Accept the documented visibility change (recommended)
    Approve the upgrade behavior with the existing detailed-tool-log escape hatch and preserved terminal errors.
  2. Pause pending a compatibility policy
    Retain the released failure-row behavior if quiet-mode diagnostics must remain unchanged for existing users.

Technical review

Best possible solution:

Use the existing Slack projection boundary for an approved quiet-mode policy, retaining detailed opt-in, approvals, and terminal error delivery.

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

Yes, at source level: quiet composition retains nonzero command exits, and Slack turns them into persistent recovered tasks after successful completion. No live Slack reproduction was run in this review.

Is this the best way to solve the issue?

Yes architecturally: filtering structured events at the existing Slack projection hook covers all three renderers without changing other channels or adding an SDK API; acceptance of the changed default remains a product choice.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 24109cc97c2e.

Labels

Label changes:

  • add P2: This addresses confusing Slack progress output without blocking message delivery or agent execution.
  • add merge-risk: 🚨 compatibility: Upgrading changes the diagnostic output of existing quiet-mode configurations documented in v2026.9.4.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored PR is exempt from the external-contributor proof gate. Its supplied before/after evidence exercises Slack dispatch, compositor, and renderers with transport doubles; it does not establish live Slack UI behavior.

Label justifications:

  • P2: This addresses confusing Slack progress output without blocking message delivery or agent execution.
  • merge-risk: 🚨 compatibility: Upgrading changes the diagnostic output of existing quiet-mode configurations documented in v2026.9.4.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored PR is exempt from the external-contributor proof gate. Its supplied before/after evidence exercises Slack dispatch, compositor, and renderers with transport doubles; it does not establish live Slack UI behavior.

Evidence

What I checked:

  • Pinned introduction and current-main comparison: The independently inspected production diff matches the pinned introduced changes: one Slack projection helper and its compositor callback. Current main lacks this filtering; unrelated base-branch changes were excluded. (extensions/slack/src/monitor/message-handler/dispatch-progress.ts:344, 9a75c5728ff0)
  • Existing extension point and implementation boundary: The shared event adapter already accepts a channel-specific line builder before compositor admission. Slack consumes this existing SDK contract without expanding it; the changed behavior does not depend on the Codex runtime or protocol. (src/channels/progress-draft-events.ts:34, 9a75c5728ff0)
  • Shipped visibility contract: The v2026.9.4 Slack documentation explicitly preserves failed-command rows in quiet cards and compact progress. The candidate documents the changed behavior and points operators to toolProgress=true to retain command outcomes. Public docs: docs/channels/slack/messaging.md. (docs/channels/slack/messaging.md:89, 3a9d69db306c)
  • Preserved boundaries and regression coverage: The filter excludes approvals, unrelated tools, blocked states, and unrecognized or malformed outcomes. Dispatch coverage exercises native and Block Kit presentation across successful, failed, and no-reply outcomes; compact coverage preserves authored text and cleanup. The removed formatter double is replaced by the real builder. (extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts:2881, 9a75c5728ff0)
  • Captured validation evidence: The supplied complete PR body, captured under sourceRevision c90609c6186b9a2adb42c234e1d5ea6afb8caf5b7c10eeb881d7981e3903cc38, reports six recovered-command tasks before versus none after through real dispatch/compositor/renderers with transport doubles, plus 404 passing tests and 30 disposable scenarios. It explicitly disclaims live Slack sends or UI capture. These are contributor-reported results, not reviewer executions. (9a75c5728ff0)
  • Related discussion supports the projection boundary: Human comments on Add Slack-safe progress visibility mode #92085 recommend enforcing Slack visibility before native and portable renderers diverge, which this patch follows. That issue additionally requests broader disclosure controls; [Bug]: Telegram progress mode exposes failed tool rows when toolProgress is false #140037 concerns Telegram and remains outside this patch.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@joncursi

joncursi commented Sep 11, 2026 •

Copy link
Copy Markdown

Worth noting that the same tool error messages appear during discord progress streaming and likely other channels too. (The difference is discord replaces the progress message with the final response when it's ready, so at least the bash exits don't stay permanently visible like they do in Slack because Slack appends the final response.)

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #145345, merged in 3bfac2f, with follow-up cleanup in #145420. The shared compositor now suppresses intermediate tool execution rows in quiet progress across channels, including Slack, Discord, and Telegram, while preserving approvals and terminal error delivery. That covers the recovered-command noise addressed by this Slack-only patch without adding a second channel-specific filter. Existing before/after evidence remains available in this PR. Retired at Colin’s request; no merge or branch deletion.

@RomneyDa
RomneyDa deleted the fix/slack-quiet-command-failure-progress branch October 22, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants