[GH-ISSUE #12351] cli: /load fails to load a non-existent model causes session state corruption #33964

Closed
opened 2026-04-22 17:09:34 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @jhsong233 on GitHub (Sep 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12351

What is the issue?

  1. Using /load to load a model that does not exist should not terminate the conversation. It should simply report the error and allow the user to continue chatting with the current model.

    ➜  ~ ollama run gemma3:4b
    >>> /load x
    Loading model 'x'
    Error: model 'x' not found
    ➜  ~        # ❌ Session exits unexpectedly
    
  2. Session state corruption after failed /load
    Even when the session did not exit, a failed /load call corrupted the session state, causing later errors:

    ➜  ~ ollama run gpt-oss:20b
    >>> /load x
    Loading model 'x'
    error: 404 Not Found: model 'x' not found
    >>> hello
    Error: 404 Not Found: model "x" not found, try pulling it first
    ➜  ~ 
    

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

0.11.11

Originally created by @jhsong233 on GitHub (Sep 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12351 ### What is the issue? 1. Using `/load` to load a model that does not exist should not terminate the conversation. It should simply report the error and allow the user to continue chatting with the current model. ``` ➜ ~ ollama run gemma3:4b >>> /load x Loading model 'x' Error: model 'x' not found ➜ ~ # ❌ Session exits unexpectedly ``` 2. Session state corruption after failed `/load` Even when the session did not exit, a failed `/load` call corrupted the session state, causing later errors: ``` ➜ ~ ollama run gpt-oss:20b >>> /load x Loading model 'x' error: 404 Not Found: model 'x' not found >>> hello Error: 404 Not Found: model "x" not found, try pulling it first ➜ ~ ``` ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.11.11
GiteaMirror added the bug label 2026-04-22 17:09:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33964