hermes - 💡(How to fix) Fix hindsight: no per-memory delete or exclude — stale facts can only be removed by nuking the bank [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#23023Fetched 2026-05-11 03:31:43
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Hindsight has no per-memory mutation surface. Once a fact is retained, the only ways to remove or attenuate it are:

  • DELETE /v1/.../banks/{bank}/memories — nukes the entire bank
  • DELETE /v1/.../memories/{id}/observations — clears observation history but leaves the memory text intact (verified: text persists, just proof_count resets)

This means agents that auto-retain (auto_retain: true in ~/.hermes/hindsight/config.json) accumulate stale duplicates over time with no recovery path short of bank wipe.

Root Cause

  • Crisis-narrative pruning — multi-day debug sessions retain disproved hypotheses; once resolved, they should be removable.
  • PII / secret leakage — if a key, email, or other secret leaks into a retained memory, currently the only fix is DELETE /memories (nuke bank).
  • Curator-driven hygiene — the existing hermes curator skill maintenance pattern doesn't extend to memory because there's no surgical operation. A scheduled hygiene job that ranks duplicates and excludes the worst N would be straightforward with (1).
  • Tenant offboarding — selectively forget a client's facts on offboard without losing cross-client lessons.

Fix Action

Fix / Workaround

Workaround context

RAW_BUFFERClick to expand / collapse

Summary

Hindsight has no per-memory mutation surface. Once a fact is retained, the only ways to remove or attenuate it are:

  • DELETE /v1/.../banks/{bank}/memories — nukes the entire bank
  • DELETE /v1/.../memories/{id}/observations — clears observation history but leaves the memory text intact (verified: text persists, just proof_count resets)

This means agents that auto-retain (auto_retain: true in ~/.hermes/hindsight/config.json) accumulate stale duplicates over time with no recovery path short of bank wipe.

Concrete trigger

In a single multi-day debug session ("chat-upload v1.x overwrite incident"), Hindsight retained ~75 near-duplicate memories about the same crisis: stripped public repo discovery, three-recovery-options proposal, .pyc decompile plans, hard-refresh instructions, "task blocked awaiting restart" status, etc. Once v2.0.0 shipped, all of these became actively misleading — they're high-recency, high-relevance, and now contradicted by reality.

I tried to prune them. The tool surface doesn't support it.

Requested API additions

Three increasingly invasive options, in preference order:

  1. POST /v1/.../memories/{id}/exclude (or /suppress) — soft-tag the memory so it stops appearing in recall / list / index results. Reversible. Doesn't break entity/chunk graph integrity. This is the cheap, safe primitive.
  2. DELETE /v1/.../memories/{id} — hard delete with cascade to entities/chunks where reference counts hit zero. More invasive but sometimes appropriate (PII slip, security mistake, tenant offboard).
  3. POST /v1/.../memories/bulk/exclude — batch endpoint taking {ids: [...]}. Pruning a 75-fact stale narrative over 75 individual HTTP calls is silly.

A tags query filter on /memories/list and /memories/recall (exclude_tags=stale,deprecated) would also let an agent self-quarantine its own retained-then-disproved facts without server-side mutation.

Use cases

  • Crisis-narrative pruning — multi-day debug sessions retain disproved hypotheses; once resolved, they should be removable.
  • PII / secret leakage — if a key, email, or other secret leaks into a retained memory, currently the only fix is DELETE /memories (nuke bank).
  • Curator-driven hygiene — the existing hermes curator skill maintenance pattern doesn't extend to memory because there's no surgical operation. A scheduled hygiene job that ranks duplicates and excludes the worst N would be straightforward with (1).
  • Tenant offboarding — selectively forget a client's facts on offboard without losing cross-client lessons.

Surfacing in the agent toolset

Once the API exists, expose:

  • hindsight_exclude(ids=[...]) — wraps option 1
  • hindsight_get already exists for inspection, so agents can index → review → exclude symmetrically with the existing index → review → get pattern documented in hindsight-memory skill

Workaround context

Direct Postgres surgery on ~/.pg0/instances/hindsight-embed-hermes works but bypasses the system's invariants (entity counts, chunk refs, FTS index consistency) and the hindsight-memory skill explicitly flags memory as high blast radius. Not a path I'd take without an upstream fix.


Affected files (rough pointers):

  • API surface: wherever hindsight-api mounts the /memories router (FastAPI handlers for retain/recall/list)
  • Schema: memory table needs an excluded_at column or equivalent
  • Search path: recall, list, index queries need WHERE excluded_at IS NULL (or a tag-based filter)

Happy to test against a release candidate. Hermes Agent v0.13.x, Hindsight local_embedded mode, profile hermes.

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

hermes - 💡(How to fix) Fix hindsight: no per-memory delete or exclude — stale facts can only be removed by nuking the bank [1 participants]