Skip to content

[Bug]: Binary files (.doc) should not be auto-embedded as text content #54176

@rilweic

Description

@rilweic

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When receiving .doc files (MIME: application/x-cfb), OpenClaw core
auto-reads the binary content and embeds it into the prompt as text,
causing 70KB of garbage data and "high risk" rejections.
Expected: .doc files should be treated as binary attachments, not text.
Suggested: Use pandoc/catdoc to convert to text before embedding,
or skip content embedding for known binary formats.

Steps to reproduce

  1. Send a .doc file (Microsoft Word 97-2003 format) to OpenClaw via Feishu channel
  2. The file MIME type is application/x-cfb (binary OLE format)
  3. OpenClaw core auto-reads the binary content and embeds it into the prompt
  4. Result: 70KB of binary garbage data is inserted into the conversation history
  5. Subsequent messages fail with "high risk" error from the LLM provider

Expected behavior

  1. When receiving a .doc file, OpenClaw should either:

    • Skip embedding binary content (treat as attachment only)
    • OR convert to text first using tools like pandoc/catdoc
  2. The conversation history should only contain clean text content,
    not raw binary data from .doc files

  3. Subsequent messages should continue to work normally without
    "high risk" errors

Actual behavior

OpenClaw treats .doc binary files as text and embeds raw binary
content into prompts, causing LLM "high risk" rejections and
corrupted conversation sessions.

OpenClaw version

OpenClaw 2026.3.23-2

Operating system

Linux mint

Install method

No response

Model

kimi code 2.5

Provider / routing chain

feishu -> openclaw -> kimi-coding

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    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