hermes - 💡(How to fix) Fix Telegram topic context recovery can cross-pollute after idle eviction

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…

A Telegram forum-topic-specific request containing referential language ("that path") was answered using context from a different Telegram topic after the original topic agent had been idle-evicted. The assistant then performed a side-effecting local file/UI action (cp to Downloads and open -R) for an unrelated file, polluting the wrong Telegram topic and opening Finder to the wrong file.

This appears to be a topic-context recovery / session-search guardrail issue, not a raw Telegram routing issue.

Root Cause

Telegram topics are being used as separate project workspaces. Cross-topic inference from broad recency breaks that mental model and can cause unintended side effects. The risk is especially high for referential follow-ups like "that path," "the file," "it," "proceed," etc. after an idle eviction or context compression.

RAW_BUFFERClick to expand / collapse

Summary

A Telegram forum-topic-specific request containing referential language ("that path") was answered using context from a different Telegram topic after the original topic agent had been idle-evicted. The assistant then performed a side-effecting local file/UI action (cp to Downloads and open -R) for an unrelated file, polluting the wrong Telegram topic and opening Finder to the wrong file.

This appears to be a topic-context recovery / session-search guardrail issue, not a raw Telegram routing issue.

What happened

  • Current Telegram group uses multiple forum topics for separate projects.
  • Topic A had an earlier request about a markdown file path.
  • Topic A's in-memory agent was idle-evicted after about an hour.
  • Later, the user wrote in Topic A: "I don't know where that path is on my Macbook's hard drive. Usually you provide a link to it via Finder."
  • The new agent no longer had enough same-topic local context to know which path was meant.
  • Instead of asking for clarification or recovering only same-topic context, the assistant used broad session_search across recent sessions.
  • The broad search returned a recent unrelated Topic B session involving a PDF.
  • The assistant copied the unrelated PDF from Hermes cache to Downloads and ran open -R, then replied in Topic A with the wrong file.

Why this matters

Telegram topics are being used as separate project workspaces. Cross-topic inference from broad recency breaks that mental model and can cause unintended side effects. The risk is especially high for referential follow-ups like "that path," "the file," "it," "proceed," etc. after an idle eviction or context compression.

Expected behavior

When the current Telegram topic lacks enough local context for a referential request, Hermes should either:

  1. recover context only from the same Telegram chat_id/thread_id, or
  2. ask a clarifying question before acting.

It should not infer the target from unrelated topics based on recency, especially before local filesystem/UI actions.

Suggested improvements

  1. Persist Telegram chat_id and thread_id in structured session metadata and make it searchable/filterable.
  2. Add same-topic filtering to session_search or provide a gateway-level same-topic context recovery primitive.
  3. After agent-cache idle eviction, hydrate the new topic agent from the last same-topic session summary and/or last N same-topic messages.
  4. Add a guardrail: if a retrieved source session has a different Telegram thread_id than the current message and the user's request is referential/ambiguous, require clarification before acting.
  5. For side-effecting file/UI actions (cp to Downloads, open -R, email sends, browser actions, etc.), require confirmation if the action target was inferred from cross-topic search.

Severity

Medium-high trust issue for Telegram topic workflows. It does not appear to route messages to the wrong topic, but it can recover the wrong topic's context and act on it.

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

When the current Telegram topic lacks enough local context for a referential request, Hermes should either:

  1. recover context only from the same Telegram chat_id/thread_id, or
  2. ask a clarifying question before acting.

It should not infer the target from unrelated topics based on recency, especially before local filesystem/UI actions.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Telegram topic context recovery can cross-pollute after idle eviction