That only holds if the note is still true. So here is the whole loop — how a note gets written, what ties it to the code it came from, and exactly what happens to it when that code changes underneath.
← how it workssrc/server/tools.ts fresh handleGetStructure builds the gs symbol page for one file. Uses findFileByPath to look up the file: returns [fileId, IndexedFile] if found, null if not indexed — distinguishing "not in index" from "indexed but zero symbols."
kb view.None of them is a chore you have to remember. An agent writes what it learned, the note is pinned to the evidence, the evidence is re-checked on every read, and the note comes back when it's relevant.
Not what the code is — you can read that. The part worth keeping is what wasn't written anywhere: that this function is the only safe write path, that these two files always change together, that the helper you'd expect to exist doesn't.
It names the files and symbols it's about, and records a fingerprint of each one as it looked at that moment. A note is never a floating opinion — it's a claim with an address and a snapshot of what it was true about.
Nothing is trusted from memory. Before a note is shown to anyone, the files it points at are read as they are right now and compared against the snapshot. That one comparison is the entire freshness system — there is nothing else to configure, and no expiry date to guess at.
When a later prompt is about that code, the note is handed to the agent up front — carrying the result of the check with it, so the agent knows how far to trust it before it acts on it.
So: what happens when the file changes, gets renamed, or disappears entirely? The fingerprint from step two is what makes that answer mechanical instead of hopeful. Four outcomes, re-decided from scratch every time the note is read.
Byte-for-byte what it was when the note was written. An agent can act on it without opening the file at all — which is the whole point.
The note still appears — it's probably still mostly right — but labelled, with an instruction to re-verify it against the file first. It never quietly keeps its authority after the ground moved.
A rename isn't a deletion. If the content at the new path still matches the fingerprint, the note travels with it — a refactor that shuffles your tree doesn't cost you the notebook.
Deleted — or simply not on this branch. A note whose files have all vanished stops presenting itself as a description of live code, and returns by itself when the files do. Switching branches rewrites nothing.
The notebook is plain files in your repository. Commit it and the whole team's agents read and write the same body of knowledge — two people writing about the same file on different branches both keep their notes, and the merge combines them instead of picking a winner. Private by default; sharing is opt-in.