Skip to content

Slack: only first file attachment is processed when multiple files are sent in one message #11892

@jim-ap8

Description

@jim-ap8

Description

When a user sends multiple file attachments in a single Slack message, only the first file is processed and made available to the agent. All subsequent files are silently dropped.

Root Cause

In resolveSlackMedia() (loader), the function iterates through files but returns immediately after the first successful download:

async function resolveSlackMedia(params) {
    const files = params.files ?? [];
    for (const file of files) {
        // ... fetch and save ...
        return {           // ← returns after first file
            path: saved.path,
            contentType: saved.contentType,
            placeholder: label ? `[Slack file: ${label}]` : '[Slack file]'
        };
    }
    return null;
}

Expected Behavior

All files in the message should be resolved and passed to the agent as separate attachments/content parts (images as image blocks, documents as text/file references, etc.).

Current Workaround

Send one file per message.

Environment

  • OpenClaw version: 2026.2.6-3 (also reproduced on 2026.2.3-1)
  • Channel: Slack (socket mode)
  • OS: macOS (Darwin arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions