How memory works
A local model can only see a limited amount of text at once. A diary grows without end. This page explains how My Thought Safe bridges the two, so that a conversation can run for months and the AI still knows what you told it, without anything ever leaving your computer.
The problem: a window, not a memory#
Every language model reads through a fixed-size context window, measured in tokens (a token is roughly three quarters of an English word). A typical local setting is 8,192 tokens, roughly 6,000 words. Everything the model knows about your conversation has to fit inside that window, every time it replies.
Most chat apps simply drop the oldest messages once the window is full. After that, the model has no idea they ever existed. For a diary, where the whole point is continuity, that is the wrong trade.
My Thought Safe keeps the model’s window as it is and changes what goes into it. Before each reply, the app builds a short memory block from everything the vault holds and places it ahead of the recent conversation. The model sees the latest turns word for word, plus a condensed, relevant picture of everything before them. The effect is a simulated infinite context: the window stays small, but nothing you wrote is out of reach.
All of this happens on your computer. The summaries, the search and the relevance checks are all done by your own model, on your own hardware, against your own encrypted vault. There is no cloud index and no server-side memory.
What goes into each reply#
Each time you send a message, the prompt the model reads is assembled from these layers. The context meter above the messages shows how much of the window each one uses, in the same colors.
| Layer | What it is | Meter color |
|---|---|---|
| Persona | Who the AI is in this conversation and what it knows about you, if you set one. Also the current date and time. | Gray |
| Pinned facts | Things you explicitly asked the AI to always keep in mind. | Amber |
| Conversation summary | A running summary of the earlier part of this conversation. | Purple |
| Recalled memories | Notes and past passages found for the message you just sent. | Blue |
| Recent history | The latest turns of the conversation, word for word. | Green |
| Free | Room left for the reply. | Outline |
The memory block is kept in proportion. It never takes more than a third of the prompt, or a quarter of the whole window, so the recent conversation always has room. Within the block, each part has its own share, so a long summary can’t push out your pinned facts and one long passage can’t crowd out every other memory.
The rolling summary#
Every conversation keeps its own summary. After every six new turns, the model rewrites it in the background to take in what has happened since, under four headings: Decisions, Facts, Open threads and Current state. It carries forward what is still true and drops what has been superseded.
When earlier turns scroll out of the model’s window, the summary stands in for them. It is presented to the model as “where this conversation has got to so far”, so the model reads it as the story of the conversation rather than as a note about you. A summary is never shared with other conversations.
If a summary attempt fails or comes back too short to be useful, the previous summary is kept. Deleting an entry drops its conversation’s summary, which is then rebuilt from what remains.
Three kinds of memory#
Besides summaries, the vault holds three kinds of memory, all of them encrypted and all listed in the Memory screen:
- Pinned facts
- Created when you click + Remember this on a message or add a fact in Memory. Pinned facts are included in every reply of the conversation they belong to (or of every conversation, if you share them). They are the one layer you control directly, so they get priority over everything the app infers.
- Note
- Short, durable facts the AI writes about you on its own: preferences, names, goals, ongoing situations. After a reply, the model reads the last few turns and writes a bullet for anything worth remembering months later, or nothing at all. A note that says nearly the same thing as an existing one is skipped.
- Excerpt
- A searchable copy of each message you and the AI exchange, so that a specific thing you once wrote can be found again. Very short messages (under 24 characters) aren’t kept as excerpts.
Notes and the rolling summary are both controlled by one switch, Let the AI remember facts about me (distills durable notes from conversations) in Settings → Memory & chat. With it off, the AI writes no notes and no summaries. Pinned facts and excerpts still work.
How the right memories are found#
Pinned facts and the summary are always included. Everything else has to be found, because a diary soon holds far more than any window can take. The app does this in several steps, each using your own model.
1. Planning the search#
Before replying, the model is asked a quick, separate question: what would you need to look up to answer this? It answers with up to three short searches, or says nothing is needed. This is what lets a message like “should I buy more of it?” turn into a search for the company you discussed last month, even though your message never named it.
Those searches run against your memories, and also directly against the raw text of past messages, so an exact name or ticker can be found even if no memory mentions it. The planning step is skipped at the very start of a new vault, when there is nothing yet to search.
2. Matching by meaning or by words#
With an embedding model available, memories are compared by meaning: “what did I decide about money?” can find a note about a budget that never used the word. Without one, memories are matched by shared words of four letters or more. Either way, newer memories get a slight edge over old ones. Better memory search with an embedding model explains which embedder is used and how to add one.
If planning finds nothing, the app falls back to searching for your message itself. A message with nothing searchable in it, such as a lone “ok” or “3”, doesn’t trigger a search.
3. Checking relevance#
A search always returns something, and a loosely related memory can mislead the model. So the candidates are shown to the model once more, with a strict question: which of these are actually about what the user is asking? Only those go into the reply. Keeping none is a valid answer, and often the right one.
Only search results are checked this way. Pinned facts, the summary, and the specific references described below are included as they are, because you asked for them.
4. Fitting it in#
A relevant memory that is much longer than its share of the block is rewritten by the model into one or two sentences that keep what matters. These short versions live only in memory while the vault is open and are discarded when it locks. When even that isn’t enough, a memory is shortened from the middle, keeping its beginning and end and marking the gap, so the model never mistakes a cut passage for a whole one.
Anything the model can already see in its window is left out, so the model is never shown a copy of a message it is reading right now.
Replies take a moment longer with memory. Planning and relevance checking are two short extra passes by your model before it starts writing. On a graphics card they are quick; on a CPU you may notice them. Beside Memories in the context meter’s key, a note such as “(3 of 7 judged relevant)” shows how many candidates were weighed and how many were used.
Asking about a particular time or place in the diary#
Some questions name what they want outright. For these, the app doesn’t guess: it looks the entry up directly and puts it in the memory block ahead of everything else.
| You write | What the model is given |
|---|---|
A timestamp such as [2026-08-02 22:15] (click any message’s time to insert it) | The entry written at that minute and the reply to it, in full. If nothing was written then, the model is told so, instead of being left to invent an answer. |
| “yesterday”, “this morning”, “last week”, “this month”, “the past 3 days”, “recently”… | Up to eight messages from that period, each labeled with its time and conversation. |
| “what was the first thing I asked?”, “how did this chat start?” | The opening turns of the conversation. |
| A bare number, answering a numbered list the AI just gave you | The list item you picked, spelled out, so the model knows what “3” meant. |
Every message is also stamped with its local date and time when it is shown to the model, and the model is told the current time. That’s why it can answer “how long ago did I start this?” The stamps are added only in the prompt; your stored messages stay exactly as you wrote them.
A date on its own works too, written the way the app writes dates: “what did I write on 2026-08-02?” brings back that day. Dates in words, such as “on August 2nd”, aren’t understood yet.
The writing guide has the full list of phrases.
Names mentioned earlier#
Each conversation also keeps a list of the named things discussed in it: two-or-more-word names from your own messages (“Veeva Systems”, “Aunt Carol”) and all-capital codes such as stock tickers from either side. Once those mentions have scrolled out of the window, the most frequently mentioned ones are passed to the model as a reminder, so an oblique “that stock” or “the company” can still be resolved.
Which conversations can see what#
By default, every memory stays in the conversation it came from. A fact you pinned while writing about work isn’t brought up when you’re writing about your family. Date phrases and clicked timestamps also answer only from the conversation you are in.
There are two ways to widen that:
- One memory at a time. In the Memory screen, tick All conversations on a memory to let every conversation use it. This suits facts about you in general, such as your name or where you live.
- The whole diary. Turn on Let the AI use your whole diary, not just this conversation in Settings → Memory & chat. Every memory, date phrase and timestamp can then draw on the whole vault. Turning it off again restores exactly the scoping you had before.
Rolling summaries are always kept to their own conversation, whatever these settings say.
Scoping decides what the AI is told, not who can read it. Conversations aren’t separately encrypted from each other, and anyone who opens your vault can read everything in it, including every memory. See what this app doesn’t protect you from.
Honest limits#
- It is a simulation. The model never sees your whole diary at once. It sees recent turns plus what the app judged relevant. A memory that the search misses, or that the relevance check wrongly rejects, isn’t used for that reply. Pinning a fact is the reliable way to make sure it is always there.
- Quality depends on your model. Summaries, notes, search planning and relevance checks are all written by the model you chose. A small model does these jobs less well than a larger one.
- Deleting an entry doesn’t reach notes made from it. A note records which conversation it came from, not which message, so the app can’t tell which notes a deleted entry fed. You can delete notes yourself in Memory. Deleting a whole conversation does remove its notes.
- Very long memories are searched in pieces. Only the first part of an exceptionally long memory (roughly ten pages) is covered by meaning-based search. Keyword matching still reads all of it. Short memories are recalled more precisely.
- Notes and summaries are only as current as the last pass. They are written in the background after replies, so the newest turns may not be reflected yet. Those turns are still in the window, word for word.
Next step#
Managing memories shows how to review, pin, edit, share and delete what the AI remembers.