Description
After context compaction triggers, a compacted summary from a cron job session (unrelated, different platform) is injected into the current live messaging session, causing the agent to hallucinate and drift into an entirely different topic.
Reproduction
- Run a cron job that produces a session with compaction (e.g., a scheduled paper ingestion job)
- In a separate live conversation (different platform, different topic), allow the conversation to reach a point where compaction triggers
- Observe: the compacted summary injected contains content from the cron session, not just the current conversation
Observed Behavior
The agent, after compaction, begins referencing topics, terminology, and context from the unrelated cron session — producing fabricated data and completely off-topic responses. The user perceives this as a sudden, unexplained topic shift.
Expected Behavior
Compaction summaries should only contain context from the current session. Cross-session contamination should not occur. If compaction summaries are stored in a shared pool, they must be keyed/isolated by session ID.
Impact
- Agent produces hallucinated, fabricated content derived from contaminated context
- Complete loss of user trust when the agent suddenly switches topics mid-conversation
- Particularly dangerous when cron sessions contain domain-specific content (finance, medicine, etc.) that pollutes unrelated conversations
Suspected Root Cause
Compaction summaries may be stored/retrieved without proper session-level isolation, allowing a cron session's compacted summary to be injected into a live messaging session's context window.
Related Issues
Environment
- Hermes version: 0.15.x
- Platforms: feishu (live) + cron (scheduled)
- This bug is observed on a single Hermes instance running both gateway and cron scheduler
Description
After context compaction triggers, a compacted summary from a cron job session (unrelated, different platform) is injected into the current live messaging session, causing the agent to hallucinate and drift into an entirely different topic.
Reproduction
Observed Behavior
The agent, after compaction, begins referencing topics, terminology, and context from the unrelated cron session — producing fabricated data and completely off-topic responses. The user perceives this as a sudden, unexplained topic shift.
Expected Behavior
Compaction summaries should only contain context from the current session. Cross-session contamination should not occur. If compaction summaries are stored in a shared pool, they must be keyed/isolated by session ID.
Impact
Suspected Root Cause
Compaction summaries may be stored/retrieved without proper session-level isolation, allowing a cron session's compacted summary to be injected into a live messaging session's context window.
Related Issues
Environment