Bug Description
When a Feishu user sends a message with empty text content (e.g., {\"text\": \"\"} or a media-only message), the Feishu channel writes a blank user message to the session file:
{ \"role\": \"user\", \"content\": \"\" }
When this session is used in a subsequent LLM request to MiniMax (the default provider), MiniMax rejects the request with:
invalid params, messages must not be empty (2013)
This causes an automatic failover to deepseek-chat, but the MiniMax error still appears in logs for every affected session startup.
Steps to Reproduce
- Have a Feishu channel configured with MiniMax as the default model
- Send an empty text message or media-only message through Feishu
- Observe the error in gateway.err.log
Expected Behavior
Empty-content messages from Feishu should either:
- Be skipped entirely (not written to session)
- Or be replaced with a placeholder like "[Empty message]"
Root Cause
File: dist/extensions/feishu/monitor.account-PVyhNwIK.js, line 92:
function parseMessageContent(content, messageType) {
if (messageType === \"text\") return parsed.text || \"\"; // ← returns \"\" for empty text
// ...
}
The empty string flows through handleFeishuMessage → buildFeishuAgentBody → session write → LLM request, with no guard at any layer.
Suggested Fix
In handleFeishuMessage, after parseFeishuMessageEvent() and before writing to session, add a guard:
// Skip empty messages (no text content, no media)
if (!ctx.content.trim() && mediaList.length === 0) {
log(\`feishu: skipping empty message from \${ctx.senderOpenId}\`);
return;
}
Alternatively, add a guard in parseMessageContent to return a placeholder for empty content.
Environment
- OpenClaw version: 2026.4.2
- Feishu channel: enabled
- Default model: minimax-portal/MiniMax-M2.7-highspeed
- Frequency: ~40 occurrences over 3 days (4/28–4/30)
Logs
```
2026-04-30T05:27:39.784+08:00 [agent/embedded] embedded run agent end: runId=cc2e2c33-... isError=true model=MiniMax-M2.7-highspeed provider=minimax-portal error=LLM request rejected: invalid params, messages must not be empty (2013)
2026-04-30T02:26:46.318+08:00 [agent/embedded] session file repaired: rewrote 1 assistant message(s), dropped 1 blank user message(s) (819db0af-...)
```
Bug Description
When a Feishu user sends a message with empty text content (e.g.,
{\"text\": \"\"}or a media-only message), the Feishu channel writes a blank user message to the session file:{ \"role\": \"user\", \"content\": \"\" }When this session is used in a subsequent LLM request to MiniMax (the default provider), MiniMax rejects the request with:
This causes an automatic failover to deepseek-chat, but the MiniMax error still appears in logs for every affected session startup.
Steps to Reproduce
Expected Behavior
Empty-content messages from Feishu should either:
Root Cause
File:
dist/extensions/feishu/monitor.account-PVyhNwIK.js, line 92:The empty string flows through
handleFeishuMessage→buildFeishuAgentBody→ session write → LLM request, with no guard at any layer.Suggested Fix
In
handleFeishuMessage, afterparseFeishuMessageEvent()and before writing to session, add a guard:Alternatively, add a guard in
parseMessageContentto return a placeholder for empty content.Environment
Logs
```
2026-04-30T05:27:39.784+08:00 [agent/embedded] embedded run agent end: runId=cc2e2c33-... isError=true model=MiniMax-M2.7-highspeed provider=minimax-portal error=LLM request rejected: invalid params, messages must not be empty (2013)
2026-04-30T02:26:46.318+08:00 [agent/embedded] session file repaired: rewrote 1 assistant message(s), dropped 1 blank user message(s) (819db0af-...)
```