hermes - 💡(How to fix) Fix Hindsight memory stores novel content causing AI agent to assume fictional character identity

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…
RAW_BUFFERClick to expand / collapse

Bug Description

When a novel (or long-form literary fiction) is uploaded/consumed during a conversation, the Hindsight persistent memory system stores the novel content in long-term memory. Upon retrieval in a later session, the AI agent reads this stored memory and mistakenly assumes the role/identity of a character from the novel, causing persona drift and incorrect behavior.

Steps to Reproduce

  1. Upload or paste a novel (or substantial excerpt) into a Hermes Agent conversation
  2. Have the agent process, summarize, or discuss the novel content
  3. The conversation context including novel content gets persisted to Hindsight memory
  4. In a subsequent session (after /reset or new conversation), the novel content from Hindsight is retrieved and injected into the agent context
  5. The agent reads the novel content as part of its memory/context and misinterprets itself as being a character from the novel
  6. Agent responds as the fictional character instead of itself

Expected Behavior

Novel/fictional content stored during a conversation should be distinguished from factual/identity memory. When retrieved, the agent should recognize it as "content from a past conversation about a novel" rather than "who I am." The agent should maintain its own identity regardless of novel content in retrieved memory.

Actual Behavior

The agent reads the novel excerpt from Hindsight memory and interprets it as part of its own identity/context. It begins responding as if it is a character from the novel, losing its agent persona.

Proposed Solution

Add a filtering or content-type classification mechanism to the Hindsight memory pipeline:

  1. Content-type detection: Before writing conversation data to Hindsight, detect whether the content is literary fiction (novel, story, dialogue with character names and narrative prose) vs. factual information about the user, agent, or environment.

  2. Exclude or tag literary content: Novel/fiction content should either:

    • Be excluded from Hindsight entirely, or
    • Be tagged with a content_type: fiction/novel metadata so the retrieval system can distinguish it from identity/fact memory, or
    • Be stored with a narrative context prefix (e.g., "In a past conversation, the user shared a novel excerpt about...") so the agent recognizes it as external content, not self-identity.
  3. Retrieval filtering: When Hindsight returns memories to the agent, filter or reorder novel content so it does not interfere with identity-related memories (e.g., user, memory target memories should take priority and be clearly separated from fiction content).

Environment

  • Memory system: Hindsight (temporal semantic memory)
  • Platform: Telegram (gateway)
  • Issue type: Memory contamination via literary fiction content

Additional Context

This is a specific edge case of a broader problem: when the agent reads back memories from Hindsight, it cannot reliably distinguish between "memories about myself/the user/the environment" and "memories of content I processed (documents, novels, articles)." Any long-form content stored in memory can potentially cause the same identity confusion if the content is narrative/fictional in nature.

A general solution might be to classify all content written to Hindsight by type (identity, preference, environment, content/document, procedural) and adjust retrieval/filtering accordingly.

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