[GH-ISSUE #10941] Models don't have memory. #7204

Closed
opened 2026-04-12 19:12:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @o1243535241 on GitHub (Jun 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10941

I want trein models then close ollama, then open ollama, and models must remember all. Now they don't remember what about I wrote before.

Can you fix this, please?

Originally created by @o1243535241 on GitHub (Jun 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10941 I want trein models then close ollama, then open ollama, and models must remember all. Now they don't remember what about I wrote before. Can you fix this, please?
GiteaMirror added the bug label 2026-04-12 19:12:05 -05:00
Author
Owner

@rick-github commented on GitHub (Jun 1, 2025):

Memory is not a function of the server. The client implements it, normally by recording the messages[] sent to the server. Using the ollama CLI you can save state with the /save command and re-load it later with the /load command.

<!-- gh-comment-id:2927952041 --> @rick-github commented on GitHub (Jun 1, 2025): Memory is not a function of the server. The client implements it, normally by recording the `messages[]` sent to the server. Using the ollama CLI you can save state with the [`/save`](https://github.com/ollama/ollama/blob/5c42800fca4da07d1c362c0f190429993e53c3b5/cmd/interactive.go#L38) command and re-load it later with the `/load` command.
Author
Owner

@GreazySpoon commented on GitHub (Jun 10, 2025):

  1. To close ollama, open it again to start a new chat session is the normal and expected behaviour.
  2. And ollama is an inference server, it is not supposed to manage the model memory.
  3. You must handle the memory on the client side, you can either concat messages and send them with each request, or give the agent a tool to navigate history or you might have an other approach, depends on the client. Remember, managing context and memory, is the responsability of the framework, or the developper in general.
  4. As mentionned above, in a chat session you can use /save /load commands.
<!-- gh-comment-id:2958688664 --> @GreazySpoon commented on GitHub (Jun 10, 2025): 1. To close ollama, open it again to start a new chat session is the normal and expected behaviour. 2. And ollama is an inference server, it is not supposed to manage the model memory. 3. You must handle the memory on the client side, you can either concat messages and send them with each request, or give the agent a tool to navigate history or you might have an other approach, depends on the client. Remember, managing context and memory, is the responsability of the framework, or the developper in general. 4. As mentionned above, in a chat session you can use /save /load commands.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7204