openclaw - 💡(How to fix) Fix [Bug]: Assistant can reply to stale user intent after reasoning-only/tool retry [2 comments, 3 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#78384Fetched 2026-05-07 03:37:31
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
3
Timeline (top)
commented ×2mentioned ×1subscribed ×1

In Telegram direct chat, the assistant can produce a final visible reply that answers an older nearby user message instead of the latest inbound message after a tool-use / reasoning-only retry path.

This appears to be an OpenClaw runtime/session continuation bug rather than Telegram message ordering. The latest user message is present in the session history before the assistant reply, but the final answer can still target a previous intent.

Error Message

Recent direct-chat sequence:

Root Cause

In Telegram direct chat, the assistant can produce a final visible reply that answers an older nearby user message instead of the latest inbound message after a tool-use / reasoning-only retry path.

This appears to be an OpenClaw runtime/session continuation bug rather than Telegram message ordering. The latest user message is present in the session history before the assistant reply, but the final answer can still target a previous intent.

Code Example

reasoning-only assistant turn detected: ... retrying ... with visible-answer continuation
RAW_BUFFERClick to expand / collapse

Summary

In Telegram direct chat, the assistant can produce a final visible reply that answers an older nearby user message instead of the latest inbound message after a tool-use / reasoning-only retry path.

This appears to be an OpenClaw runtime/session continuation bug rather than Telegram message ordering. The latest user message is present in the session history before the assistant reply, but the final answer can still target a previous intent.

Observed behavior

Recent direct-chat sequence:

  1. User: asks to treat ffb as shorthand for "future feature backlog list".
  2. Assistant saves/acknowledges that preference.
  3. User: Add to ffb as part of item 1 on list: ingest tab on memory dashboard...
  4. Assistant performs a tool call to read the backlog file for the new request.
  5. Assistant final reply incorrectly says: Yes, Sir — ffb now means future feature backlog list. I’ve saved it.

So the assistant answered the previous shorthand-confirmation message instead of the latest actionable backlog-edit message.

A similar stale-response incident happened immediately before this, where a final answer repeated the previous backlog-update completion instead of answering the current shorthand-confirmation message.

Evidence / diagnostics

Session history showed the messages in the correct order:

  • latest Telegram user message was already present in transcript before assistant final response;
  • the wrong answer occurred after a tool call;
  • gateway logs shortly before the first symptom included:
reasoning-only assistant turn detected: ... retrying ... with visible-answer continuation

This suggests the issue is in the assistant retry/continuation/session state path rather than Telegram delivery order.

Relevant source area found locally:

  • src/agents/pi-embedded-runner/run.ts
    • reasoning-only / empty-response retry loop
    • appends visible-answer retry instruction and continues
  • src/agents/pi-embedded-runner/run/incomplete-turn.ts
    • REASONING_ONLY_RETRY_INSTRUCTION
    • EMPTY_RESPONSE_RETRY_INSTRUCTION

The retry instruction currently asks the model to continue from the partial turn and produce visible output, but does not strongly re-anchor the final answer to the latest inbound user message / current run intent after tool use.

Expected behavior

After every tool-use continuation, reasoning-only retry, empty-response retry, or final visible answer generation, the assistant must answer the latest inbound user message for that run/session.

If the runtime cannot verify that the final answer is anchored to the latest user message, it should prefer a safe blocked/retry state rather than delivering a stale answer.

Impact

High trust impact for direct chat: the assistant appears to ignore the newest user message and answer an old one. This is especially damaging in rapid back-and-forth Telegram workflows and when the user has issued an actionable edit/request.

Possible fix direction

Add a runtime-level guard around retry/continuation/final-delivery paths:

  • include/latest user message fingerprint or sequence ID in retry prompt construction;
  • ensure final assistant answer is associated with the current run/latest user message;
  • avoid reusing stale assistant-visible-answer state across tool/retry continuations;
  • add regression tests for: user A -> assistant/tool/retry -> user B arrives/current run -> assistant must not answer user A.

Environment

  • OpenClaw: 2026.5.4 (325df3e)
  • Runtime: main Telegram direct session
  • Model: openai-codex/gpt-5.5
  • Channel: Telegram direct

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

After every tool-use continuation, reasoning-only retry, empty-response retry, or final visible answer generation, the assistant must answer the latest inbound user message for that run/session.

If the runtime cannot verify that the final answer is anchored to the latest user message, it should prefer a safe blocked/retry state rather than delivering a stale answer.

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]: Assistant can reply to stale user intent after reasoning-only/tool retry [2 comments, 3 participants]