[GH-ISSUE #10142] Using Ollama Run -> /clear = Not clearing chat context #68712

Closed
opened 2026-05-04 14:56:04 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @QuantumNtangled on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10142

What is the issue?

In 0.6.4 on Windows I have tested this on 2 machines. One machine was using Snapdragon X Elite NPU and one machine was Nvidia RTX A1000. Test was completed on Gemma 4b.

Prompt: Create a basic web service python script to consume a REST API.

After /clear, Ollama indicates conversation cache was cleared, but responds with the context of the previous question. I asked the same answer again and the AI indicates "An Improved" version of the script.

Relevant log output


OS

Windows 11

GPU

Snapdragon X Elite NPU , RTX A1000

CPU

Snapdragon, i7

Ollama version

0.6.4

Originally created by @QuantumNtangled on GitHub (Apr 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10142 ### What is the issue? In 0.6.4 on Windows I have tested this on 2 machines. One machine was using Snapdragon X Elite NPU and one machine was Nvidia RTX A1000. Test was completed on Gemma 4b. Prompt: Create a basic web service python script to consume a REST API. After /clear, Ollama indicates conversation cache was cleared, but responds with the context of the previous question. I asked the same answer again and the AI indicates "An Improved" version of the script. ### Relevant log output ```shell ``` ### OS Windows 11 ### GPU Snapdragon X Elite NPU , RTX A1000 ### CPU Snapdragon, i7 ### Ollama version 0.6.4
GiteaMirror added the bugneeds more info labels 2026-05-04 14:56:04 -05:00
Author
Owner

@chigkim commented on GitHub (Apr 5, 2025):

/clear only clears context in the CLI. If you use API you have to manage your own message history.

<!-- gh-comment-id:2781114495 --> @chigkim commented on GitHub (Apr 5, 2025): /clear only clears context in the CLI. If you use API you have to manage your own message history.
Author
Owner

@QuantumNtangled commented on GitHub (Apr 5, 2025):

Yes, I was in cli.

Image

<!-- gh-comment-id:2781137728 --> @QuantumNtangled commented on GitHub (Apr 5, 2025): Yes, I was in cli. ![Image](https://github.com/user-attachments/assets/20c9e922-1997-4fd0-a673-97c4577778dd)
Author
Owner

@chigkim commented on GitHub (Apr 6, 2025):

Try the simple thing in order.

  1. Hi, my name is John. How are you?
  2. What's my name?
    It should say it's john.
  3. /clear
  4. What's my name?
    It shouldn't know your name.

It worked for me. However, I'm on Mac, different setup than yours though.

<!-- gh-comment-id:2781182704 --> @chigkim commented on GitHub (Apr 6, 2025): Try the simple thing in order. 1. Hi, my name is John. How are you? 2. What's my name? It should say it's john. 3. /clear 4. What's my name? It shouldn't know your name. It worked for me. However, I'm on Mac, different setup than yours though.
Author
Owner

@rick-github commented on GitHub (Apr 13, 2025):

If you provide an example of the observed behaviour, it will be easier to debug,

<!-- gh-comment-id:2800115540 --> @rick-github commented on GitHub (Apr 13, 2025): If you provide an example of the observed behaviour, it will be easier to debug,
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68712