ClawMem

ClawMem — Release Notes

For upgrade instructions (migration steps, opt-in features, verification commands), see docs/guides/upgrading.md. This file is the chronological feature record, newest first.


v0.10.4 — Profile-aware setup openclaw + --help short-circuit (issue #11)

v0.10.4 fixes yoloshii/ClawMem#11. Two bugs reported by @elquercarlos:

  1. clawmem setup openclaw ignored OPENCLAW_STATE_DIR and OpenClaw’s --profile flag. Pre-v0.10.4 hardcoded ~/.openclaw/extensions/clawmem and never consulted env vars or OpenClaw’s own destination-resolution logic. Users running OpenClaw with a non-default profile (e.g. ~/.openclaw-dev) got the plugin installed in the wrong directory, where their active profile couldn’t see it.
  2. clawmem setup openclaw --help ran setup instead of printing help. The handler had no argv short-circuit for --help / -h.

Both bugs close on this release. Vault on disk is byte-identical to v0.10.3. No schema changes, no env-var changes for default-profile users, no retrieval-pipeline or hook changes. Pure bun update -g clawmem upgrade.

cmdSetupOpenClaw — three-path install (§28.1)

The setup command now picks one of three paths at runtime:

The faithful-mirror resolver matches OpenClaw exactly, including the asymmetry where OPENCLAW_STATE_DIR / OPENCLAW_CONFIG_PATH apply only .trim() (so OPENCLAW_STATE_DIR="undefined" is a literal directory name) while home-resolution env vars filter the literal strings "undefined" / "null" (matching OpenClaw’s home-dir.ts:normalize). Diverging here would mean the delegated path and the fallback path install into different locations for the same env, which is exactly the bug class §28.1 set out to fix.

--remove — legacy-compatible uninstall

clawmem setup openclaw --remove now tries openclaw plugins uninstall clawmem --force first (when the CLI is available) and falls back to manual cleanup at the resolved extensions path. The fallback runs in two cases:

  1. CLI uninstall fails (typically because the install was a legacy unmanaged direct-copy from pre-v0.10.4 ClawMem and isn’t tracked in OpenClaw’s plugin install records). On failure, ClawMem warns the user that OpenClaw config and install records may still need manual repair, then runs the manual cleanup. We do not silently mask managed-uninstall failures.
  2. CLI uninstall succeeds (managed install). Even on success, ClawMem then checks the exact extensions/clawmem path and removes any remaining symlink or directory — a “constrained stale cleanup” that handles the side-by-side case of a managed-link install plus a leftover unmanaged-copy directory from an earlier ClawMem version.

--help / -h short-circuit (§28.2)

cmdSetupOpenClaw short-circuits --help / -h at the top of the handler before any spawn or filesystem work and prints the full flag + env-var reference. Documents: --link (with separate behavior in delegated load-path mode vs filesystem-symlink fallback), --remove, env vars consulted (OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_PATH, OPENCLAW_HOME, HOME, USERPROFILE), and example invocations including the headline OPENCLAW_STATE_DIR=~/.openclaw-dev clawmem setup openclaw.

Verification

The change set was validated against four turns of GPT-5.5 high-reasoning adversarial code review (cumulative ~292K tokens) under codex exec. All findings — three HIGH (delegated-install auto-enable messaging, idempotence-via---force, legacy-compatible --remove), two MEDIUM (resolver fidelity, real-stub-binary integration tests), two LOW (assertion tightening, main --help line) — were addressed before final clearance. The Turn 4 verdict was an explicit “zero remaining concerns, ready to ship v0.10.4.”

Test coverage: 8 unit tests (tests/unit/openclaw-paths.test.ts) on the resolver helpers, including precedence (OPENCLAW_STATE_DIR over OPENCLAW_CONFIG_PATH), tilde expansion, OPENCLAW_HOME priority, os.homedir() failure → cwd fallback, and the asymmetric "undefined" / "null" literal handling that mirrors OpenClaw exactly. 6 integration tests (tests/integration/setup-openclaw.integration.test.ts) exercise the real subprocess boundary via a per-command shell stub on a sandboxed PATH: copy mode passes --force and not -l; link mode passes -l and not --force; install failure aborts (no silent fallback to direct copy); --remove with a managed install runs CLI uninstall AND constrained stale cleanup; --remove with a legacy install falls back to manual cleanup with the user-visible warning; CLI absent honors OPENCLAW_STATE_DIR in direct-copy mode. Two further integration tests prove the dual next-steps messaging differs between paths and that --help short-circuits before the openclaw --version probe.

What didn’t change

Cross-references


v0.10.3 — A-MEM parser hardening for noisy llama-server output (PR #7) + batched doc maintenance

v0.10.3 is a small patch release. The retrieval pipeline, composite scoring, vault format, hook set, agent tool surface, OpenClaw plugin registration shape, and Hermes plugin contract are all unchanged from v0.10.2. The release hardens the A-MEM JSON parser against a class of noisy llama-server outputs that v0.10.2 mishandled (parser silently picked an example/schema literal over the real payload, link-generation batches got zeroed when the LLM under-delivered), and bundles four sitting-in-tree doc updates that were waiting for the next release.

Vaults from v0.10.2 are byte-identical at rest. No schema migration. Default behavior is byte-identical for users whose llama-server outputs were already parsing cleanly — the parser only changes what it returns on inputs that previously fell through to repair paths or to zeroed link batches. Pure bun add -g clawmem upgrade.

A-MEM parser hardening (PR #7 by @cymkd / Veljko Simakovic)

The pre-PR parser had two real-world failure modes when the llama-server LLM emitted prompt-shaped prose alongside the real payload:

  1. Prose-balanced literal won over the real payload. When the model echoed phrases like Return empty array [] if no structured facts found. before the real fenced JSON answer, the parser locked onto the prose [] and returned it as the result. Conversation-synthesis runs that included the actual prompt wording in the assistant context exhibited this regularly. After the fix, the later real payload wins via a precedence order that walks all parseable balanced JSON candidates in source order, prefers payload-cued candidates (Actual:, Result:, Final answer:, Answer:), then avoids example-cued (example, e.g., schema) and inline-prose literals, then falls back to the first candidate. parseJsonCandidate now searches forward for a later line-start [/{ when the first balanced candidate sits behind an example cue or at a non-line-start position with no payload cue. extractJsonFromLLM tightens its precedence so that outside-of-fences JSON before a preferred json fence requires a payload cue rather than winning by virtue of position.
  2. Link-generation under-delivery zeroed the batch. The pre-PR generateMemoryLinks enforced an all-or-nothing completeness gate: if the LLM returned 4 valid links for a 5-neighbor prompt, or repeated a target_idx, or referenced an out-of-range index, the entire batch was discarded and 0 links were created. After the fix, partial-valid insertion semantics are restored: a 5-neighbor prompt with 4 valid returned links inserts 4 rows. Duplicate target_idx entries are logged (Skipping duplicate link target N) and skipped after the first valid link for that neighbor. Out-of-range entries are logged (Skipping out-of-range link target N) and skipped instead of aborting already-valid links. The commit message includes the directive “Do not reintroduce all-or-nothing link generation without corpus measurements” to lock the contract.

Item-shape validation in parseLinkGenerationFromLLM (src/amem.ts:55,99) is unchanged and continues to reject malformed items strictly (missing fields, wrong types, non-finite confidence, bad relation type, non-positive/non-integer target_idx) before they reach the insert loop.

The PR went through three adversarial review rounds: Turn 1 surfaced 3 findings (1 HIGH on the prose-precedence behavior + 2 Medium on the under-delivery zeroing path and a sanitization edge), Turn 2 confirmed Findings 2-3 fixed and surfaced 1 HIGH on a regressed prose-fence ordering case + 1 MEDIUM on an un-flagged completeness gate that wasn’t parser-level. Turn 3 verified both Turn 2 findings fixed (cymkd ran an independent GPT-5.5 high-reasoning pass before pushing the Turn 2 follow-up commit) and surfaced 2 LOW findings deferred to a future release (see below).

Two known LOW limitations deferred to v0.10.4+

Both LOWs were surfaced by the Turn 3 GPT-5.5 high-reasoning review pass and are explicit-acceptance candidates per the contributor’s own “intentionally broad for this repro; can be tightened later” framing:

  1. Outside-JSON-before-json-fence precedence change. The new outsidePrecedesPreferredJsonFence gate causes raw line-start JSON before a non-example json fence to lose to the fence. Repro: [{"key":"real"}]\n followed by a json fence containing [] parses as []. Real behavior change from “first raw JSON wins,” but the affected pattern is narrow — well-formed raw payload immediately followed by a non-example json fence is uncommon in observed llama-server output, and the broader fix the gate enables (the prose-before-fence repro above) is the more frequent failure mode.
  2. schema cue breadth. hasExampleCueBefore recognizes schema alongside example and e.g. to fix the reported Schema: {...}\n[{...real...}] repro, but the substring match is broad enough to suppress real fenced payloads following phrases like Schema validation result:. A tighter schema: / json schema: boundary regex would close the false-positive without losing the original repro coverage.

Both will be addressed in the next release with measurement-backed fixes — either tightening the heuristics with a corpus-measurement pass over real llama-server output, or accepting them with regression tests locking in the new contract. That decision belongs with the data, not this PR.

Batched doc maintenance (rides this release per option-(a) standing direction)

Four user-facing doc updates that accumulated in the working tree across the v0.10.2 → v0.10.3 window, all from in-session OpenClaw delta surveys:

Per the option-(a) standing direction these doc updates do not justify a release on their own; they ride PR #7 which is the next real-functionality release.

External credit

Test coverage

PR #7 adds five new regression tests in tests/unit/amem.test.ts covering: prose [] before a fenced real payload, the actual conversation-synthesis prompt wording echoed before a fenced payload, prose schema object before a later real raw array, parseLinkGenerationFromLLM parsing the later real link array instead of the schema object, and generateMemoryLinks inserting a valid partial batch while skipping duplicate/out-of-range targets.

Targeted suite: 107 pass / 0 fail / 220 expect() calls across the three test files (was 102 pre-PR; +5 new tests).


v0.10.2 — Configurable remote LLM endpoints + doc maintenance

v0.10.2 is a small patch release. The retrieval pipeline, composite scoring, vault format, hook set, agent tool surface, and OpenClaw plugin registration shape are all unchanged from v0.10.0/v0.10.1. The release adds three opt-in env vars for users running ClawMem against OpenAI-compatible remote LLM proxies, fixes a /v1 URL-doubling edge case in the remote LLM transport, and applies two small doc updates that were sitting in the working tree.

Vaults from v0.10.1 are byte-identical at rest. No schema migration. Default behavior is byte-identical for users with no new env vars set — same hard-coded qwen3 model, same /no_think suffix, same request body field order, same http://localhost:8089/v1/chat/completions URL. Pure git pull upgrade.

Configurable remote LLM endpoints (PR #8 by @DrJsPBs)

The remote LLM transport in src/llm.ts previously hard-coded model: "qwen3" and the /no_think prompt suffix in the /v1/chat/completions request body. That worked for the QMD native combo (qmd-query-expansion-1.7B on :8089 via llama-server) but blocked anyone wanting to point ClawMem at an OpenAI-compatible proxy with a different model name or at a non-Qwen endpoint that treats /no_think as literal prompt text. v0.10.2 adds three opt-in env vars to make all three knobs user-configurable while preserving the existing defaults exactly:

Env var Default Effect
CLAWMEM_LLM_MODEL qwen3 Model name sent in the request body. Override for OpenAI-compatible proxies (e.g. gpt-5.4-mini).
CLAWMEM_LLM_REASONING_EFFORT (unset, field omitted) Optional top-level reasoning_effort field for Chat Completions endpoints that support it. Validated against the enum none / minimal / low / medium / high / xhigh; unsupported values log a warning and are ignored. Leave unset for llama-server / vLLM unless your serving stack explicitly accepts the field.
CLAWMEM_LLM_NO_THINK true Append /no_think to remote prompts. Set false for standard OpenAI models and other endpoints that reject or treat the Qwen-style suffix as literal prompt text.

The settings are threaded through both plugin layers:

/v1 URL doubling fix

The pre-PR transport posted to ${remoteLlmUrl}/v1/chat/completions unconditionally. If a user set CLAWMEM_LLM_URL=https://api.example.com/v1 (a common shape for OpenAI-compatible proxies that document their base URL with /v1 already included), the request went to https://api.example.com/v1/v1/chat/completions and 404’d. v0.10.2 introduces buildRemoteChatCompletionsUrl() which strips trailing slashes, detects an existing /v1 suffix, and only appends /chat/completions in that case. All four shapes now resolve correctly: http://host, http://host/, http://host/v1, http://host/v1/.

Validation centralization

normalizeRemoteLlmReasoningEffort() is now the single normalization point for the reasoning-effort value. Previously the env-bootstrap path did its own .trim().toLowerCase() + Set check and the constructor did nothing — so a direct caller passing LlamaCpp({remoteLlmReasoningEffort: " HIGH "}) would have posted "reasoning_effort":" HIGH " to the endpoint while the env path correctly normalized it to "high". The constructor now calls the helper for both paths, so env and direct config behave identically. CLAWMEM_LLM_MODEL is also trimmed at both surfaces (defense-in-depth — whitespace-padded values from .env-style configs no longer post "model":" gpt-5.4-mini ").

Doc maintenance

Two small doc changes that were sitting in the working tree from the v2026.4.18 / v2026.4.16-920 changelog surveys ride this release:

External credit

Test coverage

PR #8 adds three new test files:

Targeted suite: 97 pass / 0 fail / 171 expect() calls across the three files (was 92 pre-PR; +5 new tests).


v0.10.1 — Hermes agent_context isolation + OpenClaw v2026.4.18 / Hermes v2026.4.16+ doc maintenance

v0.10.1 is a small patch release. The retrieval pipeline, composite scoring, vault format, hook set, agent tool surface, and OpenClaw plugin registration shape are all unchanged from v0.10.0. The release covers two upstream changelog reviews against the OpenClaw and Hermes runtimes ClawMem integrates with — neither produced any breaking changes — plus one correctness fix in the Hermes plugin and a small set of doc updates that keep the public-facing surfaces aligned with the runtimes users are actually running.

Vaults from v0.10.0 are byte-identical at rest. No schema migration, no new env vars, no new dependencies. Pure git pull upgrade for Claude Code users; clawmem setup openclaw re-run is optional (no plugin code changes that affect runtime behavior); Hermes users on a non-primary agent_context (subagent, cron, flush) get a quiet correctness improvement.

Hermes Agent — agent_context isolation in src/hermes/__init__.py

Hermes’s MemoryProvider ABC docstring is explicit: “Providers should skip writes for non-primary contexts (cron system prompts would corrupt user representations).” Hermes’s run_agent.py passes an agent_context kwarg to every MemoryProvider.initialize() call with one of "primary", "subagent", "cron", or "flush". Pre-v0.10.1 the ClawMem plugin absorbed the kwarg via **kwargs and ran the full lifecycle for every context — including writing transcript turns and running decision-extractor / handoff-generator / feedback-loop / precompact-extract on cron and subagent passes. The vault’s saveMemory dedup limited the blast radius, but the cleaner answer is the one the ABC asks for.

v0.10.1 honours the contract. The plugin now reads agent_context in initialize() and gates only the write-side surfaces; the read-side surfaces still run for every context so non-primary agents continue to benefit from retrieval:

Surface Direction agent_context != "primary"
session-bootstrap (in initialize) Read Runs
prefetch() / queue_prefetch() (context-surfacing) Read Runs
system_prompt_block() Read Runs
Agent tools (REST: clawmem_retrieve etc.) Read Runs
sync_turn() (transcript append) Write Suppressed
on_session_end() (extraction trio) Write Suppressed
on_pre_compress() (precompact-extract) Write Suppressed

When the active context is non-primary, initialize() logs a single info-level line for operator visibility:

clawmem: agent_context=cron — reads enabled, writes suppressed

Net effect: subagents and cron agents read the vault as before; they no longer write back into it. For installs that run only agent_context="primary" (the default for interactive CLI / Telegram / Discord platforms), behavior is unchanged.

Hermes Agent — preferred install path now $HERMES_HOME/plugins/clawmem/

Hermes #10529 (in v2026.4.13+) added user-plugin discovery: plugins/memory/__init__.py now scans $HERMES_HOME/plugins/<name>/ in addition to the bundled hermes-agent/plugins/memory/<name>/. Both paths still work; the user-plugin path is preferred because it survives git pull of hermes-agent and avoids the dual-registration trap that previously caused duplicate tool names with strict providers. Discovery heuristic = grep __init__.py for register_memory_provider or MemoryProvider; both already present in src/hermes/__init__.py. README.md Install + Setup blocks, docs/guides/hermes-plugin.md, CLAUDE.md, AGENTS.md, and SKILL.md now lead with the user-plugin path and document the bundled path as a still-supported alternative.

OpenClaw v2026.4.18 — three relevant changes (all compatible)

A v2026.4.11 → v2026.4.18 changelog survey (1,794 commits) ran against ClawMem v0.10.0’s plugin. Verdict: no breaking changes. Three changes touch surfaces ClawMem consumes; all are documented in this release:

on_memory_write deliberately not opted into

Hermes #10507 added an on_memory_write bridge to the sequential tool execution path; the commit message names ClawMem as a beneficiary. v0.10.1 deliberately stays opted out. ClawMem’s filesystem watcher already indexes Hermes’s MEMORY.md / USER.md if those files live under a configured collection — layering an on_memory_write shell-out on top duplicates filesystem watching and introduces a remove-semantics mismatch (a hook event saying “this entry was removed” cannot be cleanly translated into ClawMem’s content-addressed vault). The docs/guides/hermes-plugin.md lifecycle table now documents this rationale instead of the prior “future” framing.

v0.8.4 retroactive credit

### External credit subsection added to v0.8.4 in this file naming @saschabuehrle (Lemony.ai founder) for PR #6 (fix/issue-5). The PR was closed-as-superseded on 2026-04-11 because v0.8.4 ended up shipping the broader auto-install fix, but the gateway-restart-before-slot-assignment insight is preserved verbatim in v0.8.4’s printed next-steps and the code comment that documents the constraint. Matches the v0.10.0 ### External credit precedent set for @withx. The credit landed in the working tree before the v0.10.1 cut and rides this release.

Test coverage

No new tests in v0.10.1 — the agent_context guard’s behavior is observable only against a live Hermes runtime, and the rest of the release is documentation. Full v0.10.0 baseline holds: 1204 pass / 0 fail, 2339 expect() calls across 66 test files.


v0.10.0 — OpenClaw Pure-Memory Migration (§14.3) + v2026.4.11 Packaging Fix

v0.10.0 is the OpenClaw pure-memory migration. ClawMem’s OpenClaw plugin is no longer a kind: context-engine plugin wrapping a ClawMemContextEngine class. It is a kind: memory plugin that wires every lifecycle event (before_prompt_build, agent_end, before_compaction, session_start) through OpenClaw’s plugin-hook bus directly. This matches the direction OpenClaw’s own context-engine slot has taken since v2026.4.x (narrowed to runtime compaction) and moves ClawMem to the slot it was always logically targeting: the exclusive memory slot, alongside memory-core and memory-lancedb (which it automatically displaces when enabled).

Why this matters — dual plugin surfaces across OpenClaw and Hermes

Over the last year, the OpenClaw and Hermes maintainers independently converged on the same architectural split: agent runtimes expose two distinct plugin surfaces, one for memory (persistent, cross-session, retrieval-first) and one for context engines (in-session, lossless or lossy compression, compaction-first). Hermes shipped its MemoryProvider ABC from the start, and ClawMem has always been plugged in there correctly — as a memory provider. OpenClaw’s plugin kind vocabulary took longer to stabilize, with context-engine originally broad enough to accommodate both roles, then narrowing through v2026.4.x to what it is today: runtime compaction / compression specifically.

Under the stabilized definition, ClawMem is a memory layer, not a context engine. A memory layer maintains a durable index of prior sessions, decisions, and knowledge and serves them back into new conversations via retrieval. A context engine reshapes the live session window: compressing old turns, summarizing transcripts, handing off between models. These are different jobs on different time axes. Calling ClawMem a “context engine” was accurate for the ClawMem-as-OpenClaw-plugin wiring pre-v0.10.0 only because no other slot existed yet. Post-v0.10.0 it is misleading in both directions: it mislabels what ClawMem does, and it blocks OpenClaw users from pairing ClawMem with a genuine context-engine plugin (e.g. an LCM-compression plugin like lossless-claw) because the two would fight over the same slot.

On v0.10.0, OpenClaw users get the same composability Hermes users have had all along:

Both can be enabled at the same time. They do not overlap. The memory slot is about what you knew yesterday; the context-engine slot is about what fits in today’s prompt. This is the end state the OpenClaw maintainers have been steering toward for several releases, and v0.10.0 is ClawMem moving to the seat that was prepared for it. For Hermes users nothing changes — ClawMem has always been correctly integrated as a memory provider there.

What is unchanged

The retrieval pipeline, composite scoring, profiles, vault format, hook set, <vault-context> output, and the 5 registered agent tools are unchanged. No schema migration, no new env vars, no new dependencies. The vault on disk is byte-identical to v0.9.0. Claude Code users who do not run OpenClaw can upgrade with no action beyond git pull.

v0.10.0 also fixes a packaging bug that surfaced when OpenClaw shipped v2026.4.11. The new discovery path (readdirSync({ withFileTypes: true }) + dirent.isDirectory()) started silently skipping ClawMem’s symlinked plugin directory. Diagnosis, confirmation via an external user on yoloshii/ClawMem#5, and the complete fix (discovery manifest + copy-not-symlink install) are all in this release.

§14.3 — Pure-memory plugin registration

v2026.4.11 packaging fix (external report → yoloshii/ClawMem#5)

The packaging fix is co-resident with §14.3 because they are both in the same file and both required for v0.10.0 to run on the current OpenClaw release. The symptom was reported externally by @withx on a fresh install of OpenClaw v2026.4.11 + ClawMem — the plugin looked installed to every CLI command but never registered at runtime.

Test coverage

+2 regression gates on top of the v0.9.0 test baseline, locking in the v2026.4.11 packaging fix:

Public test suite: 1105 → 1107, zero regressions. The one pre-existing assertion in the Shipping Condition 2 — setup-time migration text is present suite was updated from "plugins.slots.memory clawmem" to "openclaw plugins enable clawmem" to match the new next-steps output shape.

VM 202 end-to-end validation

Captured on a representative multi-user install (VM 202: OpenClaw gateway runs as system user openclaw, ClawMem installed by admin user sciros, separate from himadmin):

[plugins] clawmem: plugin registered (kind=memory, bin=/home/sciros/clawmem/bin/clawmem, profile=balanced, budget=800)
[plugins] clawmem: registered 5 agent tools
[gateway] ready (7 plugins: acpx, browser, clawmem, device-pair, phone-control, talk-voice, telegram; 11.3s)

The runtime registration log line explicitly emits kind=memory, which is the §14.3 change proving the new registration path is live. The clawmem entry appears in the gateway ready line alongside the stock plugins, proving the packaging fix clears v2026.4.11’s discovery gate. The multi-user ownership check (suspicious ownership (uid=1001, expected uid=997 or root)) reproduced and cleared after sudo chown -R openclaw:openclaw ~/.openclaw/extensions/clawmem, which is now a documented step in docs/guides/openclaw-plugin.md for multi-user deployments.

Codex review

GPT 5.4 High, session 019d72d5 (continues the session chain used from v0.7.1 through v0.9.0, now cumulative across 20+ turns). The §14.3 implementation reached zero remaining findings before the v2026.4.11 packaging gap was discovered. Codex was re-engaged with the packaging compat delta (new package.json, copy-default cmdSetupOpenClaw, next-steps rewrite, +2 regression gates, VM 202 e2e evidence) for a final pre-ship pass, same session.

External credit

Upgrading from v0.9.0

v0.10.0 is drop-in safe for Claude Code users: cd ~/clawmem && git pull && systemctl --user restart clawmem-watcher.service. Nothing on the retrieval path changed.

OpenClaw users must also re-run clawmem setup openclaw (to switch the extensions dir from symlink to recursive copy), chown the new directory to the gateway user on multi-user installs, and restart the gateway. The full step-by-step is in docs/guides/upgrading.md. Upgrade OpenClaw to v2026.4.11+ first — v0.10.0’s setup and discovery behavior depend on v2026.4.11’s new plugin discovery contract.


v0.9.0 — <vault-facts> KG Injection + Session-Scoped Focus Topic Boost

Two context-surfacing upgrades. §11.1 adds a <vault-facts> SPO-triple injection block inside <vault-context> so the model gets structured “what is currently true about the entities in this prompt” alongside the existing <facts> (surfaced documents) and <relationships> (memory-graph edges) blocks. §11.4 adds a per-session topic steering lever (clawmem focus set "<topic>" --session-id <id>) that biases retrieval toward a declared topic for the duration of a working session without mutating any persisted state. Both changes live exclusively on the read path and are fail-open — the baseline pre-v0.9.0 <vault-context> shape is byte-identical when the new stages don’t fire, and every downstream stage (threshold, diversification, token budget, injection) is unchanged. v0.8.5 was the last feature release; v0.9.0 is drop-in safe: one idempotent expression-index migration, no breaking API changes, no required reindex/embed, no schema rewrites.

§11.1 — <vault-facts> knowledge-graph injection

§11.4 — Session-scoped focus topic boost

Codex review

GPT 5.4 High, session 019d72d5 (continues the session chain used from v0.7.1 through v0.8.5, cumulative ~7.5M tokens across 16+ turns). Design review cleared after 6 turns across both §11.4 and §11.1 together. Implementation reviews ran sequentially:

All nine design approvals from the design-phase review survived implementation unchanged (three-path extraction, validate-then-count ordering, cross-path entity-id dedup, longer-n-gram tie-breaker, stage placement after vaultInner, index migration safety, the four accepted design deviations).

Test coverage

+96 tests across the unit + integration layers on top of the v0.8.5 baseline:

Public test suite: 1025 → 1105, zero regressions. Skill-forge clawmem backport test suite: 1022 pass, zero regressions (53 files, smaller baseline because skill-forge has fewer test files overall).

Upgrading from a pre-v0.9.0 vault

v0.9.0 is safe to drop in — the only behavior change on existing code paths is the additive <vault-facts> block and the session-scoped topic boost, both gated on new state (entity seeds from the prompt and a per-session focus file). Everything else is unchanged:

Confirming the features are live:


v0.8.5 — SPO Triple Extraction Fix: KG Actually Populates Now

Fixes a bug cluster (BACKLOG.md §1.6) where entity_triples was stuck at zero rows on production vaults regardless of activity, making kg_query return empty for every entity and silently hollowing out the WHY / ENTITY graph-traversal paths in intent_search. Nine bugs across the decision-extractor → observer → entity-resolution → triple-storage pipeline were traced and fixed across four Codex review turns. The fix is entirely additive and strictly improves pre-v0.8.5 behavior — no schema changes, no API breaks, no required migration steps.

Adds +34 tests (tests/unit/spo-extraction.test.ts, 31 Turn-3 parser/entity/provenance + 3 Turn-4 collision-free persistence) on top of the v0.8.4 baseline. Public test suite: 1006 → 1025, zero regressions.

Upgrading from a pre-v0.8.5 vault

v0.8.5 is safe to drop in — the fix is additive across the board and nothing existing breaks:

Confirming the fix is live — after a real Claude Code Stop-hook-firing session, sqlite3 ~/.cache/clawmem/index.sqlite "SELECT source_fact FROM entity_triples ORDER BY created_at DESC LIMIT 5" should show human-readable subject predicate object strings (e.g. "ClawMem depends_on Bun"), not JSON blobs or schema-placeholder echoes.


v0.8.4 — OpenClaw Setup Auto-Install + Active Memory Coexistence Docs

Fixes the OpenClaw plugin setup workflow that caused issue #5 (“plugin not found: clawmem”). Patch release — no schema changes, no migration required.

No breaking changes. Existing users who previously ran the manual symlink steps are unaffected — setup openclaw detects the existing correct symlink and skips re-creation.

External credit


v0.8.3 — Content-Type-Aware Entity Cap + Self-Loop Guard + Docs Restructure

Two small safety/correctness fixes land alongside a major documentation restructure. Patch release — no schema changes, no migration required, no new env vars.

No breaking changes. Existing callers that don’t pass contentType get the default cap of 10, matching pre-v0.8.3 behavior exactly.


v0.8.2 — Dual-Host Worker Architecture

Both maintenance lanes can now be hosted by the long-lived clawmem watch watcher service in addition to the existing per-session clawmem mcp host. This makes the systemd-managed watcher the canonical 24/7 home for the v0.8.0 heavy maintenance lane — its quiet-window logic finally sees a live worker at the configured hours regardless of whether any Claude Code session is open. The light consolidation lane (Phase 1 backfill + Phase 2 merge + Phase 3 deductive synthesis + Phase 4 recall stats) now also acquires its own DB-backed worker_leases row before each tick, symmetric with the heavy lane’s existing exclusivity, so multiple host processes against the same vault cannot race on Phase 2 merges or Phase 3 deductive writes.

Adds +15 tests (9 light-lane lease unit + 5 cmdWatch fast subprocess + 1 cmdWatch slow subprocess) on top of the v0.8.1 baseline.

For operational guidance — enabling the workers via systemd drop-in, tuning intervals to your usage pattern, monitoring queries, and rollback steps — see docs/guides/systemd-services.md.


v0.8.1 — Multi-Turn Prior-Query Lookback

context-surfacing now builds its retrieval query from the current prompt plus up to two recent same-session prior prompts, so a short follow-up turn (“do the same for X”, “explain the rationale”) can still inherit the vocabulary of earlier turns. The raw prompt is persisted in a new nullable context_usage.query_text column so future hook ticks can reconstitute the multi-turn query from the DB. See multi-turn lookback for the full walkthrough.

Adds +27 tests (22 unit + 5 integration) on top of the v0.8.0 baseline.


v0.8.0 — Quiet-Window Heavy Maintenance Lane

A second, longer-interval consolidation worker that keeps Phase 2 + Phase 3 running on large vaults without starving interactive sessions. Off by default — set CLAWMEM_HEAVY_LANE=true to enable. The existing 5-minute light-lane worker is unchanged. See heavy maintenance lane for the architectural walkthrough.

Adds +56 tests (13 worker-lease + 35 maintenance unit + 8 maintenance integration) on top of the v0.7.2 baseline.


v0.7.2 — Post-Import Conversation Synthesis

Opt-in LLM pass that runs after clawmem mine finishes indexing an imported collection. Operates on the freshly imported content_type='conversation' documents and extracts structured knowledge facts (decisions / preferences / milestones / problems) plus cross-fact relations, writing each fact as a first-class searchable document alongside the raw conversation exchanges. See post-import synthesis for the architectural walkthrough.

Adds +63 tests (46 unit + 5 integration + 12 regression) on top of the v0.7.1 baseline.


v0.7.1 — Safety Release

Five independent safety gates around the consolidation pipeline and context surfacing, aimed at preventing contamination, cross-entity merges, and unchecked contradictions from landing in the vault. Every extraction ships with full unit + integration test coverage (+158 tests on top of the v0.7.0 baseline). See consolidation safety for the architectural walkthrough.


v0.7.0 — Recall Tracking with Per-Turn Attribution

Extracts recall tracking patterns from OpenClaw’s dreaming memory consolidation system. Tracks which documents are surfaced by retrieval, which queries surfaced them, and whether the assistant cited them — per-turn, not per-session. Validated by GPT 5.4 High across 8 review turns (2.6M tokens).

New files: src/recall-buffer.ts, src/recall-attribution.ts. Adds +36 recall tracking tests; 659 total passing.


v0.6.0 — Deductive Observations, Surprisal Scoring & LLM Remote Fallback

Consolidation worker gains a Phase 3 that synthesizes higher-order deductive observations from recent related facts. Introduces k-NN surprisal scoring for curator triage, embed-state tracking with retries, and a cooldown-based LLM remote fallback. Honcho deep analysis informed the deductive synthesis and surprisal patterns. GPT 5.4 Codex reviewed across 4 turns, 5.2M tokens. 623 tests passing.


v0.5.1 — Documentation Update

Clarified the LLM fallback description in README — transport vs HTTP error distinction, cooldown semantics, “silently falls back” language replaced with explicit cooldown mechanism description. No behavior changes.


v0.5.0 — Conversation Import & Broadened Observation Taxonomy

New clawmem mine CLI imports conversation exports from six different chat formats. Observation taxonomy expanded from a single “observation” type into four first-class subtypes. GPT 5.4 reviewed across 3 turns, 6 issues found and fixed (consecutive-assistant loss, unawaited writes, permissive plain-text detection, Slack multi-party handling, preference decay exemption, YAML escaping).


v0.4.2 — Gray-Matter Frontmatter Sanitization

Bug fix release. Resolves clawmem update crashes on Obsidian vaults with bare YAML dates or booleans in frontmatter.

gray-matter auto-coerces YAML values — title: 2023-09-27 becomes a Date object, title: true becomes a boolean. Bun’s SQLite driver rejects these as bind parameters with “Binding expected string, TypedArray, boolean, number, bigint or null”, crashing the indexer mid-run.

Affected frontmatter fields: title, domain, workstream, content_type, review_by — any field gray-matter can coerce.


v0.4.0 / v0.4.1 — Version Alignment

Version-number bumps only. No user-visible changes. Kept for npm release continuity between v0.3.4 and v0.4.2.


v0.3.1 — Native Hook Timeout

Bug fix release. Shell timeout wrappers killed hook processes with exit 124 (no stderr), producing Failed with non-blocking status code errors in Claude Code on every hook event.

v0.3.2 / v0.3.3 / v0.3.4 are version-number bumps only with no user-visible changes.


v0.3.0 — OpenClaw Compaction Delegation

OpenClaw compatibility release. Reviewed by GPT 5.4 High across 3 turns, 797K tokens.

OpenClaw v2026.3.28+ removed the legacy compaction fallback that compact() implementations with ownsCompaction=false were relying on. ClawMem’s OpenClaw plugin needed to delegate compaction to the runtime directly instead of returning compacted: false and expecting OpenClaw to fall back.

Without this fix, OpenClaw sessions never compact on v2026.3.28+.


v0.2.9 — Stop Hook JSON Output Requirement

Documentation-only release. Custom Stop hooks that exit 0 with no stdout cause Claude Code to report Failed with non-blocking status code: No stderr output. Documented the root cause and fix pattern in troubleshooting.md and setup-hooks.md.


v0.2.8 — Stop Hooks on Large Transcripts

Bug fix release. Stop hooks were hanging or OOM-ing on transcripts larger than ~10MB because readTranscript() loaded the entire file.


v0.2.7 — Patch Release

Minor fixes. No substantive feature changes beyond v0.2.6.


memory_pin, memory_snooze, and memory_forget now use a 4-stage search cascade instead of BM25-only, preventing No matching memory found failures when the document exists but BM25 fails on multi-term queries.


v0.2.5 — Hook SQLITE_BUSY Fix

Bug fix release. Hook SQLite busy_timeout was 500ms while watcher/MCP used 5000ms. During A-MEM enrichment or heavy indexing, watcher write locks exceeded 500ms, causing the hook’s DB open to fail with SQLITE_BUSY — surfaced as UserPromptSubmit hook error in Claude Code.


v0.2.4 — Watcher Inotify FD Exhaustion Fix

Bug fix release. The watcher used fs.watch(recursive: true) which registered inotify watches on every subdirectory, including excluded dirs (gits/, node_modules/, .git/). Broad collection paths like ~/Projects caused 200K+ file descriptors, hanging WSL and triggering inotify limit errors on Linux.

Diagnosis command added: ls /proc/$(pgrep -f "clawmem.*watch")/fd | wc -l — healthy watchers stay under 15K FDs.


v0.2.3 — Entity Extraction Quality Overhaul

Entity resolution pipeline rewritten with quality filters, type-agnostic canonical resolution, and IDF-based entity edge scoring. Addresses the v0.2.0 entity extraction quality issues flagged during a spot audit — prompts were producing title-as-entity extractions at 67% rate because the LLM echoed named examples from the prompt.


v0.2.2 — Entity Enrichment Idempotency

Bug fix release. Entity enrichment could double-count mentions or leave partial state on mid-run failures.


v0.2.1 — v0.2.0 Follow-up Fixes


v0.2.0 — Hindsight Pattern Integration

Seven patterns extracted from the Hindsight memory engine plus a memory nudge pattern from Hermes Agent, reviewed by GPT 5.4 High across three rounds. Introduces entity resolution, multi-path graph retrieval, temporal query extraction, 3-tier consolidation, observation invalidation, and memory nudges.

Migration required: Existing vaults upgrading from v0.1.x must run clawmem reindex --enrich to populate the new entity tables and trigger A-MEM enrichment on existing documents. reindex --force alone is NOT sufficient — the A-MEM pipeline skips entity extraction for update-path documents to avoid churn, so the --enrich flag is required to backfill. See docs/guides/upgrading.md and the troubleshooting entry on reindex --force after v0.2.0 upgrade shows no entity extraction for details.


v0.1.8 — Curator-Nudge Backport + Auto-Archive Lifecycle Hook


v0.1.6 — Watcher Session Transcript Exclusion

Bug fix release. The watcher was processing Claude Code session transcript .jsonl files as if they were memory documents, causing SQLite write lock contention that triggered UserPromptSubmit hook error on the context-surfacing hook. Watcher now excludes session transcripts explicitly (only .beads/*.jsonl is still processed).

v0.1.4 / v0.1.5 / v0.1.7 are version-number bumps with minor doc fixes (tool count correction 25 → 28, hook count fixes, manual hook config reference in setup-hooks.md, hook cold start latency notes, stale troubleshooting cleanup).


v0.1.3 — Adaptive Thresholds & Deep Profile Escalation

Context-surfacing moves from absolute score thresholds to ratio-based adaptive thresholds (Tier 1 of the adaptive threshold roadmap). Introduces budget-aware deep-profile escalation that spends remaining hook time budget on query expansion and cross-encoder reranking.


v0.1.1 / v0.1.2 — Initial Public Releases

First public releases to npm. Baseline feature set: