The three things that decide whether the assistant remembers anything are not
obvious from the code: the system prompt carries the identity and the fact that
the history is its memory, the replayed context is bounded per project, and the
requested context window decides how much of it survives Ollama's truncation.
Record the measured numbers, the acoustic rules of the live capture, and the
known limit that a 3B model still mishandles a recap question about the very
first message.
Asked what the first message of the conversation was, the assistant answered
that it keeps no memory between interactions while the replayed context sat
right in front of it. Two causes, both measured on the real model. The system
prompt never said the history is its memory, nor who it is, so it fell back on
its training habit of denying recall. And Ollama's default context window
silently truncates from the beginning: on a 9194-token conversation only 4053
tokens were evaluated, so the oldest messages never reached the model at all.
The window is now requested explicitly (16384 by default) and the warm-up asks
for the same one, otherwise Ollama reloads the weights and throws the preheat
away. The prompt states the identity and forbids the false denial, while still
letting the assistant admit a message older than the replayed window.
Ollama drops an idle model after five minutes by default, so the first
question after a pause pays the whole several-second load. Every chat request
now carries keep_alive (30 minutes by default) and POST /api/chat/warm loads
the weights on demand, letting a client wake the model while the user is
still writing. A warm-up that fails answers warmed=false instead of an error:
it is an optimisation, not a step the answer depends on.
A project that lives for months would otherwise grow the SQLite file without
limit, even though the model only ever reads the most recent messages. Pruning
the oldest rows on every write keeps a project to a fixed budget without
touching what the context is built from.
Storing a context is not enough: the user needs to know it actually reaches
Ollama, and that the messages replayed are the ones they expect. The read-only
probe answers that by asking the model to recite its context and reporting how
many messages were replayed, while persisting nothing.