openclaw - 💡(How to fix) Fix [Bug]: Slack MEDIA attachments are emitted as plain text instead of uploaded files [1 comments, 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#74624Fetched 2026-04-30 06:22:05
View on GitHub
Comments
1
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
commented ×1

Valid MEDIA:/absolute/path/... directives in Slack replies are no longer being converted into uploaded Slack attachments. Instead, the MEDIA: line is effectively treated as normal message content, and no attachment appears in Slack.

This reproduces across agents and from canonical workspace paths, which points to the shared Slack attachment conversion layer rather than agent-specific path handling.

Root Cause

Valid MEDIA:/absolute/path/... directives in Slack replies are no longer being converted into uploaded Slack attachments. Instead, the MEDIA: line is effectively treated as normal message content, and no attachment appears in Slack.

This reproduces across agents and from canonical workspace paths, which points to the shared Slack attachment conversion layer rather than agent-specific path handling.

Code Example

MEDIA:/home/<user>/.openclaw/workspace/tmp/slack-upload-test.md
RAW_BUFFERClick to expand / collapse

Summary

Valid MEDIA:/absolute/path/... directives in Slack replies are no longer being converted into uploaded Slack attachments. Instead, the MEDIA: line is effectively treated as normal message content, and no attachment appears in Slack.

This reproduces across agents and from canonical workspace paths, which points to the shared Slack attachment conversion layer rather than agent-specific path handling.

Environment

  • OpenClaw on Linux
  • Slack channel thread replies
  • Reproduced with multiple agents:
    • chat agent
    • main agent control test
  • Reproduced with canonical workspace paths:
    • ~/.openclaw/workspace/tmp/...
    • ~/.openclaw/workspace-main/tmp/...
  • Reproduced with multiple file types:
    • PNG/image
    • .md file

Repro steps

  1. Create a local file in an allowed/canonical workspace path, for example:
    • ~/.openclaw/workspace/tmp/slack-upload-test.md
    • ~/.openclaw/workspace-main/tmp/slack-upload-test.md
  2. Send a Slack reply containing a valid standalone media directive, for example:
MEDIA:/home/<user>/.openclaw/workspace/tmp/slack-upload-test.md
  1. Repeat with:
    • image files
    • markdown files
    • a control test where another agent creates the file/path and emits the MEDIA: line
  2. Observe Slack result.

Expected behavior

OpenClaw should intercept the MEDIA: directive, upload the referenced file to Slack, and deliver it as an attachment/file in the thread.

Actual behavior

  • No attachment appears in Slack
  • In some cases the raw MEDIA:/absolute/path/... line survives into output rather than being converted into an upload
  • No visible Slack upload occurs

What was ruled out

  • bad MEDIA: syntax
  • bad absolute path formatting
  • agent-specific workspace/path handling
  • chat-agent-only behavior
  • simple local path-not-allowed rejection
  • file-type-specific failure, since both image and .md tests failed

Why this points to the shared Slack conversion layer

  • Reproduces across agents, including a main-agent control test
  • Reproduces from canonical workspace paths
  • Plain Slack replies still work
  • The attachment conversion step appears to be skipped, so the problem looks upstream of Slack upload itself, in the logic that extracts/consumes MEDIA: directives for Slack delivery

Important distinction from a separate socket issue

There was also a separate Slack socket/reconnect problem on a newer build. After downgrading, socket instability was no longer the main symptom, but attachment delivery still failed.

So this attachment bug appears distinct from the socket bug.

Notes

I intentionally removed workspace-specific identifiers, channel IDs, and local usernames beyond generic path shapes. If useful, I can provide follow-up logs privately, but the key reproducible behavior is that valid MEDIA: directives survive as text or produce no attachment at all, even from canonical paths and across agents.

extent analysis

TL;DR

The issue can be resolved by investigating and fixing the shared Slack attachment conversion layer, which appears to be skipping the extraction and consumption of MEDIA: directives.

Guidance

  • Verify that the MEDIA: directive syntax and absolute path formatting are correct, despite being ruled out, to ensure no edge cases are missed.
  • Investigate the shared Slack conversion layer's logic for extracting and consuming MEDIA: directives to identify the root cause of the issue.
  • Test the attachment conversion with different file types and agents to confirm the issue is not specific to certain scenarios.
  • Review the code changes or updates made to the shared Slack conversion layer to see if any recent modifications could be causing the issue.

Example

No code snippet is provided as the issue does not specify any specific code changes or modifications.

Notes

The issue appears to be distinct from a separate socket bug, and the problem seems to be upstream of the Slack upload process. The fact that the issue reproduces across agents and from canonical workspace paths suggests a problem with the shared conversion layer.

Recommendation

Apply a workaround by manually uploading files to Slack or investigating alternative attachment conversion methods until the shared Slack attachment conversion layer can be fixed. This is because the issue seems to be with the conversion layer itself, and a workaround can provide a temporary solution until the root cause is identified and resolved.

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

OpenClaw should intercept the MEDIA: directive, upload the referenced file to Slack, and deliver it as an attachment/file in the thread.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Slack MEDIA attachments are emitted as plain text instead of uploaded files [1 comments, 1 participants]