Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Bug] Hallucination Loop — Agent Generated Irrelevant Multi-Thousand-Word Responses Across 2 Simultaneous Sessions
OpenClaw Version: 2026.5.6 (c97b9f7)
Date/Time Window: Tue May 26, 2026, ~19:02–19:06 UTC
Channel: Telegram (direct chat)
Model/Provider: anthropic/claude-sonnet-4-6
What happened:
The agent (main session) went into an uncontrolled hallucination loop across 2 simultaneous Telegram chats. It began generating completely irrelevant, multi-thousand-word responses about Portugal, Madeira, the Azores, Portuguese cuisine, and history — none of which had any relation to the active conversation. Both chats were handled by the same agent instance. The user had to send "Stop" multiple times to intervene.
Impact:
• Significant wasted output tokens across both sessions
• Required repeated manual user intervention to stop
• Occurred simultaneously on 2 sessions — suggests it may not be an isolated model fluke
Diagnostics: Attaching openclaw-diagnostics.zip (sanitized, payload-free)
Credits question: Tokens were billed through user's own Anthropic API key — if there's a path to review/credit through OpenClaw's billing support, please advise.
Steps to reproduce
Expected behavior
Actual behavior
OpenClaw version
2026.5.6 (c97b9f7)
Operating system
Linux 6.12.74+deb13+1-amd64 (x64)
Install method
No response
Model
anthropic/claude-sonnet-4-6
Provider / routing chain
Routing Chain: Telegram → OpenClaw Gateway → anthropic/claude-sonnet-4-6 (via Anthropic API, api-key auth) Full routing for the issue: • Inbound: Telegram direct chat • Gateway: OpenClaw 2026.5.6 (c97b9f7) on Linux/x64 • Runtime: OpenClaw Pi Default • Provider: Anthropic (api-key, env: ANTHROPIC_API_KEY) • Model: anthropic/claude-sonnet-4-6 • Execution: direct (no proxy) Paste that in the routing chain field and you're done! 🙏
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 26, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 3:47 PM ET / 19:47 UTC.
Summary
Keep open: the report is credible and current main has adjacent Telegram/session safeguards, but neither current main nor the latest release proves the two-simultaneous-chat irrelevant-output/session-drift incident is fixed or fully owned by another tracker.
Reproducibility: no. The diagnostics prove a real Telegram send burst and recovery window, but the payload-free export omits the raw content, trigger, and two-chat context needed for a high-confidence current-main reproduction.
Ways to help us reproduce this
Next step
Manual review is needed because the remaining boundary crosses Telegram delivery, default DM scoping, session-state isolation, and semantic loop policy.
Review details
Best possible solution:
Keep this as the concrete Telegram cross-session incident until maintainer review can separate DM scoping/config behavior, duplicate delivery/replay, and any needed semantic runaway-output guard.
Do we have a high-confidence way to reproduce the issue?
No. The diagnostics prove a real Telegram send burst and recovery window, but the payload-free export omits the raw content, trigger, and two-chat context needed for a high-confidence current-main reproduction.
Is this the best way to solve the issue?
Unclear. The best fix may be config guidance, a session-routing change, a delivery/replay fix, or a semantic loop guard, and maintainers need to choose that boundary before an automated patch.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against fa6a9509bc95.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.Label justifications:
P1: The report describes uncontrolled long Telegram output across simultaneous chats requiring repeated user intervention.impact:session-state: The central concern is possible cross-chat context/session drift while two Telegram chats shared one agent instance.impact:message-loss: The incident involved visible Telegram output sent to the wrong or unintended conversational flow, disrupting normal message delivery.Evidence reviewed
What I checked:
AGENTS.md:11, fa6a9509bc95)src/routing/resolve-route.ts:624, fa6a9509bc95)docs/gateway/security/index.md. (docs/gateway/security/index.md:586, fa6a9509bc95)extensions/telegram/src/bot-message-context.dm-threads.test.ts:383, fa6a9509bc95)src/auto-reply/reply/agent-runner-payloads.ts:285, fa6a9509bc95)Likely related people:
src/auto-reply/reply/agent-runner-payloads.ts,src/infra/outbound/delivery-queue-recovery.ts,src/routing/session-key.ts)src/auto-reply/reply/agent-runner-payloads.ts,src/auto-reply/reply/reply-payloads-dedupe.ts)extensions/telegram/src/bot-message-context.ts,extensions/telegram/src/conversation-route.ts,extensions/telegram/src/polling-session.ts)src/infra/outbound/delivery-queue-recovery.ts,src/routing/resolve-route.ts,src/agents/tool-loop-detection.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.openclaw-barnacle commentedon Jul 9, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 17, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.