openclaw - 💡(How to fix) Fix MiniMax API error 2013 'chat content is empty' on new session (v2026.4.26, regressed from v2026.4.23) [1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#74206Fetched 2026-04-30 06:27:22
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
2
Author
Timeline (top)
subscribed ×3mentioned ×2closed ×1commented ×1

Error Message

When injectHeartbeatPrompt is false, the user trigger prompt becomes empty. The code path that checks hasPromptSubmissionContent returns false but is bypassed in certain conditions, causing an empty {"role":"user","content":[{"type":"text","text":""}]} to be sent to MiniMax, which rejects it with error 2013. 4. Error log: `400 invalid params, chat content is empty (2013)`

Root Cause

The issue was introduced by a change in DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY in attempt.prompt-helpers:

  • v2026.4.23 (working): injectHeartbeatPrompt: true
  • v2026.4.26 (broken): injectHeartbeatPrompt: false

When injectHeartbeatPrompt is false, the user trigger prompt becomes empty. The code path that checks hasPromptSubmissionContent returns false but is bypassed in certain conditions, causing an empty {"role":"user","content":[{"type":"text","text":""}]} to be sent to MiniMax, which rejects it with error 2013.

Code Example

400 invalid params, chat content is empty (2013)

---

const DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY = { injectHeartbeatPrompt: false };
// should be:
const DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY = { injectHeartbeatPrompt: true };
RAW_BUFFERClick to expand / collapse

Bug Description

Affected versions: v2026.4.25-beta.10 through v2026.4.26 (v2026.4.23 is NOT affected)

When a user sends a message in Feishu that triggers a new session (via /new or session reset), OpenClaw sends an empty user message content to MiniMax API, which rejects it with:

400 invalid params, chat content is empty (2013)

Root Cause

The issue was introduced by a change in DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY in attempt.prompt-helpers:

  • v2026.4.23 (working): injectHeartbeatPrompt: true
  • v2026.4.26 (broken): injectHeartbeatPrompt: false

When injectHeartbeatPrompt is false, the user trigger prompt becomes empty. The code path that checks hasPromptSubmissionContent returns false but is bypassed in certain conditions, causing an empty {"role":"user","content":[{"type":"text","text":""}]} to be sent to MiniMax, which rejects it with error 2013.

Detailed Analysis

Filev2026.4.23v2026.4.26
`attempt.prompt-helpers-*.js`98 lines, full logic9 lines, injectHeartbeatPrompt=false
`pi-embedded-*.js`4 lines, simple re-export3061 lines, full rewrite
`normalizeAssistantReplayContent`passes user messages throughcalls `sanitizeUserReplayContent` which returns null for empty content
`sanitizeUserReplayContent`does not existnew - returns null if content.trim() === ""
`hasPromptSubmissionContent`does not existnew - checks if prompt/messages/images are all empty

Version Chain

  • v2026.4.23 ✅ works fine
  • v2026.4.25-beta.10 ❌ injectHeartbeatPrompt changed to false
  • v2026.4.25 ❌ continues to have the bug
  • v2026.4.26 ❌ current stable, has the bug

Reproduction Steps

  1. Have MiniMax as the primary model (cost=0, configured in openclaw.json)
  2. Send any message in Feishu that triggers a new session (or use /new)
  3. The greeting turn fails with: `failoverReason: format | provider rejected the request schema or tool payload`
  4. Error log: `400 invalid params, chat content is empty (2013)`

Suggested Fix

Change `attempt.prompt-helpers-87NGkTSR.js` in the installed package:

const DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY = { injectHeartbeatPrompt: false };
// should be:
const DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY = { injectHeartbeatPrompt: true };

This restores the v2026.4.23 behavior. However this is a code-level fix that gets overwritten on upgrade. A more permanent solution would be to expose this as a configurable option.

Environment

  • OpenClaw: v2026.4.26
  • Model: MiniMax/MiniMax-M2.7 (primary), OpenRouter fallbacks
  • Channel: Feishu (websocket mode)
  • Build ID: 17c3fa238f70 (same as v2026.4.23)
  • Platform: WSL2/Linux

Tags

bug | regressions | minimax | session-reset | heartbeat

extent analysis

TL;DR

Change the injectHeartbeatPrompt value to true in attempt.prompt-helpers to fix the issue with empty user message content being sent to MiniMax API.

Guidance

  • Identify the attempt.prompt-helpers file in the installed package and update the DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY to set injectHeartbeatPrompt to true.
  • Verify that the change fixes the issue by sending a message in Feishu that triggers a new session and checking for the error log.
  • Consider exposing injectHeartbeatPrompt as a configurable option for a more permanent solution.
  • Be aware that this code-level fix may be overwritten on upgrade, so a more robust solution should be explored.

Example

const DEFAULT_EMBEDDED_RUN_TRIGGER_POLICY = { injectHeartbeatPrompt: true };

Notes

This fix is specific to versions v2026.4.25-beta.10 through v2026.4.26, and may not apply to other versions. The suggested fix is a temporary workaround until a more permanent solution can be implemented.

Recommendation

Apply the workaround by changing the injectHeartbeatPrompt value to true, as this will restore the working behavior from version v2026.4.23.

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