Skip to content

Slack: only first file processed when multiple files attached #7536

@emilieneloy

Description

@emilieneloy

Hey,

I noticed that when I upload multiple files in a single Slack message, only the first one gets through to the agent. The others are just silently dropped.

What happens:

  • Upload 3 PDFs in one message
  • Agent only sees the first one
  • No error, no warning

Where it comes from:

Looking at dist/slack/monitor/media.js, the resolveSlackMedia() function loops through files[] but returns immediately after the first successful download:

for (const file of files) {
    // ... download logic ...
    return { path, contentType, placeholder };  // exits here
}

So Slack sends all files correctly, OpenClaw receives them, but only processes the first.

Suggested fix:

Return an array instead of a single object, and update the caller in prepare.js to handle multiple attachments.

Happy to help with a PR if this is something you'd want to fix. Let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions