hermes - 💡(How to fix) Fix [Feature]: memory tool needs read action, better error messages, and pressure warnings [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#12568Fetched 2026-04-20 12:18:12
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
referenced ×1

Error Message

The memory tool currently only supports add/replace/remove. When memory is full or nearly full, the agent has no way to inspect the current state (entry sizes, usage breakdown) and the error messages are too vague to take corrective action.

  • Error messages on add/replace failure only say "would exceed limit" without showing available space or per-entry sizes
  1. Improve error messages on add/replace failure: show current usage, available space, entry sizes with index, and specific overshoot amount Commit: feat(memory): add read action, improve error messages, and add pressure warning on fork GongShi5201/hermes-agent
RAW_BUFFERClick to expand / collapse

Problem

The memory tool currently only supports add/replace/remove. When memory is full or nearly full, the agent has no way to inspect the current state (entry sizes, usage breakdown) and the error messages are too vague to take corrective action.

Current Behavior

  • No read action — agent cannot see entry sizes or usage details without loading the full system prompt snapshot
  • Error messages on add/replace failure only say "would exceed limit" without showing available space or per-entry sizes
  • No pressure warning — agent only discovers memory is full when an add fails
  • System prompt schema description contains static memory hygiene text that burns tokens every turn

Proposed Solution

  1. Add read action returning entries with char counts and previews, usage percentage, entry count
  2. Improve error messages on add/replace failure: show current usage, available space, entry sizes with index, and specific overshoot amount
  3. Event-driven pressure warning at 80%+ usage — emitted in tool response, NOT in system prompt schema description (saves tokens)
  4. Double default limits from 2200/1375 to 4400/2750 chars (the old limits were too tight for complex projects)

Implementation

All changes are tested (15 new tests) and working:

  • tools/memory_tool.py: read action, improved errors, pressure warning
  • hermes_cli/config.py: doubled defaults
  • tests/tools/test_memory_tool.py: full coverage

Commit: feat(memory): add read action, improve error messages, and add pressure warning on fork GongShi5201/hermes-agent

extent analysis

TL;DR

Implement the proposed solution by adding a read action, improving error messages, introducing an event-driven pressure warning, and doubling the default limits to provide better memory management and error handling.

Guidance

  • Review the implementation changes in tools/memory_tool.py, hermes_cli/config.py, and tests/tools/test_memory_tool.py to understand the proposed solution.
  • Verify that the new read action returns the expected information, including entry sizes, usage breakdown, and previews.
  • Test the improved error messages to ensure they provide sufficient information for corrective action, including available space, per-entry sizes, and specific overshoot amounts.
  • Check the event-driven pressure warning is emitted at 80%+ usage and saves tokens by not being included in the system prompt schema description.

Example

No code snippet is provided as the issue already includes a detailed description of the proposed solution and implementation.

Notes

The proposed solution assumes that the current implementation of the memory tool is correct and the changes will fix the existing issues. However, it's essential to thoroughly test the new functionality to ensure it works as expected.

Recommendation

Apply the proposed workaround by implementing the changes outlined in the issue, as they provide a comprehensive solution to the existing problems with memory management and error handling. The changes are already tested and seem to address the issues, making them a suitable solution.

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