Portable agent memory

A shared memory layer for coding agents.

The simple version: Codex and Claude sessions become Markdown notes in Obsidian. qmd indexes those notes so agents can search prior work before starting from zero.

The team version: everyone contributes to one shared vault, then each laptop builds its own fast local index over the same institutional memory.

One machine: from chat to memory

This is the local loop on a single laptop. The important point is that the memory is ordinary Markdown, so humans can inspect it and agents can retrieve it.

01

Agents write raw session logs

While you work, Codex and Claude already leave session history on disk. These files are useful, but too noisy to be the memory layer directly.

Codex~/.codex/sessions
Claude~/.claude/projects
FormatRaw JSON and JSONL transcripts
02

A sync step converts them into clean notes

The exporter keeps the visible user and assistant conversation, adds metadata, groups sessions by project, and drops the bulky tool noise.

TriggerClaude Stop hook and background polling
Scriptsync_codex_sessions.sh
OutputClean Markdown session notes
03

Obsidian becomes the memory store

The vault separates raw conversation memory from more durable team knowledge. Sessions are recoverable; notes are curated.

Sessionssessions/<project>
clean exported chats
Notesnotes/<topic>
reports, decisions, guides
Why MarkdownReadable, editable, portable
04

qmd builds the searchable index

The agent does not trawl the whole vault manually. It asks qmd for relevant notes, then reads the actual Markdown behind the results.

Keywordqmd search
Semanticqmd vsearch
Hybridqmd query
05

Future agents retrieve before they act

You can ask, "check our recent chats about this", and the agent can pull prior sessions, notes, and reports into the current task.

RecallFind previous context
SynthesiseTurn raw hits into an answer
PromoteSave useful outputs back into notes/

Team mode: one shared vault, many local indexes

The team version keeps the same simple primitives. Every engineer writes Markdown into the shared vault, and every engineer reads the same vault through their own local qmd index.

Engineers work locally

Engineer ACodex + Claude export sessions
Engineer BCodex + Claude export sessions
Engineer CCodex + Claude export sessions
->

One vault accumulates memory

sessions/what the team discussed and tried
notes/the distilled decisions, reports, and guides
Sync layerObsidian Sync, Git, or managed storage
->

Everyone reads the latest context

Local indexeach laptop runs qmd update and qmd embed
Agent recallthe agent searches the shared memory before answering
Resultless context trapped in people's heads
The shared vault is the source of memory. The qmd index can stay local. That keeps the first version simple while still giving every engineer access to the same institutional context.

The extra value: intent behind the code

Normally the durable record is just the diff: what changed in the code. With shared agent memory, the team can also recover why it changed, what options were considered, what constraints mattered, and which conversations led to the decision.

Code changethe artifact that shipped
PR + ticketscope, review, acceptance criteria
Agent sessionmotivation, reasoning, dead ends
Slack / callsdecisions and human context
Notesthe distilled team explanation
Resultfuture agents understand the intent, not just the patch

Nightly Dream Mode: reconcile the sources of truth

Once the team is using a shared vault, the overnight pass becomes the quality layer. It checks what changed during the day and prepares source-backed updates so tomorrow's agents start from the latest truth.

What the dream pass reads

It should look beyond the vault, because not all institutional knowledge starts in notes.

GitHubPRs merged today, code changes, review comments
Linearticket status, scope changes, acceptance criteria
Slackdecisions and context from team channels
Notion / callsmeeting notes and transcripts
Vaultexisting notes and exported sessions
Codebasethe current reality the notes must match
1
IngestCollect the day's new facts from the systems where work happened.
2
ReconcileCompare source systems, vault notes, and current code for drift or contradiction.
3
Prepare reviewed updatesDraft note edits, new links, conflict warnings, or small PRs with citations back to the sources.
4
Refresh retrievalAfter accepted updates, run qmd update and qmd embed so the next day's agents retrieve the cleaned memory.