cerebral.work
an applied-research studio

the working thesis

context,
before
the prompt.

The dominant story about why AI coding agents fail is that the models aren’t smart enough yet. Watching real harnesses do real work, we think the failures cluster somewhere else: the wrong context is in the window. We build the system that decides what the agent sees — before the prompt ever runs.

Memory for agents is not a database problem and not a model problem — it’s a context management and injection problem. What gets loaded before the prompt, what gets evicted between turns, what gets consolidated overnight, what gets quietly thrown away.

Operating systems solved the analogous problem in the 1960s with a cache hierarchy. Brains solved it on a longer timescale with hippocampal consolidation. Neither used a single flat store — and neither do we. The mechanisms we borrow from cognitive neuroscience aren’t decorations; each one ruled out a shape the system might otherwise have taken.

reverie the memory layer

Coding agents forget — or remember the wrong thing. Reverie is the system that decides what an agent should remember, where to put it, and when to let it go: a placement-aware memory hierarchy, a derivability gate before every write, and an offline consolidation cycle modeled on hippocampal sleep.

the thesis →usage →project log →

cortex the operator console

A reverie mesh is a daemon, a memory store, and a shifting set of agent sessions doing real work. Cortex is the one console you drive it from — bring the mesh up, watch it live, gate what it is allowed to do. Reverie answers what an agent should know; cortex answers what the agents are doing, and what you are letting them do.

the console →

dreamcode the editor experiment

If memory were really solved, what would change about the editor? Dreamcode wraps every agent in reverie’s context — any backend inherits memory continuity — and exposes the daemon’s live activity as a first-class view. It turns out that being able to see the memory layer changes what people will trust it with.

the experiment →

fig. 1 — retrieval on the LoCoMo benchmark: 812 questions across five long-form conversations. The ablation compares reverie's full hybrid pipeline (BM25 + dense-vector RRF + cross-encoder rerank + HyDE) against its own hybrid baseline (RRF without rerank).

metric reverie + rerank hybrid baseline Δ
R@1 55.8% 51.7% +4.1pp
R@5 79.4% 75.5% +3.9pp
R@10 85.2% 84.0% +1.2pp
MRR 0.658 0.621 +0.037

Retrieval recall, not end-to-end answer F1. The cross-encoder rerank adds the most lift where the candidate set is deep. Full breakdown on the reverie page.

The cross-encoder rerank stage contributes the bulk of the lift: an LLM-based re-scorer reads the candidate set and re-orders by relevance, pulling items that lexical or dense search alone ranked below the fold. The RRF fusion that precedes it already catches vocabulary mismatch; the rerank tightens the ordering.

End-to-end F1, with judge agent, ships with the v1.0 milestone — targeted September 2026.