hermes - 💡(How to fix) Fix [Feature Request] Configurable memory character limit (currently hardcoded at 2,200) [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#16831Fetched 2026-04-29 06:38:44
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

warning_threshold: 80 # warn at 80% usage

Root Cause

The short-term memory is uniquely valuable because it is automatically injected into every turn without requiring explicit search calls. Hitting the 2,200 cap forces users to constantly prune facts that are still relevant.

Fix Action

Fix / Workaround

Current Workarounds (and why they are insufficient)

Code Example

memory:
  max_chars: 2200  # default, backward compatible

---

memory:
  max_chars: 5000        # hard ceiling
  warning_threshold: 80  # warn at 80% usage
RAW_BUFFERClick to expand / collapse

Problem

The Hermes memory tool has a hardcoded character limit of 2,200 for the short-term context memory that is injected into every session. This limit is too restrictive for users managing multiple projects or complex environments with many persistent facts.

Current Workarounds (and why they are insufficient)

Users currently work around this by:

  1. Project-specific .md files -- Good for static knowledge, but not dynamically searchable/injectable like memory
  2. Honcho -- Excellent for long-term facts, but requires explicit queries; does not provide the automatic per-session injection that memory offers
  3. Skills -- Great for workflows, not for raw facts

The short-term memory is uniquely valuable because it is automatically injected into every turn without requiring explicit search calls. Hitting the 2,200 cap forces users to constantly prune facts that are still relevant.

Proposed Solution

Add a configurable limit in config.yaml:

memory:
  max_chars: 2200  # default, backward compatible

Or ideally, allow a soft/hard limit pair:

memory:
  max_chars: 5000        # hard ceiling
  warning_threshold: 80  # warn at 80% usage

Suggested Behavior

  • Default: Keep 2,200 as the default to avoid surprising existing users
  • Range: Allow values between 1,000 and 10,000 (or unlimited with null / 0)
  • Validation: Reject unreasonable values (< 500 or > 50,000) to prevent token flooding
  • Display: Show current / limit in the memory header

Use Case

As a power user managing multiple projects (e.g., vocational training projects, infrastructure configs, client-specific deployment rules), I need to keep ~20-30 concise facts in short-term memory. With the current 2,200 limit, I hit the ceiling after ~10-12 entries and must constantly decide which facts to sacrifice, even though they are all relevant to ongoing work.

Additional Context

  • Honcho is already enabled as the long-term backend, but it does not replace the convenience of auto-injected short-term memory
  • Memory is currently at 99% usage (2,197/2,200) with only 10 entries, most of which are single-line project facts

Thank you for considering this!

extent analysis

TL;DR

Increase the max_chars limit in config.yaml to a higher value, such as 5000, to alleviate the restrictive character limit for short-term context memory.

Guidance

  • Consider adding a warning_threshold to alert users when they approach the new limit, allowing them to manage their memory usage proactively.
  • Evaluate the proposed range of 1,000 to 10,000 for the max_chars limit to ensure it meets the needs of various users.
  • Test the new limit with different numbers of concise facts to verify that it provides sufficient capacity for power users.
  • Review the validation rules for unreasonable values to prevent potential token flooding issues.

Example

memory:
  max_chars: 5000
  warning_threshold: 80

Notes

The ideal solution depends on the specific requirements of the users and the system's performance constraints. It may be necessary to experiment with different limit values and warning thresholds to find the optimal balance.

Recommendation

Apply the proposed workaround by adding a configurable limit in config.yaml, as it provides a flexible solution that can be tailored to individual user needs.

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