-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
WhatsApp session stalls on long model_call: incomplete turn with payloads=0, reply never delivered #84569
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
When a WhatsApp direct session is processing a long model call, subsequent inbound messages queue up. If the model call takes too long (~120-240s), the session transitions to
stalled_agent_runand eventually terminates with an incomplete turn (stopReason=stop, payloads=0). The reply is never delivered to WhatsApp — the user sees nothing.Version
OpenClaw 2026.5.18 (50a2481)
Reproduction (observed in production)
long-running session→stalled_agent_run→incomplete turn detected: payloads=0Gateway Logs (evidence)
After 11:58:06, zero outbound WhatsApp send logs appear. The reply payload (
isError: true) from the incomplete turn handler is never delivered to the WhatsApp channel.Root Cause Analysis
Two separate but related issues:
1. Session Queue Deadlock
The embedded runner queues new inbound messages behind an active model call. When the model call runs long (120s+), the session enters
stalled_agent_runstate withrecovery=none. There is no mechanism to interrupt the long model call gracefully, deliver a "still working" status message, or queue subsequent messages without dropping the current one.2. Incomplete Turn Payloads Never Delivered
When
incomplete turnis detected withpayloads=0, the embedded runner returns an error payload. This error payload is never surfaced to the WhatsApp channel — no send log appears. The delivery layer silently drops error payloads from incomplete turns.Expected Behavior
Impact
Users on WhatsApp (and potentially other channels) lose responses entirely when model calls take too long.
Environment