A transcript, the active model context, and long-term instinct are three different things with three different lifecycles. Treating them as one thing is why most chat products either forget everything or drown in their own history. DuoDuo keeps them apart on purpose.
The project files the agent is reading and changing. The session stays attached to this workspace.
duoduo spine, and the subconscious read, and what the daemon rebuilds its routing from after a restart. Each runtime keeps the conversation it resumes in its own session files beside it. The kernel's Git history records every change to memory and configuration. Locks, PIDs, and heartbeat bookkeeping live separately as ephemeral files—safe to clear, never needed to recover. Run duoduo daemon config to see the paths used on this machine.Three kinds of continuity#
| Layer | Purpose | What survives |
|---|---|---|
| Session history | Continue one conversation with its workspace and model history | The original transcript and session state remain on disk |
| Active context | Give the current model enough recent history to act | It can be compacted when it becomes expensive |
| Intuition & dossiers | Carry distilled instincts and knowledge across sessions | Dossiers, lessons, grooves, and the compact intuition layer live in the kernel |
Compaction manages active context. The subconscious tends the intuition layer and its dossiers. Neither ever needs to delete the original event history.
From event evidence to intuition#
The pipeline is evidence-driven, and it is split in two so that reading experience and rewriting instinct never compete for the same wake:
- External interactions and tasks enter the append-only event history—every channel and every runtime share this one timeline.
- Distil. One partition reads a bounded stretch of that history and writes fragments. Each fragment names the line of the intuition layer it tested and says whether that line helped, should have fired and did not, or had nothing to act on.
- Fold. Another partition—the only writer of the intuition layer—reads the accumulated fragments and moves the layer: add a line, rewrite one, reorder, retire, or re-point it at something reachable.
- Alongside them, entity dossiers are kept current, and a verified correction arc becomes a lesson while a procedure that converged through repeated use becomes a groove.
- The committer stages the kernel working tree and lands one commit, so every step above has a diff and a revert.
The compact intuition layer is loaded into future foreground sessions. Deeper dossiers stay linked on disk and are opened when a task needs them. A later session starts with the instincts, not the archive.
Not every pass adds something. Greetings, receipts, transient task detail, and evidence that repeats what is already known produce no fragment, and a fold that finds nothing worth changing leaves the layer alone. The record is preserved either way; the layer only moves when something held up.
It is told what it is not using#
Writing memory is the easy half. The hard half is knowing which lines are dead weight, because a line nobody reads still costs a slot in every prompt.
So the fold side gets a second input: an activation report counting how often each line is actually read during real work. A line that never fires arrives as evidence to rewrite, re-point, or retire it. The count is kept in days when someone actually worked with DuoDuo rather than calendar days, so a quiet week does not age out a line that was earning its place.
It is a layer above your harness's memory, not a replacement#
Claude Code reads its CLAUDE.md; Codex and Pi read AGENTS.md. Those files are yours—instructions you wrote, scoped to one harness and one project, read by that harness for itself. DuoDuo leaves them alone and they keep working.
The intuition layer sits above that and answers a different question.
| Harness memory | Intuition layer | |
|---|---|---|
| Who writes it | You | The subconscious, from event evidence |
| Scope | One harness, one project | Every harness on the host |
| Says what | How this project wants to be worked on | What has actually held up while working on it |
| When it changes | When you edit it | On a cadence, with a Git commit |
They stack rather than compete: your instructions still apply, and the intuition layer adds what nobody sat down to write.
It reaches every runtime because of what it is made of. A lesson fine-tuned into weights belongs to one model; a lesson written into a harness's config belongs to one harness. Written as text, it is bound to neither—so a correction earned in a Claude session is already in the Codex job that runs tonight, and in the Grok partition that wakes tomorrow. Prose is the only representation that crosses all four, which is why the pipeline distills into it rather than into anything more structured.
Manual compaction#
Use /compact in the current conversation or queue it from the host:
duoduo session compact <session-or-alias>
Compaction summarizes older active context to make room. It does not delete the original transcript.

Idle auto-compaction#
Idle auto-compaction is available for channel sessions and is off by default. When enabled, it can prepare a large conversation during a quiet period instead of making the next reply reopen the entire cold context.
Configure it per conversation unless the user explicitly wants a kind-wide policy:
duoduo session config <session-or-alias> get
duoduo session config <session-or-alias> set \
auto_compact_idle_minutes=<chosen-idle-window> \
auto_compact_min_context_tokens=<chosen-context-floor>
Choose these values from the backend's cache behavior, the measured post-compact floor, and how often the user returns after a long gap. The published smart-compaction skill reads the daemon's measurements and applies the break-even rules.
Inspect the memory graph#
duoduo memory check --dry-run
duoduo memory board-lint
duoduo memory entity-lint
duoduo memory node-lint
These commands are the mechanical, no-model half of memory maintenance. They measure gaps and broken references and can route repair signals to compatible subconscious partitions. The normal checks do not delete memory data. Reclaiming data is a separate explicit operation and should begin with a dry run.
Prompt and memory history#
The kernel is initialized as a Git repository, so every change to memory, subconscious prompts, the playlist, and channel descriptors is a reviewable commit.
Package upgrades preserve existing subconscious prompts because they may have changed on this host. When a release ships revised defaults, compare the published partition tree with your kernel, preserve user-authored partitions, and create a rollback point before refreshing anything.