Skip to content

fix(memory): label recalled memory as informational, not authoritative (#28001) - #28583

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a
May 19, 2026
Merged

fix(memory): label recalled memory as informational, not authoritative (#28001)#28583
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #28001 by @LifeJiggy.

What: The system note wrapping recalled memory said "Treat as authoritative reference data — this is the agent's persistent memory and should inform all responses." Calling stale memory "authoritative" overrides the model's own judgment when memory contradicts current reality, e.g. cached project structure that's since been refactored.

How:

  • agent/memory_manager.py: rewrite the system-note text to "Treat as informational background data (may be stale)" with the same "should inform all responses" guidance.
  • Update _INTERNAL_NOTE_RE so the new and old forms both get stripped on round-trip (prevents the note from leaking into history).
  • The PR also includes regression tests for ShellFileOperations._check_git_baseline (a related test gap the author noticed while in the area).

Original PR: #28001
Fixes #17164.

…e_file

Adds TestGitBaselineCheck with 6 unit tests covering _check_git_baseline
and the warning field in write_file result:
- Git not available → None
- Not in a git repo → None
- Clean repo → None
- Dirty repo → returns warning string with branch name
- write_file result includes warning when dirty
- write_file result omits warning when clean
@teknium1
teknium1 merged commit 0b89628 into main May 19, 2026
@teknium1
teknium1 deleted the hermes/hermes-3ad7d98a branch May 19, 2026 07:06
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-3ad7d98a vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8952 on HEAD, 8952 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4702 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/memory Memory tool and memory providers labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical: memory/session recall can report false project status and mutate files without verified baseline

3 participants