How DOS remembers

The memory model: MemPalace, auto-memory, sessions, PRDs, and the knowledge graph — what persists, what doesn't, and why.

Claude Code forgets everything when a session ends. DOS does not.

Two kinds of memory

  • Conversation context — what the model is holding right now, in this session, inside its attention window. Fast, rich, lost the moment the session compacts or closes.
  • Persistent memory — what survives sessions. Lives on disk. Searchable. Must be explicitly retrieved to come back into attention.

DOS cares about the second one. Everything on this page is about persistent memory — the part that keeps your work coherent across weeks and months.

The write and read paths

Rendering diagram…

MemPalace — the Pack that remembers

MemPalace is the DOS Pack for persistent semantic memory. It turns "what did we decide about auth six weeks ago" into a single tool call.

Two things raw file search cannot do:

  1. Semantic search over an embedded vector store (ChromaDB). A drawer filed as "switched to bcrypt for credential hashing" surfaces for "what's our password strategy" even though the words do not overlap.
  2. A temporal knowledge graph (SQLite-backed) storing entity-relationship facts with validity windows. You can ask when a decision was made, what it superseded, and what depends on it.

Storage has a shape: Wing → Hall → Room → Closet → Drawer. A Wing is a project or domain. A Hall is a memory type. A Room is a named idea. A Drawer holds verbatim content, never summarized. Tunnels connect Rooms across Wings.

Auto-memory — captured without asking

Most of what DOS remembers is captured automatically by Hooks. You file nothing by hand.

At ~/.claude/projects/{project-slug}/memory/ DOS keeps a per-project memory directory routed by category: User, Feedback, Project, Reference.

Seven hooks keep it alive:

  • MemoryHarvest — SessionEnd, extracts decisions and facts from the transcript.
  • CorrectionDetector — UserPromptSubmit, catches real-time corrections before harvest.
  • MemPalaceLearn — files learnings into the project's Wing on SessionEnd.
  • MemPalaceRate — records ratings as temporal facts in the knowledge graph.
  • MemPalaceWakeUp — SessionStart, injects L0+L1 (identity plus top-15 critical drawers) into context.
  • MemPalaceStop — auto-checkpoints every 15 messages.
  • MemPalacePreCompact — emergency-saves before context compaction.

What this buys you

Close a session, come back next week, and the first response of the new session already knows who you are, what you are working on, and what you decided last time. No prompt engineering required.

Sessions and PRDs

Alongside MemPalace, DOS writes a PRD per Algorithm run at MEMORY/WORK/{slug}/PRD.md. The slug is a timestamped kebab-case description, so runs are sortable and readable.

Each PRD contains the task, effort tier, current phase, ISC checklist with pass/fail state, decisions, and verification evidence. Plain markdown with YAML frontmatter — you can grep it with any editor or hand it back to DOS to resume an interrupted run. The PRD is written live during the run, and the model writes it directly. No hook ever writes to a PRD.

The knowledge graph layer

MemPalace exposes its KG through MCP tools prefixed mempalace_kg_*: query, add, invalidate, timeline, stats. You will not call these directly — the MemPalace Skill and its Workflows (Search, Mine, SyncTelos, Status, Explore, Classify) wrap them into outcome-shaped commands. They are there when you want to script against your own memory.

What is not remembered (on purpose)

DOS does not try to remember everything. By design, the system drops raw tool output, intermediate reasoning traces compacted mid-session, full transcripts (only harvested decisions and facts survive), and anything you mark ephemeral. The goal is high-signal recall, not a full audit trail. Claude Code already keeps the transcript if you need it.

The mental model

Three layers:

  • Session — what the model is holding right now. Disappears when the session ends.
  • Project — per-project auto-memory directory plus the project's MemPalace Wing. Survives sessions, scoped to one project.
  • Global — global MemPalace Wings (learnings, ratings, TELOS). Survives sessions, spans projects.

SessionStart hooks hydrate the relevant slice of project and global memory into context. SessionEnd hooks harvest what mattered back into the layers below. In between, you do your work — DOS remembers on your behalf.

Was this page helpful?