hermes - 💡(How to fix) Fix Bug: memory tool replace/remove operations fail — old_text parameter not recognized

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…

Error Message

  1. Observe the error: "old_text is required"
  2. Observe the error: "content is required" (different error, still broken)
  3. Observe the error: "old_text is required" | Call | Parameters | Error |

Root Cause

The tool schema declares parameters old_text and new_text, but the parameter names are not correctly forwarded to the backend logic. This is likely a parameter name mismatch between the tool schema definition and the handler function signature.

Fix Action

Workaround

Use action=add to write new entries. replace and remove are currently unusable.

RAW_BUFFERClick to expand / collapse

Bug Description

The memory tool's replace and remove actions fail because the old_text parameter is not correctly mapped to the underlying implementation. Only the add action works.

Steps to Reproduce

  1. Use the memory tool with action=replace and provide old_text parameter
  2. Observe the error: "old_text is required"
  3. Try with old_string instead (matching the patch tool convention)
  4. Observe the error: "content is required" (different error, still broken)
  5. Try action=remove with old_string
  6. Observe the error: "old_text is required"

Concrete Examples

CallParametersError
replaceold_text="foo", new_text="bar""content is required"
replaceold_string="foo", new_string="bar""old_text is required"
removeold_string="foo""old_text is required"
addcontent="foo"✅ Works fine

Expected Behavior

replace and remove should work when old_text is provided, as defined in the tool schema.

Actual Behavior

Neither old_text nor old_string parameter names are correctly passed to the underlying handler. The parameter mapping appears broken — the schema defines old_text/new_text but the implementation may expect old_string/new_string (similar to the patch tool), or vice versa.

Root Cause Analysis

The tool schema declares parameters old_text and new_text, but the parameter names are not correctly forwarded to the backend logic. This is likely a parameter name mismatch between the tool schema definition and the handler function signature.

Workaround

Use action=add to write new entries. replace and remove are currently unusable.

Environment

  • Hermes Agent: latest (installed via install.sh)
  • Memory provider: built-in (default)
  • Platform: Linux

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 Bug: memory tool replace/remove operations fail — old_text parameter not recognized