A field report · 4 chapters · 6 min

Four chapters
on giving agents
a memory.

How context evaporates, how a graph remembers, how a runtime briefs, and how four agents start sharing one mind.

Read time · 6 minScroll · cinematic
Scroll to begin
Chapter I · Amnesia

Context evaporates.

Every session, the same explanation. Every agent, a stranger to your codebase.

01
Monday, 9:14am

You open Claude. You describe your auth flow, your DB schema, your conventions. Token cost: 8,400.

02
Tuesday, 2:30pm

You open Cursor on the same repo. It knows nothing. You explain again. Token cost: 11,200.

03
Wednesday, 5:48pm

You hit Aider. Same explanation. Different LLM, same blank slate. Token cost: 9,700.

04
Thursday, 11:02am

You can't remember why you chose JWT over sessions. Neither can your agents. The decision is gone.

05
Friday

You've spent 29,300 tokens rebuilding what you already had. Context didn't compound. It evaporated.

CLAUDEMon · 09:14amcontext none8,400 tokno memory transferCURSORTue · 02:30pmcontext none11,200 tokAIDERWed · 05:48pmcontext none9,700 tokWHY JWT????decision // goneMEMORY // LOST29,300 tokens wasted · starting from zero, again
Chapter II · The Graph

A living map of your codebase.

Files, decisions, conversations. All connected. All remembered.

01
Index the repo

CodeOrch crawls every file. Builds an AST. Embeds every function. Indexes it across database, graph, and vector stores.

02
Connect the dots

Functions link to files. Files link to PRs. PRs link to decisions. Decisions link back to functions.

03
Capture decisions

Why JWT? Why this schema? Decisions get pinned to the nodes they touch, searchable, queryable, alive.

04
Grow on every PR

Every merge updates the graph. Every test adds a node. The graph only gets smarter.

05
Never forget

Memory isn't a chat history. It's a structured, queryable graph of everything your team has ever decided.

REPOAST · embedded · indexedauth.ts312 lines · filedb.ts88 lines · filedecisionJWT > sesspinned · searchableroutes.ts24 exportsPR #142merged · +89tests/17 specsmemoryindexed · never forget
Chapter III · The Pipeline

From task to PR, fully wired.

An agent claims a task. Two seconds later, it knows everything that matters.

01
Task created

A user, an agent, or an issue webhook drops a task into the queue. The queue logs it.

02
Agent claims

Any MCP-compatible agent claims it: Claude, Cursor, Aider. Claim is atomic. No collisions.

03
Briefing synthesized

Three parallel queries across graph, database, and vector store collapse into a 2–6k token briefing. ~2 seconds.

04
Agent ships

Surgical context in, code out. Pre-checks skip files that already exist. Review gate scores 7 metrics.

05
Graph updated

The decision, the diff, the dependencies, all indexed for the next task. Memory compounds.

01Task Createdpostgres02Agent Claims · MCPbegin()Briefing Synthesized28,400tok · raw codebase3,184tok · briefing−89% compression · ~2 secondsAgent Shipstwo_factor.py +118session.py +24/-6test_2fa.py +62Graph Updated+1 memory · diff indexed · decision captured
Chapter IV · The Hive Mind

Four agents. One brain.

Claude, Cursor, Aider, different tools, same context. One discovery becomes everyone's context.

01
The shared graph

Every agent reads from the same memory. No tool is a stranger to your codebase.

02
Agent A claims auth/*

Claude takes the 2FA task. The graph locks auth/* against collisions.

03
Agent B claims api/*

Cursor takes the rate-limit task. Different files. No conflict. They work in parallel.

04
Discoveries propagate

Claude finds a bug in the JWT signer. Writes it to the graph. Cursor picks it up automatically.

05
Review gate

Both PRs hit the gate. 7 metrics, A–D grade. Pass → ship. The graph remembers everything.

GRAPHshared brain · always liveCLAUDEagent Aauth/* lockedCURSORagent Bapi/* lockedJWT signer bug foundClaude writes → graph → Cursor picks upREVIEW7 metrics · grade Aauto-PR opened · ship

The end of amnesia.

You read it scroll by scroll. Now build it task by task.