openclaw - 💡(How to fix) Fix Bug: DeepSeek V4 Flash incomplete turn (payloads=0, tools=2, replaySafe=no, stopReason=stop) in 2026.5.27/28

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…

DeepSeek V4 Flash via OpenRouter produces incomplete turns (payloads=0, tools=2, replaySafe=no, stopReason=stop) in OpenClaw 2026.5.27 and 2026.5.28. The model worked without issues in 2026.5.26.

Error Message

incomplete turn detected: provider=openrouter/deepseek/deepseek-v4-flash stopReason=stop payloads=0 tools=2 replaySafe=no planningRetries=0/1 reasoningRetries=0/2 emptyRetries=0/1 missingAssistantRetries=0/1 — surfacing error to user

Root Cause

DeepSeek V4 Flash via OpenRouter produces incomplete turns (payloads=0, tools=2, replaySafe=no, stopReason=stop) in OpenClaw 2026.5.27 and 2026.5.28. The model worked without issues in 2026.5.26.

Fix Action

Workaround

Switching to openrouter/deepseek/deepseek-v4-pro eliminates the issue — Pro completes tool calls reliably. This is expensive compared to Flash.

Code Example

incomplete turn detected: provider=openrouter/deepseek/deepseek-v4-flash stopReason=stop payloads=0 tools=2 replaySafe=no planningRetries=0/1 reasoningRetries=0/2 emptyRetries=0/1 missingAssistantRetries=0/1 — surfacing error to user
RAW_BUFFERClick to expand / collapse

Summary

DeepSeek V4 Flash via OpenRouter produces incomplete turns (payloads=0, tools=2, replaySafe=no, stopReason=stop) in OpenClaw 2026.5.27 and 2026.5.28. The model worked without issues in 2026.5.26.

Steps to reproduce

  1. Configure openrouter/deepseek/deepseek-v4-flash as primary model
  2. Send any message that triggers tool calls (e.g. "search for X" or "read file Y")
  3. After a few turns, especially when the conversation context grows, the model starts generating partial tool calls — it begins {"tool_calls": [{"function": {"name": "... but stops mid-JSON with stopReason=stop
  4. Since replaySafe=no, OpenClaw does not retry the turn — surfaces "Agent couldn't generate a response"

Expected behavior

Incomplete turns from the model should be retried (at least once) even when replaySafe=no, or the underlying cause of partial tool call generation from DeepSeek Flash on OpenRouter should be fixed.

Actual behavior

incomplete turn detected: provider=openrouter/deepseek/deepseek-v4-flash stopReason=stop payloads=0 tools=2 replaySafe=no planningRetries=0/1 reasoningRetries=0/2 emptyRetries=0/1 missingAssistantRetries=0/1 — surfacing error to user

The model receives stopReason=stop (not length, not content_filter), meaning the model itself decided to stop — but it stopped before completing the tool call JSON. OpenClaw then checks replaySafe=no and refuses to retry.

Context

  • OpenClaw: 2026.5.28 (also broken on 5.27; worked on 5.26)
  • Model: openrouter/deepseek/deepseek-v4-flash
  • Provider: OpenRouter (https://openrouter.ai/api/v1)
  • OS: Ubuntu 24.04, npm global install
  • Install method: npm global

What was tried (did not help)

  • queue.mode=interrupt + debounceMs=1000
  • session-memory.enabled=false
  • thinkingDefault=off
  • timeoutSeconds=120
  • Compaction adjustments (reserveTokens=20000, keepRecentTokens=40000)

Workaround

Switching to openrouter/deepseek/deepseek-v4-pro eliminates the issue — Pro completes tool calls reliably. This is expensive compared to Flash.

Notes

  • deepseek-v4-flash via native DeepSeek API (api.deepseek.com) reportedly works fine — the issue appears to be specific to the OpenRouter bridge for Flash
  • The replaySafe=no + emptyRetries=0/1 logic means no retry occurs at all, which makes the agent fully unusable when this happens

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…

FAQ

Expected behavior

Incomplete turns from the model should be retried (at least once) even when replaySafe=no, or the underlying cause of partial tool call generation from DeepSeek Flash on OpenRouter should be fixed.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: DeepSeek V4 Flash incomplete turn (payloads=0, tools=2, replaySafe=no, stopReason=stop) in 2026.5.27/28