hermes - 💡(How to fix) Fix [Bug]: Feishu adapter strips all Markdown formatting when message contains a table

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…

Error Message

Operating System

Ubuntu 24.04.4 LTS (Noble Numbat)

Python Version

3.11.15

Hermes Version

v0.13.0 (2026.5.7)

Additional Logs / Traceback (optional)

Root Cause

Root Cause Located in hermes/feishu.py, lines 4007–4017, inside _build_outbound_payload:

Code Example

## Data Summary
   Here are the **key metrics** for this quarter:

   > Data sourced from the warehouse

   | Metric | Value  | Trend  |
   |--------|--------|--------|
   | DAU    | 12.3k  | 📈+5%  |
   | Retention | 34% | 📉-2% |
3. View the received message in the Feishu client.

### Expected Behavior

The table renders in a readable format (table, card, or image).

All other Markdown elements (## heading, **bold**, > quote) are displayed with rich formatting.

### Actual Behavior

The entire message appears as unformatted plain text.

Raw ##, **, > symbols are exposed, and the table is shown as pipe-delimited plain text, making it nearly unreadable.

Root Cause
Located in hermes/feishu.py, lines 40074017, inside _build_outbound_payload:

python
def _build_outbound_payload(self, content: str):
    if _MARKDOWN_TABLE_RE.search(content):    # detects table with |
        return "text", plain text   ← entire message downgraded
    if _MARKDOWN_HINT_RE.search(content):     # contains markdown syntax
        return "post", rich text   ← normal rendering
    return "text", plain text
The logic is “all or nothing” — as soon as a pipe | table is detected, the whole message is sent as plain text, stripping any other formatting that might be present. This contradicts user expectations and differs from other integrations (e.g., OpenClaw).

### Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp), Other

### Messaging Platform (if gateway-related)

_No response_

### Debug Report

---

### Operating System

Ubuntu 24.04.4 LTS (Noble Numbat)

### Python Version

3.11.15

### Hermes Version

v0.13.0 (2026.5.7)

### Additional Logs / Traceback (optional)
RAW_BUFFERClick to expand / collapse

Bug Description

Description

When the Hermes Agent sends a message that includes a Markdown table through the Feishu adapter, the entire message is downgraded to plain text.
All formatting such as **bold**, ## headings, and > blockquotes is lost and displayed as raw Markdown symbols, severely harming readability.

Comparison: the exact same content sent via OpenClaw’s Feishu bot renders perfectly, with tables and all other Markdown formatting intact (see screenshots below). This confirms that the Feishu API is capable of displaying such content — the bug resides in Hermes' Feishu adapter logic.

Steps to Reproduce

  1. Configure the Hermes Feishu gateway.
  2. Have the agent send a Markdown message that contains a mix of headings, bold text, blockquotes, and a table, e.g.:
    ## Data Summary
    Here are the **key metrics** for this quarter:
    
    > Data sourced from the warehouse
    
    | Metric | Value  | Trend  |
    |--------|--------|--------|
    | DAU    | 12.3k  | 📈+5%  |
    | Retention | 34% | 📉-2% |
  3. View the received message in the Feishu client.

Expected Behavior

The table renders in a readable format (table, card, or image).

All other Markdown elements (## heading, bold, > quote) are displayed with rich formatting.

Actual Behavior

The entire message appears as unformatted plain text.

Raw ##, **, > symbols are exposed, and the table is shown as pipe-delimited plain text, making it nearly unreadable.

Root Cause Located in hermes/feishu.py, lines 4007–4017, inside _build_outbound_payload:

python def _build_outbound_payload(self, content: str): if _MARKDOWN_TABLE_RE.search(content): # detects table with | return "text", plain text ← entire message downgraded if _MARKDOWN_HINT_RE.search(content): # contains markdown syntax return "post", rich text ← normal rendering return "text", plain text The logic is “all or nothing” — as soon as a pipe | table is detected, the whole message is sent as plain text, stripping any other formatting that might be present. This contradicts user expectations and differs from other integrations (e.g., OpenClaw).

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp), Other

Messaging Platform (if gateway-related)

No response

Debug Report

Debug report uploaded:
  Report       https://paste.rs/6PngF
  agent.log    https://dpaste.com/5G723H7PF
  gateway.log  https://dpaste.com/FVLTZHXCL

Operating System

Ubuntu 24.04.4 LTS (Noble Numbat)

Python Version

3.11.15

Hermes Version

v0.13.0 (2026.5.7)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

Root Cause Located in hermes/feishu.py, lines 4007–4017, inside _build_outbound_payload:

python def _build_outbound_payload(self, content: str): if _MARKDOWN_TABLE_RE.search(content): # detects table with | return "text", plain text ← entire message downgraded if _MARKDOWN_HINT_RE.search(content): # contains markdown syntax return "post", rich text ← normal rendering return "text", plain text The logic is “all or nothing” — as soon as a pipe | table is detected, the whole message is sent as plain text, stripping any other formatting that might be present. This contradicts user expectations and differs from other integrations (e.g., OpenClaw).

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING