Repository navigation
Description
Environment
- hermes-agent 0.16.0
- Docker Compose deployment (
nousresearch/hermes-agent:latest) - Interface: TUI / dashboard chat (slash commands routed through
tui_gateway.slash_worker)
Summary
Running /memory approve <id> (or /memory approve all) from the TUI/dashboard chat window always returns memory store unavailable, so pending memory writes can never be approved from that surface. Pending entries pile up in ~/.hermes/pending/memory/ and never reach MEMORY.md / USER.md.
The underlying memory store is healthy — applying the same pending records against a freshly loaded MemoryStore works fine. The bug is purely in how the TUI slash-command handler obtains the store.
Steps to reproduce
- Run Hermes with
memory.write_approval: true. - In a chat, let the agent stage one or more memory writes (they land in
pending/memory/). - In the TUI/dashboard chat, run
/memory approve all. - Output:
Failed:...<id>: memory store unavailablefor every entry.
Expected
Pending memory writes are applied to MEMORY.md / USER.md, same as the messaging-gateway path.
Actual
Every approval fails with memory store unavailable; nothing is persisted.
Root cause
There are two /memory handlers, and they obtain the MemoryStore differently:
- Messaging gateway (works) —
gateway/slash_commands.py(_handle_memory_command, ~L2192) builds a fresh store before delegating:store = MemoryStore() store.load_from_disk() out = handle_pending_subcommand(wa.MEMORY, args, memory_store=store, ...)
- CLI / TUI (broken) —
hermes_cli/cli_commands_mixin.py(_handle_memory_command, L1409) relies on a live agent's in-memory store:store = getattr(self.agent, "_memory_store", None) if getattr(self, "agent", None) else None out = handle_pending_subcommand(wa.MEMORY, args, memory_store=store, ...)
In the tui_gateway.slash_worker context the HermesCLI is built for slash-command serving (tui_gateway/slash_worker.py:114), so either no agent is built yet or it is initialized without a memory store — agent._memory_store defaults to None (agent/agent_init.py:1111, only populated at L1125 when memory is enabled and skip_memory is false). With store = None, _apply_one hits the guard and returns the error (hermes_cli/write_approval_commands.py:145-146):
if subsystem == wa.MEMORY:
if memory_store is None:
return False, "memory store unavailable"Suggested fix
Mirror the gateway handler: when self.agent._memory_store is unavailable, construct a fresh on-disk store instead of passing None. e.g. in cli_commands_mixin._handle_memory_command:
store = getattr(self.agent, "_memory_store", None) if getattr(self, "agent", None) else None
if store is None:
from tools.memory_tool import MemoryStore
store = MemoryStore()
store.load_from_disk()(The store persists to the same MEMORY.md / USER.md, so a fresh instance is safe.)
Workaround
Set memory.write_approval: false so memory writes persist directly and bypass the broken approval surface.
Activity
[-]/memory approve fails with "memory store unavailable" in TUI/dashboard chat[/-][+][BUG] /memory approve fails with "memory store unavailable" in TUI/dashboard chat[/+]alt-glitch commentedon Jun 16, 2026
Duplicate of #46783 — same root cause: the CLI/TUI
_handle_memory_commandinhermes_cli/cli_commands_mixin.pyobtains the store viagetattr(self.agent, "_memory_store", None), which is None in the slash-worker/no-live-agent context, tripping the "memory store unavailable" guard. The fix (fall back to a fresh on-diskMemoryStore()like the gateway path) is tracked there (open fix PR #46926).