Skip to content

[Bug]: Feishu card delivery fails with error 230099 (parse card json err) in cron announcement #53310

Description

@wmaa0002

Bug type

Regression (worked before, now fails)

Summary

Description

When OpenClaw cron jobs with delivery.mode: announce attempt to deliver results to Feishu channels, the announcement push fails with Feishu API error code 230099:

code: 230099
msg: "Failed to create card content, ext=ErrCode: 200621; ErrMsg: parse card json err, please check whether the card json is correct"

The bot can successfully send plain text messages to the same Feishu groups/DMs via openclaw message send, but the internal announcement mechanism (which sends cards) consistently fails.

Steps to Reproduce

  1. Create a cron job with delivery.mode: announce targeting a Feishu channel
  2. Wait for the cron job to run and produce a result
  3. The job execution completes successfully, but the announcement delivery fails with error 230099

Expected Behavior

Announcement should be delivered successfully as a Feishu card, or gracefully fall back to text.

Actual Behavior

  • Job status shows error (unless bestEffort: true is set)
  • Feishu API returns HTTP 400 with code: 230099, ErrMsg: parse card json err
  • Direct bot messages to the same target work fine (tested via openclaw message send --channel feishu --target chat:oc_xxx --message "test")

Environment

  • OpenClaw version: 2026.3.23-1
  • Feishu plugin: custom extension at ~/.openclaw/extensions/feishu/
  • Connection mode: websocket
  • Render mode: auto (tries card when text contains code blocks or tables)

Analysis So Far

The issue appears to be in how OpenClaw builds and sends the Feishu interactive card during announcement delivery:

  1. sendOutboundText() in channel.runtime-DKuuxkHc.js calls shouldUseCard() which returns true when text contains ``` or |...| patterns
  2. It then calls sendMarkdownCardFeishu()buildMarkdownCard()sendCardFeishu()
  3. The card JSON is correctly structured:
    {
      "schema": "2.0",
      "config": { "wide_screen_mode": true },
      "body": { "elements": [{ "tag": "markdown", "content": "..." }] }
    }
  4. But Feishu rejects it with 230099: parse card json err

Possible causes:

  • Content characters (URLs with underscores, etc.) may be causing issues after normalization
  • The content field may exceed Feishu's character limit for card markdown elements
  • A race condition or encoding issue in the Lark SDK's JSON serialization

Workaround

Setting bestEffort: true on cron jobs prevents delivery failures from marking the job as error, but the announcement still doesn't reach the user.

Related


### Steps to reproduce

1. **Create a Feishu bot** with the `@larksuiteoapi/node-sdk` websocket connection mode

2. **Configure a cron job with announcement delivery** targeting a Feishu channel (group or DM):
   ```bash
   openclaw cron add \
     --name "Test Announcement" \
     --cron "0 10 * * *" \
     --to "chat:<your-chat-id>" \
     --channel feishu \
     --deliver \
     --message "Test message"

Or via Dashboard: Create a cron job with Delivery mode: Announce pointing to a Feishu group/user

  1. Wait for the cron job to run — the agent executes successfully and produces a text response

  2. Observe the failure — the announcement push fails with:

    Feishu API error: Request failed with status code 400
    code: 230099
    msg: "Failed to create card content, ext=ErrCode: 200621; ErrMsg: parse card json err"
    
  3. Verify the job status — the job shows error even though the agent execution itself succeeded

Alternative trigger: Manually send a message to the bot and check logs at ~/.openclaw/delivery-queue/failed/

Minimum Test Case: A cron job with announcement delivery mode reliably triggers the bug when message content exceeds ~500 characters (longer AI-generated summaries fail more consistently).

Expected behavior

Announcement should be delivered successfully as a Feishu card, or gracefully fall back to text.

Actual behavior

  • Job status shows error (unless bestEffort: true is set)
  • Feishu API returns HTTP 400 with code: 230099, ErrMsg: parse card json err
  • Direct bot messages to the same target work fine (tested via openclaw message send --channel feishu --target chat:oc_xxx --message "test")

OpenClaw version

OpenClaw version: 2026.3.23-1

Operating system

macos Tahoe 26.3

Install method

No response

Model

Minimax 2.7

Provider / routing chain

openclaw -> minimax ->feishu

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 workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions