fix: reject message tables without a caption instead of silently dropping them (#196367)
Root cause: `src/interactive/payload.ts:738` (`normalizeTableBlock`) drops a table without a caption by design (the presentation docs make table normalization atomic and the caption required, and Slack's `data_table` requires `caption`), but nothing in the message action path checked the caption before that drop, so the rest of the message was sent and the tool reported `deliveryStatus: "sent"` without the table.
Fixes #196312
## What Problem This Solves
When an agent sends a Slack message through the `message` tool with a table block that has no `caption`, the table vanishes. The text around it is posted, and the tool tells the agent the message was sent, so the agent reports success while the data it meant to share is missing.
## User Impact
A table without a caption is now rejected before anything is posted, with the same "`<field> required`" tool error the message tool already uses for missing inputs (`presentation.blocks[].caption required`). The agent sees the error and can retry with a caption instead of reporting a send that lost its table. Tables with a caption are unchanged.
## Why This Change Was Made
The caption is part of the documented table contract, and Slack's native data table block requires it ([Slack data table block](https://docs.slack.dev/reference/block-kit/blocks/data-table-block): `caption` is Required), so rendering a captionless table would mean inventing a heading, which the docs rule out ("drops the table block instead of truncating or repairing its data"). The check now lives with the other message-action parameter parsing, right after the `presentation` JSON is parsed, so every message action rejects the table before any part is sent. It reuses the existing required-parameter error instead of adding new wording.
This adopts @indra622's PR: their commit added the check inside the send payload builder with a new error message. On top of it, the check moved to the parameter owner, uses the existing error, and the regression is folded into one test; the test-lines allocation file is dropped.
## Evidence
- Real Gateway from source (`ocx src`) with the bundled Slack plugin in Socket Mode against a local Slack Web API and Socket Mode fixture; a deterministic model calls the `message` tool with "Contract summary", a text block and a two-row table, first without a caption, then with one.
- main `0b18f610d325`, no caption: Slack receives `chat.postMessage` with only two `section` blocks and no table, and the tool returns `deliveryStatus="sent"`, `payloadOutcomes[0].status="sent"`.
- this PR `a8aa768ead2b`, no caption: no Slack call; the tool returns `error="presentation.blocks[].caption required"`.
- control, with caption, both refs: Slack receives `section`, `section`, `data_table` (caption "Expiring contracts", 3 rows), `deliveryStatus="sent"`.
- Observed proof lines: https://github.com/openclaw/openclaw/pull/196367#issuecomment-6996541780
- `src/infra/outbound/message-action-send.validation.test.ts`: the new case fails on main (the send resolves instead of rejecting) and passes here (18/18). Neighbouring send, params and runner suites pass (102 tests).
Thanks @judeKim for the clear report with both receipts, and @indra622 for the original fix.
Merge danger: two-way door. Only adds input validation; a revert restores the old silent drop. Blast radius: message tool and `openclaw message` calls that include a table block without a caption now get an error instead of a partial send; tables with captions and all other blocks are unchanged.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Current
·
C2
·2026-11
fix: reject message tables without a caption instead of silently drop…
Find Your Interest
- Step-up authentication: how to right-size authentication to risk
- Authentication and Authorization: A Comprehensive Guide
- What's new in WCAG 2.2
- fix: keep the Slack question when someone who may not answer presses …
- Secure OAuth patterns for Snowflake Cortex AI through Amazon Bedrock AgentCore
- Build WhatsApp AI agents with Amazon Bedrock AgentCore
- Is WebMCP Only for Agents?
- AWS Weekly Roundup: AWS Nitro Sandboxes, AWS Emulator, and more (November 16, 2026)
- How to Get Promoted: The 6 Steps to Take Control of Your Career
- 2027 elections: IGP Disu's assurance of level playing field not inspiring - Atiku's aide
Current
·
C2
·2026-11





