Skip to content

Telegram topic routes can remain bound to compressed parent sessions #33414

@bizyumov

Description

@bizyumov

Summary

Telegram DM topic mode can keep a topic binding pointed at a session that has already been superseded by a compression child. The gateway route may advance to the child, but the Telegram topic binding can still resolve to the parent on a later inbound message.

Impact

A later message in the same topic can load the parent-sized transcript again instead of the compressed continuation. That can trigger repeated preflight compression, slow responses, stale cached agents, and apparent infinite compression loops for topic lanes.

Reproduction Shape

  1. Enable Telegram DM topic mode.
  2. Process a topic lane until context compression splits parent -> child.
  3. Leave the topic binding pointing at parent while the route or session lineage points at child.
  4. Send another message in the same topic.
  5. The gateway may load parent history instead of the current compression continuation.

Expected Behavior

Before transcript load, the gateway should canonicalize topic bindings through the compression tip or current descendant, rebind the topic to the current child, and evict any cached agent whose session id no longer matches the canonical route.

Related

Notes

This report intentionally uses synthetic identifiers only; no production chat ids, user names, session ids, or logs are included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/gatewayGateway runner, session dispatch, deliveryduplicateThis issue or pull request already existsplatform/telegramTelegram bot adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions