Skip to main content

Module memory

Module memory 

Source
Expand description

ORCH-12 — the memory noun at the OBSERVED tier: read and search the persistent cross-session memory documents a harness keeps on disk.

supercode never runs a memory engine (charter). There is no index, no embedding, no ranking here: show opens the files the harness’s own loader opens and reports them; search is a plain substring (or, opt-in, a regular-expression) scan over those same files. Every mutation — hermes memory off, openclaw memory forget|reset, Claude Code’s /memory — stays the harness’s own verb.

Three harnesses have a memory store at the pinned versions, each read from its own primary source:

  • Claude Code — the Claude-maintained per-project auto-memory directory <claude home>/projects/<encoded-cwd>/memory/: a MEMORY.md index plus one file per topic (docs/composable-harness/inventory/claude-code.md §2 “Auto memory”, docs:memory#auto-memory). The directory is keyed by the enclosing git repository and shared across its worktrees, so the project is resolved from the repo root of cwd. Relocation via the autoMemoryDirectory setting is NOT modelled; name a relocated directory directly with profile (an absolute path is accepted).
  • Hermes 0.21.0get_memory_dir() is get_hermes_home()/"memories" holding MEMORY.md (the agent’s own notes) and USER.md (what it knows about the user) (tools/memory_tool.py:55-57, hermes_cli/web_server.py memory-status endpoint, both at tag v2026.7.20). Profile mode points HERMES_HOME at <root>/profiles/<name>, so every profile home is read the same way. The root-level MEMORY.md/USER.md names Hermes’s own profile export manifest lists (hermes_cli/profiles.py:238) are read too, so an install that still keeps them there is not silently empty.
  • OpenClaw 2026.7.1-2 — the bundled memory-core extension’s memory files are, verbatim from its own classifier (extensions/memory-core/src/memory/qmd-manager.ts:156-165 at tag v2026.7.1-2), MEMORY.md, DREAMS.md/dreams.md, and everything under memory/ — all relative to the AGENT WORKSPACE ([openclaw_workspace], transcribed from resolveAgentWorkspaceDir). openclaw memory search is that extension’s own door over the same files; supercode reads the files rather than shelling out, so no gateway or index is required.

Codex, opencode and pi have no memory store at the pinned versions (docs/composable-harness/inventory/orchestration.md row 14 — pi is config-only), so they are refused with MemoryError::UnsupportedHarness, never answered with an empty list.

Structs§

MemoryDocument
One memory document, as one harness holds it.
MemoryMatch
One line of one memory document that matched a search.
MemoryQuery
harness.v1.memory.show request.
MemorySearchQuery
harness.v1.memory.search request.

Enums§

MemoryError
Read-only memory failures.
MemoryScope
Which config home a memory document belongs to, in the vocabulary shared by all three harnesses.

Constants§

MEMORY_HARNESSES
Harnesses with a memory store supercode reads, in product order. Every other harness id is MemoryError::UnsupportedHarness.
MEMORY_SCHEMA
Stable row schema shared by Rust, JSON-RPC, the SDKs, and the CLI.

Functions§

search_memory
Search the same documents show_memory reports, line by line.
show_memory
Read the memory documents the query selects.
supports_memory
Whether supercode reads a memory store for this harness.