openclaw - 💡(How to fix) Fix Cron announce delivery fails when agent response contains only MEDIA: directives [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62538Fetched 2026-04-08 03:02:50
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

When a cron job with delivery.mode: "announce" triggers an isolated agent session, and the agent's response contains only MEDIA: directives (no plain text), the delivery fails with:

Error: Slack send requires text, blocks, or media

Error Message

Error: Slack send requires text, blocks, or media

Root Cause

When a cron job with delivery.mode: "announce" triggers an isolated agent session, and the agent's response contains only MEDIA: directives (no plain text), the delivery fails with:

Error: Slack send requires text, blocks, or media

Fix Action

Workaround

Include a short text line before the MEDIA: directives in the agent prompt:

Morning Executive Summary — April 7, 2026
MEDIA: /sandbox/.openclaw/workspace/out/summary.pdf

This ensures the delivery handler always has text content even if MEDIA processing fails.

Code Example

Error: Slack send requires text, blocks, or media

---

Morning Executive SummaryApril 7, 2026
MEDIA: /sandbox/.openclaw/workspace/out/summary.pdf
RAW_BUFFERClick to expand / collapse

Summary

When a cron job with delivery.mode: "announce" triggers an isolated agent session, and the agent's response contains only MEDIA: directives (no plain text), the delivery fails with:

Error: Slack send requires text, blocks, or media

Steps to reproduce

  1. Configure a cron job with delivery.mode: "announce" targeting a Slack channel
  2. Instruct the agent to return only MEDIA: lines (e.g., "Return only exactly two MEDIA lines and nothing else")
  3. Wait for the cron job to fire

Expected behavior

The MEDIA: directives should be processed into file uploads by the delivery handler, and the files should be posted to the target channel — the same way MEDIA: works in interactive chat replies.

Actual behavior

The delivery handler appears to strip MEDIA: directives from the text but does not populate the media field on the outgoing Slack message, leaving no content to post. The job errors with "Slack send requires text, blocks, or media".

Workaround

Include a short text line before the MEDIA: directives in the agent prompt:

Morning Executive Summary — April 7, 2026
MEDIA: /sandbox/.openclaw/workspace/out/summary.pdf

This ensures the delivery handler always has text content even if MEDIA processing fails.

Environment

  • OpenClaw 2026.4.5
  • Slack channel plugin, Socket Mode
  • Cron delivery mode: announce
  • Gateway running inside OpenShell sandbox

Additional context

The same cron job prompt pattern works intermittently — it succeeded on previous days but failed after a gateway restart, suggesting the MEDIA file upload may also be timing-sensitive relative to the Slack connection state post-restart.

🤖 Generated with Claude Code

extent analysis

TL;DR

Modify the agent's response to include a short text line before the MEDIA: directives to ensure the delivery handler has text content.

Guidance

  • Verify that the agent's response contains only MEDIA: directives without any plain text, which is likely causing the delivery handler to strip the MEDIA: directives and not populate the media field.
  • Include a short text line before the MEDIA: directives in the agent prompt, as described in the provided workaround, to ensure the delivery handler always has text content.
  • Investigate the timing sensitivity of the MEDIA file upload relative to the Slack connection state post-restart, as the same cron job prompt pattern works intermittently.
  • Review the OpenClaw and Slack channel plugin documentation to see if there are any known issues or configuration options that can help resolve the problem.

Example

Morning Executive Summary — April 7, 2026
MEDIA: /sandbox/.openclaw/workspace/out/summary.pdf

Notes

The provided workaround suggests that including a short text line before the MEDIA: directives can resolve the issue, but it may not be a permanent fix. Further investigation is needed to determine the root cause of the problem and to find a more robust solution.

Recommendation

Apply the workaround by including a short text line before the MEDIA: directives in the agent prompt, as it provides a temporary solution to ensure the delivery handler has text content and can process the MEDIA: directives correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The MEDIA: directives should be processed into file uploads by the delivery handler, and the files should be posted to the target channel — the same way MEDIA: works in interactive chat replies.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING