Repository navigation
Keep Slack progress and final replies in one message - #119376
Conversation
There was a problem hiding this comment.
💡 Codex Review
openclaw/extensions/slack/src/monitor/message-handler/dispatch.ts
Lines 256 to 258 in 6b5dfd4
When status-final progress falls through to this preview-edit path, any final answer over Slack's edit limit is now sent through finalizeSlackPreviewEdit/editSlackMessage; that helper truncates edit text at SLACK_EDIT_TEXT_MAX_BYTES in extensions/slack/src/actions.ts:382, while the old fresh-send path used deliverReplies chunking in extensions/slack/src/monitor/replies.ts:503. So a long Slack progress reply can be marked delivered after silently replacing the draft with only the first ~4KB instead of sending the complete chunked answer; skip in-place finalization or fall back to normal delivery when the edit payload exceeds the update limit.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6b5dfd4 to
6898d59
Compare
6898d59 to
0d47ff4
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:08 PM ET / August 5, 2026, 03:08 UTC. ClawSweeper reviewWhat this changesThis PR makes non-native Slack progress drafts become the final reply in place, removing the separate final reply and timing or tool receipt while preserving native streaming. Merge readinessKeep open for human release-branch review: current main still posts a fresh Slack final and then a receipt, while this PR routes the non-native draft through the existing finalization path; no concrete patch defect was found. Priority: P1 Review scores
Verification
How this fits togetherSlack progress mode creates a temporary draft while an agent works, then completes delivery in the selected thread. The dispatcher decides whether to edit that draft into the final answer or use the normal fallback sender. flowchart LR
A[Agent response] --> B[Slack dispatcher]
B --> C{Native progress stream?}
C -->|Yes| D[Progress cards and final reply]
C -->|No| E[Draft preview]
E --> F[Finalization decision]
F --> G[Edit draft or send fallback]
Decision needed
Why: The patch is technically sound and has exact-head live proof, but whether to change visible Slack notification semantics on a release branch is a maintainer release-scope choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource -7, Tests +125. Total +118 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep native streaming and all unsafe or oversized cases on their existing fallback paths, while using the shared preview finalizer for safe non-native status-final drafts. Do we have a high-confidence way to reproduce the issue? Yes: current main's non-native progress/status-final branch source-proves the fresh-final-plus-receipt behavior, and the PR body supplies an exact-head live Slack transcript showing the changed path. Is this the best way to solve the issue? Yes: removing the special branch lets the existing preview finalizer retain its safe edit gates, fallback delivery, and delivery bookkeeping rather than creating a second finalization mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 22de30f99821. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
This reverts commit c12c2ba.
371584b to
203d54b
Compare
…sh/personal-claw-slack-presence # Conflicts: # extensions/slack/src/monitor/message-handler/dispatch-progress.ts # extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Slack currently posts a working draft, sends the answer as a separate message, and leaves behind a timing or tool-count receipt. That creates unnecessary notifications and makes a capable assistant feel noisy.
Keep only the latest complete model preamble in a single italicized draft, then edit that same message into the final answer. Existing native and explicitly verbose streaming paths remain intact. Focused coverage includes successive preambles, complete long commentary, stable message identity, safe escaping, oversized replies, and the final in-place handoff.
A live Slack conversation on this exact commit produced one italic progress reply, then replaced that same message with the complete final answer after a real tool call. No second reply, receipt, or timing message remained:
This change targets the July 31 release branch and is intentionally limited to Slack message delivery.