hermes - 💡(How to fix) Fix hermes-achievements: memory_write_events counts all memory calls, not just writes [5 pull requests]

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…

Root Cause

The metric is computed at line 357:

memory_write_events = _count_tool(tool_sequence, "mnemosyne_remember", "memory")

_count_tool uses substring matching (needle in name):

def _count_tool(tool_names, *needles):
    return sum(1 for name in lowered
               if any(needle in name for needle in needles))

The fallback needle "memory" matches every call to the built-in memory tool regardless of action (add, replace, list, search, remove). Since Hermes uses the memory tool name for all operations, memory_write_events degenerates into an exact copy of memory_events (line 356):

memory_events = _count_tool(tool_sequence, "memory", "mnemosyne")

Fix Action

Fixed

Code Example

memory_write_events = _count_tool(tool_sequence, "mnemosyne_remember", "memory")

---

def _count_tool(tool_names, *needles):
    return sum(1 for name in lowered
               if any(needle in name for needle in needles))

---

memory_events = _count_tool(tool_sequence, "memory", "mnemosyne")
RAW_BUFFERClick to expand / collapse

Bug

memory_write_events in plugins/hermes-achievements/dashboard/plugin_api.py counts all memory tool calls, not just write operations. This causes Memory Keeper and Memory Palace achievements to always show identical counts.

Root Cause

The metric is computed at line 357:

memory_write_events = _count_tool(tool_sequence, "mnemosyne_remember", "memory")

_count_tool uses substring matching (needle in name):

def _count_tool(tool_names, *needles):
    return sum(1 for name in lowered
               if any(needle in name for needle in needles))

The fallback needle "memory" matches every call to the built-in memory tool regardless of action (add, replace, list, search, remove). Since Hermes uses the memory tool name for all operations, memory_write_events degenerates into an exact copy of memory_events (line 356):

memory_events = _count_tool(tool_sequence, "memory", "mnemosyne")

Impact

  • Memory Palace achievement always shows the same progress as Memory Keeper
  • The "write-only" metric is meaningless — it cannot distinguish reads from writes at the tool-name level
  • Users cannot see their actual durable-memory write count

Suggested Fix

Two options:

  1. Parse tool arguments — inspect the action parameter of memory tool calls to count only add/replace actions. This is more correct but requires deeper session parsing (currently _count_tool only looks at tool names, not arguments).

  2. Remove the "memory" fallback from memory_write_events — if mnemosyne_remember is the only write-specific tool name, drop the "memory" needle so it only matches mnemosyne_remember. This would undercount (miss memory tool writes) but at least not be a duplicate of memory_events.

Option 1 is the proper fix: inspecting tool call arguments to distinguish action=add/replace from action=list/search/remove.

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 hermes-achievements: memory_write_events counts all memory calls, not just writes [5 pull requests]