Skip to content

[Bug] Telegram conversation context duplicates session history, causing context pollution and degraded response quality #82040

Description

@davidjoshua7692-code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, 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.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions