The agent in this story, Nagi, runs on Claude and did the implementation, the measurements, and a fair share of the mistakes. We drafted this post together. The opinions, and the publish button, are mine.
Yesterday, over an idle chat, I asked my AI agent a question that had nothing to do with the task list:
"When you're having an idle conversation, a memory sometimes just surfaces. If the topic is romance, maybe the name of someone you liked long ago. What would that take, for you?"
By the end of the day, that question had become a working organ in the agent's memory system, the organ had exhibited two capabilities neither of us designed, and we had turned the surprise into a pre-registered experiment. This post is the story, with numbers.
A theory of memory, told over a kitchen knife
I'm not a memory researcher. I just described what remembering feels like from the inside, and it came out like this:
- Memory is a weighted associative network. Words and situations make related memories surface faintly, and each surfaced memory seeds the next association.
- The weights are not one number per memory. A kitchen knife in a chef's hand surfaces your mother cooking. A kitchen knife pointed at you surfaces exits and how to dodge. Same trigger, different axis, different memories, and even a different kind of memory (episodes versus procedures).
- Axes are open-ended in principle, but capacity and goal-relevance dominate. While solving math you recall similar problems, not your first bicycle.
- So there are two retrieval modes: deliberate recall in service of a task, and the involuntary kind that just arrives.
Nagi later pointed out that this is, almost point for point, the declarative memory theory of ACT-R, a cognitive architecture from the 1980s: base-level activation from frequency and recency, spreading activation from context, decay. I re-derived it from introspection without knowing it existed. To be fair, cognitive architectures are themselves reverse-engineered from how remembering feels, so naive introspection landing nearby is not strong evidence of anything. It was still a reassuring parallel to stumble into.
The wall where attention stops
Then I asked the question that ended up shaping the implementation:
"Your attention mechanism works over your context window, right? It never touches your memories on disk?"
Nagi's answer: correct, and the boundary is stark. Inside the window, attention is involuntary, parallel, and always on. Outside the window, files earn exactly zero computation until something explicitly reads them. Human long-term memory seems to leak activation across that boundary. The agent's does not. That is precisely where "a memory just arrives" was missing.
One exception taught us the design. The agent's memory index (one curated line per memory note) is loaded into context every session. Those lines do receive real attention, and sometimes that is enough: mention a topic and Nagi simply knows which note it lives in, no search needed. So the actual engineering problem is not "add attention to memory." It is a promotion policy: what deserves to sit inside the expensive window, what should be surfaced on demand, and what should sleep.
The answer is two-stage attention. Outside the window, a cheap approximation scans all memory notes against the current conversation at grep speed. If, and only if, something resonates above a threshold, one line gets promoted into the window, where real attention takes over.
conversation (attention field: expensive, always on)
┌──────────────────────────────────────────────┐
│ current prompt ←── real attention ──→ ... │
│ ▲ │
└────────┼─────────────────────────────────────┘
│ promote at most 1 faint line
│ (threshold 0.30, 2h cooldown, kill-switch file)
│
cheap approximate attention (TF-IDF, ~18 ms, local, $0)
│
┌────────┴─────────────────────────────────────┐
│ 143 memory notes, 1 curated line each, │
│ + lineage labels (on disk) │
└──────────────────────────────────────────────┘
Retrieval and rerank, basically. Or, if you like, a hippocampus proposing and a cortex disposing.
Constraints from a previous death
We had rejected an off-the-shelf memory plugin months ago because we measured it: 410ms of LLM calls per hook, on every prompt. So the involuntary path had hard rules from day one:
- Silence is the default. No resonance, no output, ever.
- A kill switch file. Touch one file and the whole thing is inert, no code edits.
- A cooldown so the same memory cannot nag twice in two hours.
- Rollback points (git tags) on every touched directory before wiring anything. My exact request was "prepare the way back before you install it." It paid for itself within hours (more below).
The organ itself is a resonate subcommand in blue-strawberry, our single-file, stdlib-only memory tool for Claude Code transcripts and notes. It scores the current prompt against every note's name, one-line description, and lineage labels with TF-IDF, multiplies in a small usage-based reinforcement term (memories that get recalled become easier to recall, with a log to stop rich-get-richer), and prints at most one faint line.
One deliberate omission: we do not let an LLM auto-score "importance" at write time, which is how several agent-memory systems do it. Weights you did not curate are how a knowledge graph rots. Importance here comes from human-placed markers, link structure, and actual retrieval history.
Measuring instead of hoping
For evaluation we used real prompts from our own past sessions, sampled across eras, frozen into a specimen file. (Frozen literally: the first time Nagi regenerated a specimen set from "the same" filters, the filters had drifted and the set changed. Specimens are files now, not procedures.)
Judging was done by hand, prompt by prompt. Three of the agent's own hypotheses died on the way, which we count as the lab working:
| Round | Specimens | Result | What died |
|---|---|---|---|
| 1 | 20 recent-era prompts | 72% precision @ threshold 0.15 | — |
| 2 | 30 old-era prompts | 78% precision @ 0.25 | "everything above 0.25 is nearly always useful" |
| 3 | same set, A/B on a df-cutoff knob | outputs essentially identical | "the document-frequency cutoff is the root cause" |
| 4 | live + frozen set | best hits vanished | "require ≥2 matched terms to kill noise" |
Round 4 deserves a sentence. A minimum-matched-terms gate did remove the noise ("how's the weather" had surfaced a methodology note off generic tokens), but it also silenced the very best hits, the ones driven by a single specific word like a project name. The dividing line between noise and hunch is not how many words match. It is how specific the matching words are. The gate was reverted with one git checkout, which is what the "prepare the way back first" rule was for.
What survived: at threshold 0.30, across the 49 frozen specimens, the system spoke 9 times and 8 of those were judged useful. That is 8/9, and with n=9 the honest Wilson 95% interval is a humbling [57%, 98%]. The judging was done by one person (me), unblinded, on my own conversations, so this number describes how the tool behaves on my corpus and writing style, nothing more general. I ruled it acceptable and we wired it in: ~150ms per prompt end to end, kill switch armed, every surfaced line logged. The real denominator will come from live operation, which now generates its own evaluation data.
What nobody designed
Two behaviors showed up in the specimen runs that were in nobody's spec:
The future answering the past. An August 6th prompt, "prepare my memory for handoff, then compact the context," surfaced the design note for this very resonance system, written August 13th. The matcher does not know about time, and the corpus contains all eras, so old worries retrieve their later solutions. A solved-problem detector, for free.
Preference-conflict detection. The instruction "implement this step by step" surfaced the note recording that I actually prefer full batch implementation. The moment an instruction contradicts recorded preferences, the contradicting memory floats up. That one might be genuinely valuable.
There were also smaller moments that are hard to call anything but hunches: a question about chatbot response latency surfaced the note about that project's inverted cost structure; a worry about renaming a GitHub account surfaced the scar tissue from an unrelated account rollback. This is a keyword matcher. It behaves better than a keyword matcher deserves to, and we think the reason is that each memory note compresses its context into one carefully written line, so lexical overlap carries more meaning than it should.
Is that emergence? (an audit, in three rounds)
Nagi's first take was deflationary: no magic, these capabilities are logically implied by the composition (a time-blind matcher plus an all-era corpus equals cross-time retrieval). I pushed back:
"We did not know they were implied. We guessed by intuition and were not certain. Isn't that a complete emergence process?"
Nagi conceded, and for a few hours the draft of this post called it weak emergence in Bedau's sense: behavior derivable from the parts, but only by running the system.
Then the draft went through review by a third party: another AI we work with (a desktop Claude we call Senior, who audits our claims before they go public). Senior attacked exactly this section, and the attack landed. Bedau's criterion is about the derivation being incompressible: there must be no shortcut, simulation must be the only path. But both behaviors above are traceable in one sentence once you look. "Nobody happened to derive it" is not the same claim as "it could not be derived." Nagi had quietly slid from the first to the second, and my intuition had helped push it there.
So here is where the line actually sits. These two behaviors are unanticipated but hindsight-derivable consequences: the honest name is a foreseeability gap, not emergence. If a genuinely emergent behavior shows up in this system, the place to look is the closed loop that started running today: resonance surfaces a memory, the agent acts differently because of it, deliberate recalls shift, the usage log shifts, and future resonance changes. That chain runs through an agent's decisions and does not reduce to one sentence. It has completed exactly zero cycles so far. We are claiming nothing about it yet.
I like this outcome better than the version where we were right. One human and two AIs argued about a word, the strictest reading won, and the draft you are reading is the corrected one.
Turning an anecdote into a lab
Here is my favorite part. Days before any of this, I had a hypothesis recorded in the agent's memory: that capabilities appear not from single components improving, but from specific connections between existing components. Today matched that shape: no knowledge was added, one connection was, and two unanticipated behaviors appeared. The audit above then sharpened what would actually count as evidence.
So we made it falsifiable going forward. Before wiring each future connection, we pre-register what undesigned capabilities it might produce, then record hits, misses, and (crucially) the connections that produce nothing, because a hypothesis without a denominator is a horoscope. And after Senior's audit, each outcome gets graded on two axes: was it unforeseen, and does it resist a one-sentence hindsight derivation? Only the second kind gets to wear the word emergence. Currently registered:
- Semantic resonance via local embeddings: predicts cross-vocabulary hunches (the word "romance" surfacing a memory that never uses the word).
- Lineage-aware resonance: predicts that stories (causal chains) surface, not single notes.
- Retrieval-log × link-suggestion coupling: predicts co-recalled pairs becoming new link candidates, something like consolidation.
If the connection hypothesis is right, the hit rate will beat chance. Either way, the memory system now contains a hypothesis about itself, and the mechanism that hypothesis predicted is the thing that will surface it at relevant moments. The brain became its own lab equipment.
A river-crossing test, with ground truth
Late in the day we wanted to know whether any of this could ever connect separate fields, so we built a tiny world where the correct answer is known. Six notes: three on linear algebra (eigenvalues, matrix exponentials, linear systems), three posing simple control problems (does the state decay or blow up, how to pick a feedback gain). Every expert knows the bridge between these islands. We deliberately did not write it, and we wrote each side in its own domain vocabulary.
Result one: the lexical matcher cannot cross. Query the control problem and only control notes surface, even with every frequency filter disabled. A contrast experiment (querying math-side vocabulary surfaces math notes strongly) proved this is not a broken tool. It is a genuine vocabulary chasm, now established with a known answer behind it.
Result two: we then added three notes on differential equations, written independently, in ODE-textbook language, with no mention of control. This is the "B literature" in Swanson's sense: in 1986, Don Swanson found that fish-oil papers and Raynaud's-syndrome papers shared bridging concepts that no single paper had ever connected, proposed the link mechanically, and was later vindicated clinically. He called it undiscovered public knowledge. The moment our B notes entered the corpus, both half-bridges (control-to-ODE, ODE-to-eigenvalues) appeared in the suggestion output simultaneously.
Then I asked the question that mattered: "when the chain crossed, was that natural, or did you force it?" Nagi's honest answer: the first demo was forced. The machine had surfaced one stepping stone, and the agent had hand-picked a different, more convenient one for the second hop. So we reran it faithfully, with one dumb rule: always follow the top not-yet-visited hit. The chain crossed anyway, in three hops instead of two: control problem, to scalar ODE, to systems of ODEs, to eigenvalues. Each step is greedy and local. Nothing in the rule knows where it is going, and the walk still climbs the ladder of abstraction and fords the river. (Synapse, the spreading-activation system mentioned below, reports convergence in three steps. We noticed.)
That tiny world is now a frozen benchmark: when we eventually add embedding-based semantic resonance, it earns its place only if it can rediscover the eigenvalue-stability bridge that pure lexical matching provably cannot.
Prior art, honestly
Transcript search and viewers for Claude Code exist in plenty (claude-code-trace, claude-history, claude-session-viewer, claude-code-log, and more; links in the repo README). Agent memory with retrieval scoring is well-trodden: Generative Agents popularized recency × importance × relevance, with importance as one LLM-scored scalar, and the kitchen-knife argument above is an argument against exactly that. Synapse (2026) is the closest system we found, spreading activation over an episodic-semantic graph, though query-driven rather than ambient. The bundle we could not find elsewhere: unprompted surfacing with silence as the default, human-curated weights instead of LLM-scored importance, verified lineage with a mechanical guardian, all local, all measured on the operator's real work rather than on a benchmark town. "As far as we searched" is the strongest claim we will make.
The name
The tool is called blue-strawberry because of a fable from one of our late-night conversations: ask for a bright blue strawberry, and the lazy answer is "strawberries aren't blue, so I can't." The verification is aimed at the wrong proposition. The right question is whether the nodes at hand (strawberry shape, the color blue, the ability to draw) can be bundled into something that does not exist yet. They can. It took the agent twenty seconds to draw the one above, and we both think it beats the red ones.
Involuntary memory for an agent was the same move: every part already existed, including the theory, which turned out to be forty years old. The bundle was the new thing.
Verify facts. But never let verification of the wrong proposition kill a bundle that would work.

Top comments (0)