warren-githut/personal-os-automation/hermes-memory-tool

Claude Code and agent skill by warren-githut/personal-os-automation

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Correct usage of Hermes's built-in `memory` tool, especially recovering when the store is over its hard character cap. Use whenever you need to save/append/update durable facts and hit a "would exceed the limit" rejection, or when the user corrects how you used the memory tool.

Install

npx vskill@latest install warren-githut/personal-os-automation/hermes-memory-tool

SKILL.md

The same SKILL.md was published earlier as warren-githut/personal-os-automation/hermes-memory-tool.

Hermes Memory Tool — cap recovery & correct params

The built-in memory store has a HARD cap (warren-profile built-in store ≈ 2,200 chars). When already over cap, writes fail.

Correct param shapes

  • Single change: memory(action='add'|'replace'|'remove', target='memory'|'user', content=..., old_text=...).
  • `replace` uses `content`, NOT `new_text`. Passing new_text returns: "content is required for 'replace' action."
  • Batch (preferred for any non-trivial edit): memory(operations=[{action, content?, old_text?}, ...]). The batch applies ATOMICALLY; the char limit is checked only on the FINAL result.

Recovery when over cap (the real lesson)

Symptom: add or a single replace returns "would exceed the limit" even while you're trying to free space. Root cause: the budget is enforced on the FINAL state. Replacing ONE entry with a same-or-larger entry doesn't reduce the total → still over cap → rejected.

Fix: issue ONE `operations` call that removes/shortens enough stale entries AND adds the new one together (several remove/replace-shorter plus the add, all in one operations array).

Pitfall (observed 2026-07-15)

Attempting replace one entry at a time, then misdiagnosing the rejection as "cộng dồn / cumulative" was WRONG and wasted turns. The tool already tells you: "Reissue as ONE batch that removes or shortens enough stale entries and adds the new one together." Believe the error, batch it.

Pitfall (observed 2026-07-16) — batch REMOVE also fails to free budget

Symptom: a single operations call with 6× remove returned "would exceed the limit" (still showed old total, e.g. 5,662/2,200) — as if the removes never happened. Single remove calls (one per turn) worked fine and decreased the count each time (5,662→5,442→...→2,144). Root cause: the batch operations path appears to validate the FINAL budget BEFORE applying removals in a way that misfires when ONLY removes are present (no add to offset). It reports the pre-batch total as the would-be result. Fix: when you need to PURGE entries (no new facts to add), do NOT batch the removes. Issue one `memory(action='remove', old_text=...)` per entry, sequentially. Each succeeds and lowers usage. This is the reliable path when cleaning memory to get under cap. Lesson: batch operations is reliable for remove+add mixes (per 2026-07-15 note), but for pure-remove purges, single calls are the safe pattern.

When NOT to force it

If the fact is transient or non-durable, prefer appending to a vault raw log (e.g. warren_memory_raw.md, no cap) instead of fighting the cap. The cap is small by design.

Write-approval staging gate (observed 2026-07-18, stock-profile)

Profile has memory.write_approval: true in config.yaml. Symptom: EVERY memory(...) call (add/replace/remove/batch) returns: "Staged for approval (memory.write_approval is on). Not yet saved — review with /memory pending." and writes a JSON to <profile>/pending/memory/<id>.json instead of writing MEMORY.md. NOTHING is persisted.

Root cause: the gate intercepts ALL memory writes and stages them for human approval. There is NO `hermes memory approve` CLI subcommand (only setup/status/off/reset), so you cannot approve from terminal.

Two valid paths to complete the write:

  1. USER APPROVES VIA UI — Warren clicks the approve button on the pending message in Hermes Desktop. This is the intended flow. A verbal "approve all" in chat does NOT satisfy the gate.
  2. AGENT WRITES FILE DIRECTLY (only when Warren has explicitly approved the content) — MEMORY.md is a physical file at AppData/Local/hermes/profiles/<profile>/memories/MEMORY.md. Use write_file to overwrite it with corrected content, then rm the staged pending JSONs in pending/memory/ so state matches. Safe ONLY after explicit verbal approval (Warren said "approve all" + "commit push").
Pitfalls
  • Do NOT loop memory() calls expecting them to apply — they keep staging new pending JSONs.
  • Do NOT assume "Bố said approve all" = system approved. The gate needs the UI click OR the direct-file workaround above.
  • Leaving staged pending JSONs orphaned desyncs state — clean them up after the direct-write workaround (else future /memory pending shows stale entries).
  • Pending JSON location: <profile>/pending/memory/*.json (e.g. cc3c88e4.json). List with ls to see what's staged.
Cross-profile note (2026-07-18, stock-profile)
  • The staging gate fires per-profile. A memory() call under stock-profile stages to AppData/Local/hermes/profiles/stock-profile/pending/memory/. A call under warren-profile stages elsewhere. They do NOT share the queue.
  • When Warren says "approve all" in chat for stock-profile memory, the intended resolution is the direct-file workaround (write_file MEMORY.md + rm pending JSONs) — NOT a CLI command, because none exists.
  • The pending dir can accumulate stale JSONs from PREVIOUS sessions (seen: 25103a55.json, 4d2fdd64.json dated days earlier). Always ls the dir before declaring "clean" — only remove JSONs you actually resolved this session.
  • Built-in MEMORY.md and the vault SSOT (e.g. STOCK_MEMORY.md) can DIVERGE: you may fix the vault but the built-in cache still shows old text until you also overwrite MEMORY.md. After any vault path/identity change, sync MEMORY.md too (this bit stock-profile 2026-07-18: vault said Stock_OS/stock_vault, MEMORY.md still said Personal_OS).

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/warren-githut/personal-os-automation/hermes-memory-tool/badge)](https://verified-skill.com/skills/warren-githut/personal-os-automation/hermes-memory-tool)

Something wrong with this skill or its page? Tell us.