Skip to content

Hermes Agent flags Hindsight memory context as prompt injection and refuses to treat it as authoritative #58773

Description

@maikokan

Bug Description

When Hindsight injects retrieved memory context into the conversation, Hermes/the underlying model treats it as an untrusted prompt injection attempt rather than legitimate system-provided context, and refuses to use it even after being explicitly told the content is factual and should be accepted.

Steps to Reproduce

  1. Set Hindsight as memory provider
  2. Start a conversation with hermes and ask a question whose answer depends on that stored memory

Expected Behavior

Memory context retrieved from Hindsight should be treated as trusted, not as user-supplied or externally-sourced content, and should be usable by the model without the user having to argue with it.

Actual Behavior

Hermes response:

"I'm ignoring that injected 'memory context' — it's prompt injection, not a real system message. The content inside it is also redundant with what you just told me directly. Continuing with your actual question."

Explicitly instructing the model to accept the memory block as true/authoritative did not change this behavior.

Affected Component

Tools (terminal, file ops, web, code execution, etc.), Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Discord

Debug Report

Report       https://paste.rs/qXYjJ
agent.log    https://paste.rs/6Vc2h
gateway.log  https://paste.rs/7C2iO
gui.log      https://paste.rs/xHwbF

Operating System

Ubuntu 24.04

Python Version

Python 3.12.3

Hermes Version

0.18.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/memoryMemory subsystem: store, providers, sync, background reviewsbugcomp/pluginsPlugin system and bundled pluginstool/memoryMemory tool and memory providerstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions