openclaw - 💡(How to fix) Fix [Bug]: LLM idle timeout causes duplicate message delivery — previous assistant reply re-sent verbatim [1 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#62313Fetched 2026-04-08 03:06:13
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

When the LLM takes longer than idleTimeoutSeconds (default 60s) to produce output, OpenClaw aborts the run and re-delivers the previous assistant reply verbatim as a new Telegram message. The user sees the exact same response twice — once as the original reply, and again as the "response" to their next message.

Error Message

LINE 150 (04:25:17) assistant: "Here are the results: 5 items processed..." ← correct reply to request A LINE 152 (04:30:43) user: "now try with different parameters" ← new request B LINE 154 (04:31:43) custom/openclaw:prompt-error: {"error": "LLM idle timeout (60s): no response from model"} LINE 155 (04:43:19) user: "I noticed you're sending duplicate messages" LINE 156 (04:43:27) assistant: normal reply to LINE 155

Root Cause

Root cause hypothesis

Fix Action

Workaround

Set agents.defaults.llm.idleTimeoutSeconds: 0 to disable the idle timeout entirely.

Code Example

LINE 150 (04:25:17) assistant: "Here are the results: 5 items processed..." ← correct reply to request A
LINE 152 (04:30:43) user: "now try with different parameters"new request B
LINE 154 (04:31:43) custom/openclaw:prompt-error:
  {"error": "LLM idle timeout (60s): no response from model"}
LINE 155 (04:43:19) user: "I noticed you're sending duplicate messages"
LINE 156 (04:43:27) assistant: normal reply to LINE 155
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output delivered to user without crash)

Summary

When the LLM takes longer than idleTimeoutSeconds (default 60s) to produce output, OpenClaw aborts the run and re-delivers the previous assistant reply verbatim as a new Telegram message. The user sees the exact same response twice — once as the original reply, and again as the "response" to their next message.

Reproduction

  1. Have a conversation with tool calls that take significant time (e.g. background process polling with process poll --timeout 300000)
  2. Send a new user message while the model is processing
  3. If the model doesn't produce streaming output within 60s (e.g. waiting for tool results), the run is aborted
  4. The previous assistant reply is re-sent to Telegram as a new message

Evidence from transcript

Session transcript shows the sequence clearly:

LINE 150 (04:25:17) assistant: "Here are the results: 5 items processed..." ← correct reply to request A
LINE 152 (04:30:43) user: "now try with different parameters" ← new request B
LINE 154 (04:31:43) custom/openclaw:prompt-error:
  {"error": "LLM idle timeout (60s): no response from model"}
LINE 155 (04:43:19) user: "I noticed you're sending duplicate messages"
LINE 156 (04:43:27) assistant: normal reply to LINE 155

Between LINE 152 and LINE 154, the model was aborted after 60s idle. But the user received LINE 150's content again in Telegram as a response to LINE 152 — the previous reply was re-delivered verbatim.

The duplicate delivery does not appear as a separate assistant message in the transcript — it happens at the delivery/channel layer, not the model layer.

Root cause hypothesis

When idleTimeoutSeconds fires and aborts a run, the outbound message handler may flush or re-send the last buffered/cached assistant text chunk to the channel, effectively duplicating the previous reply.

Key differences from related issues

  • Not compaction — session had 0 compactions at time of bug
  • Not heartbeat mixing — duplicate was triggered by user message, not heartbeat
  • Not Telegram streaming handler — the duplicate is a complete verbatim copy of the previous reply, not a partial chunk

Workaround

Set agents.defaults.llm.idleTimeoutSeconds: 0 to disable the idle timeout entirely.

Environment

  • OpenClaw 2026.4.5
  • Channel: Telegram (direct chat)
  • Model: anthropic/claude-opus-4-6
  • Streaming: partial (block streaming enabled)

Related issues

  • #37702 (compaction-triggered duplicate — different root cause, same symptom)
  • #33592 (Telegram duplicate replies)
  • #5806 (session state persists causing repeat messages)

extent analysis

TL;DR

Disable the idle timeout by setting agents.defaults.llm.idleTimeoutSeconds to 0 to prevent duplicate message delivery.

Guidance

  • Verify that the issue is indeed caused by the idle timeout by checking the session transcript for the "LLM idle timeout" error message.
  • Consider increasing the idleTimeoutSeconds value to a higher number to reduce the likelihood of timeouts, but this may not completely resolve the issue.
  • To mitigate the problem, implement a check to prevent re-sending the last buffered/cached assistant text chunk when the idle timeout fires.
  • Review related issues (#37702, #33592, #5806) to ensure the root cause is correctly identified and the chosen solution does not introduce other problems.

Example

No code snippet is provided as the issue does not specify the exact implementation details of the outbound message handler.

Notes

Disabling the idle timeout entirely may have unintended consequences, such as allowing the model to run indefinitely. A more robust solution would involve modifying the outbound message handler to prevent re-sending the last buffered/cached assistant text chunk when the idle timeout fires.

Recommendation

Apply the workaround by setting agents.defaults.llm.idleTimeoutSeconds: 0, as it is the most straightforward way to prevent duplicate message delivery, but be aware of potential drawbacks and consider a more comprehensive solution in the long term.

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