Fight ClubBlog

Anatomy of a memory for LLMs

A fact with an end date

The project behind this series: ns-brain.fightclub.pro

Japan surrendered in August 1945 and Hiroo Onoda, a Japanese officer on a small island in the Philippines, kept fighting for almost 29 more years. The news reached him many times (leaflets, a general's surrender order, letters from his own family) and he judged each one to be enemy propaganda. He stopped in March 1974, when his old commanding officer flew to the island and read him the order himself.

The fact in Onoda's head had been true: "the war is on and I must never surrender" was correct in 1944. Nothing in it said when it would stop being true and nothing in it said who could tell him it had changed, except one man. AI memory has the same problem with facts like "the staging server is at 10.0.0.12". That sentence is true on the day it is stored. Decay cannot help, because an address does not become less true with age: on one day it is simply wrong. Nothing in the code records that day. No commit changes and nobody corrects the agent, so the old fact reads exactly as current on the day it becomes false. I once watched an agent call a server "staging" because of a note that was 25 days old. By then that server had been production for two weeks.

When I built ns-brain I gave each memory two kinds of time that are separate from its age:

ns-brain sets a review date 30 days ahead by itself on every infra and access fact (servers, addresses, keys, who has access to what). Those facts belong to the world outside the code: a host moves or a key is rotated and no commit records it. A decision never gets a review date, because only the person who made a decision can make it wrong. The calendar cannot. Facts about the code itself have a third kind of time, which is the commit they were written against, so the agent is told how many commits have landed since.

This is the real thing, from a test brain for an invented online shop. The server's address gets its review date without being asked, the launch price carries its end date and the third fact was stored with a review date that has already passed, to show what the next session's brief prints:

$ ns-brain remember --type infra --scope ops --title "The staging server is at 10.0.0.12" --body "Deploy previews and the test database run there."
remembered #1 [ops/infra] The staging server is at 10.0.0.12

$ ns-brain get 1
#1 [ops/infra] tier A reported pinned=False importance=3 used=0x
created 2026-11-11 22:51  updated 2026-11-11 22:51  verified never
source session
review 2026-12-11
The staging server is at 10.0.0.12

Deploy previews and the test database run there.

$ ns-brain remember --type decision --scope pricing --title "The Pro plan costs 19 euros a month until the end of the year" --body "Launch price. The list price is 29 euros." --valid-from 2026-11-01 --valid-to 2026-12-31
remembered #2 [pricing/decision] The Pro plan costs 19 euros a month until the end of the year

$ ns-brain get 2
#2 [pricing/decision] tier B reported pinned=False importance=3 used=0x
created 2026-11-11 22:51  updated 2026-11-11 22:51  verified never
source session
valid 2026-11-01..2026-12-31
The Pro plan costs 19 euros a month until the end of the year

Launch price. The list price is 29 euros.

$ ns-brain remember --type access --scope ops --title "The payments API key for the shop is held by the finance team" --body "Ask finance before any change to checkout." --review 2026-11-10
remembered #3 [ops/access] The payments API key for the shop is held by the finance team

$ ns-brain brief | grep -A3 "DUE FOR REVIEW"
## DUE FOR REVIEW (these asked to be re-confirmed)
  #3 [access] The payments API key for the shop is held by the finance team
  Still true? ns-brain verify <id>. Changed? ns-brain remember --supersedes <id>. Done with it? ns-brain update <id> --no-review

The brief does not decide whether the fact is still true. It asks and the agent checks: it records that it checked, stores the new fact in place of the old one or takes the review date off a fact that will never change. When the brain is shared by a team, one person answering the question is enough, because the corrected fact is what every agent reads next.

Figure 1Two kinds of time

1 Nov 1 Dec 1 Jan 31 Jan Pro plan at 19 euros: valid 2026-11-01..2026-12-31 still found, dates printed staging server at 10.0.0.12 (infra) stored 11 Dec: DUE FOR REVIEW full weight until then
The launch price carries its own end date, printed with it whenever it is read. The server's address never fades, but 30 days after it was stored it asks the next session one question: still true? Dates from the terminal session above.

Onoda's fact had neither an end date nor a review date. The only update he would accept came from one man, 29 years late. A review date works like a commanding officer who visits the island on a fixed day and asks one question: is this still true?

This has a real cost: valid_to does not hide a fact after its end date: the dates are shown with the fact and the agent has to read them, so the 19 euro price is still found in February with "valid 2026-11-01..2026-12-31" printed next to it. The 30 days are a guess too, so a server that never moves will still ask to be checked every month (a fact you know is permanent can be stored with no review date). The 30 days were chosen because a reminder that fires every week is one everybody learns to ignore.

The project behind this series ns-brain.fightclub.pro