A robot lies on a charging cradle in a dark server room, an emerald network shaped like a brain floating above its head

A second brain that improves overnight

I want to give my second brain the ability to dream, to improve itself while I’m asleep. If it only stores what I give it, I still have to do all the maintenance. It spends the night making connections between notes and reviewing the day’s work for lessons worth keeping.

Finding connections among existing notes helps me bring earlier thinking into a new problem. The capture loop searches what I’ve already written and connects a new idea when it arrives. A nightly pass looks for connections among notes that nothing new has touched.

What sleep does to memory

Revisiting the day’s work helps my second brain keep lessons for later. During deep sleep, the brain replays the day’s memories and moves them from the hippocampus, where they land first, to the cortex, where they’re stored for the long term. When researchers blocked that replay in rats, the rats remembered less. The replay also helps turn memories of individual events into more general patterns, and fits new memories into existing ones.

I look for redundant notes to prune, taking inspiration from how sleep turns connections down. A day of learning strengthens connections across the brain, and one theory holds that sleep scales them back down so the brain can keep learning. In one study in mice, synaptic contact areas were about 18% smaller after sleep, with the largest synapses spared. Most of the connections they measured shrank by about the same proportion. Another found that REM sleep pruned some newly formed connections and kept others, again in mice.

The nightly pass also looks for connections between notes. In one experiment, more than twice as many people discovered a hidden rule in a task after a night of sleep. REM sleep has also been found to help combine information that wasn’t associated before. Replaying related memories appears to strengthen what they have in common.

Keeping time for my mind to wander

I want AI to handle the operational work while I keep incubation. In my post about why AI can’t have shower thoughts, I described how my ideas come while I’m away from a problem. That’s my brain’s default mode network, and it’s active when my mind wanders.

Incubation isn’t only sleep. Stepping away from a problem helps most with open-ended problems I’ve already put real effort into, and a light task during the break can help more than rest. In one study, people who did an undemanding task between attempts got much better at problems they’d seen before, and the gain tracked how much their minds wandered.

With my second brain able to dream, I want it to give me connections to review in the morning, so those connections give me something to think about while my mind wanders, helping me come up with new ideas.

Reviewing agent memory changes

Anthropic launched a Dreaming feature that reads saved memory and past conversations, then writes a new, reorganized copy of that memory. It can merge duplicates, replace stale or contradicted entries, and surface insights. The original stays intact, so a person can review the new copy or discard it.

Microsoft’s SkillOpt-Sleep also implements a way for a person to approve the changes an agent proposes during sleep. It reviews records of agent sessions and proposes updates to the agent’s instructions.

Letta’s dreaming changes memory directly, with an optional review by the agent itself before applying changes. The obsidian-second-brain project lets its nightly agent edit notes without waiting for a person to approve each write.

I want proposed rewrites of my notes and instructions to wait for my review.

The risk of rewriting memory unattended

When an AI rewrites its memory, it writes a new summary, and the next rewrite summarizes that summary. Research on this found that after many rounds, the memory drifted toward what the model expected a good lesson to sound like, away from what actually happened. In one small test, a model that could solve a set of puzzles with no memory at all failed more than half of them once its memory had been rewritten again and again from the correct solutions. Keeping the original records, unchanged, did as well as or better than every rewriting approach tested.

Memory can also be poisoned. In an attack called MemGhost, a single email with hidden instructions got AI agents to write false memories into their own long-term memory. If something like that ends up in my notes or session logs, a nightly pass could follow those instructions.

I want to accumulate improvements alongside the original records, keeping earlier versions I can return to.

The three passes my second brain runs while dreaming

First, a link pass makes sure the notes are properly linked. If a note already names a concept, this pass turns that mention into a wikilink. I keep it deterministic and narrow, using exact multi-word mentions and leaving the wording alone. Those links apply automatically.

Second, a connection pass looks for connections between notes, the way sleep helps link memories. It picks notes at random, reads them together, and checks whether there’s a relationship between them that makes sense. Picking at random reaches notes I haven’t opened in months, the ones no search of mine would bring up because nothing I’m working on points to them. The connection I’m hoping for is the kind I described in Recall: two notes written in different situations, about different things, that turn out to be connected somehow. Near-certain connections apply automatically, the uncertain ones wait for my review, and the rest are dropped.

Third, a Kaizen pass, for continuous improvement, reviews the day’s session logs, the transcripts of my conversations with agents. It proposes updates to my guides (I keep guides instead of skills in my second brain). A correction from today’s session can become a lasting instruction in a guide, which is how I move lessons into long-term memory. Those changes wait for my review alongside the uncertain connections, with the session evidence attached.

I keep a ledger, a log of every link decision, so a rejected link doesn’t come back as a new suggestion the next night. It records the notes involved, the reason for the link, and whether it was applied, held for review, or rejected.

Opening the second brain in the morning

In the morning I have the uncertain connections and guide changes waiting in my inbox, with automatic links already recorded. I review each proposal against the notes and quoted session logs. I don’t want to approve a change just because the output looks fine, without reading what changed.

I review and approve pruning duplicate guides and redundant material, inspired by sleep turning connections down. But before approving a removal, I carefully read what would disappear, with the earlier version kept in the history.

Sometimes I see a connection between two of my notes that I didn’t know was possible. I read them together, see whether it makes sense, and, maybe, that triggers a new idea in my first brain.