openclaw - 💡(How to fix) Fix [Bug] Telegram conversation context duplicates session history, causing context pollution and degraded response quality [2 pull requests]

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…

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug type: Context pollution

Summary: When chatting via Telegram, OpenClaw attaches a (untrusted, chronological, selected for current message) conversation context block to every inbound message. This block contains recent message history that is already present in the session transcript. The result is duplicated context being sent to the model on every turn.

Impact:

  1. Wasted tokens — duplicate context grows with conversation length
  2. Degraded response quality — Agent sometimes repeats previous answers or gets confused by the overlapping context, making it appear "dumber"
  3. Dashboard clutter — the conversation context block is visually redundant in the session view

Steps to reproduce:

  1. Chat with any agent via Telegram for several turns
  2. Check the dashboard session view — notice the Conversation context (untrusted metadata) block growing each turn
  3. Observe that this content overlaps with the actual session history
  4. Notice occasional repetitive or confused responses from the agent

Expected behavior: Since the session already maintains full conversation history, the Telegram conversation context should either:

  • Be deduplicated against session history before being sent to the model, OR
  • Not be included when a persistent session already has the same messages, OR
  • Have a configurable option to disable/opt out

Environment:

  • OpenClaw: 2026.5.12
  • Channel: Telegram (polling mode, multiple bots)
  • OS: WSL2 (Ubuntu) on Windows 11

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