Skip to content

4.9.3 - memories get a shape, and opinions become updates

Choose a tag to compare

@MaxFreedomPollard MaxFreedomPollard released this 28 Aug 22:26
· 32 commits to main since this release

Memories now carry a kind, fact or opinion, and storing an opinion is an update before it is ever an insert.

Opinions are updates first, memories second

Storing with kind="opinion" makes the vault look for the live opinion the new one revises, before anything is written. A restatement writes nothing at all: re-saying a preference re-affirms the record that already holds it and refreshes its currency. An overlap or a contradiction is refused blind filing: the live record comes back, old wording in view, and the caller resends with supersedes=[its id] to replace it, sends a merged text to keep parts of both, or passes supersedes=[] to deliberately hold both. Only when nothing similar exists does an opinion go in as a first memory.

The alternative works against the user precisely where memory should help most: fast-moving work makes and discards preferences quickly, a coding project is rarely finished the way it was started, and a vault that filed each passing stance as a fresh fact would keep answering with ones already abandoned.

What gets replaced is retired, never erased. A superseded record leaves search, recent and both indexes, but stays readable by id, points at its replacement, and keeps its place in the journal and audit chain, so the vault still tells the story of what was believed when. Deleting or expiring a replacement brings back what it superseded rather than stranding history behind a pointer to nothing.

Facts update and expire through the same machinery: a correction stored with supersedes=[the old id] retires the record it replaces, and a fact whose last true day is known passes expires (a date, or 14d / 2w / 3m / 1y) and is cleared when that day has gone.

Ranking leans the same way. An opinion's recency decays on a 30-day half-life from its last re-affirmation, at three times the weight a fact's recency carries, so the current stance on a subject outranks a stale one even before anyone reconciles them.

One claim per memory, enforced

A memory is one claim of at most 200 characters (the max_memory_chars setting), and the store now refuses anything else: over-limit text, lists, headings, paragraphs and "recorded in the guide"-style narration all bounce with an error that says exactly how to split, because several facts belong in memory_store_many, one record each. Asking for this shape in instructions was measured not to work: against a real vault the median agent-written memory ran 1,938 characters of headed, bulleted session log. Enforcement in code is what keeps retrieval sharp, one claim per record meaning one meaning per vector, and it is also what lets the opinion similarity bands mean anything at all. Capture and restore paths, the conversation hooks, imports and pack installs, still store verbatim, because they carry text nobody is free to rephrase. Related facts are still usefully associated, we just had to make it quicker.

Retrofitting an existing vault

compartment atomize lists every over-limit record for your agent to split, then applies the plan with every piece keeping the original's own dates and source, the blob superseded but readable by id. compartment opinions audit backfills kind on opinion-shaped records, clusters overlapping live opinions within each namespace, and resolves them keep-newest on request, or reports them for a subtler merge.

Every surface teaches the same rules

The MCP tools carry the new kind and supersedes parameters, with kind as a schema enum, and memory_store_many validates a whole batch before storing any of it, so a bad entry refuses by index instead of leaving half a batch behind. A refused store returns a corrective error naming the fix for the surface it came from. The Hermes plugin gains kind and supersedes, its instruction layer and the /compartmentalize skill teach the one-claim rule, and the server's handshake instructions shrank to roughly half now that the store enforces what they used to plead.

Upgrading

Existing vaults open unchanged: records without a kind read as facts, nothing is re-embedded, and no memory is touched until you choose to run the curation passes.

Downloads

Artifact For
Compartment-4.9.3.pkg macOS, one click, with the optional menu bar utility
Compartment-4.9.3.dmg macOS, drag to Applications
compartment-4.9.3-py3-none-any.whl pip / offline installs, any OS
compartment-4.9.3.tar.gz source distribution, packagers, air-gapped builds

Or, for the CLI and MCP server without the app:

pip install compartment