Bug: v2.1.198 cannot restore Ollama local model when resuming sessions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code version:
2.1.198
Backend:
Ollama
Model:
hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:latest
What worked:
Prior to updating to v2.1.198 I could resume sessions normally using both the in-app resume flow and:
claude --resume <session-id>
The session would continue using my Ollama model.
What happens now:
After updating to v2.1.198 every resumed session displays:
Session model hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:latest could not be restored (not a model this version of Claude Code recognizes) — using the default model instead.
The session then reports:
Model: Default (claude-opus-4-8[1m])
However:
Auth token: none
When attempting to send any prompt, Claude Code replies:
Not logged in · Please run /login
A brand new session launched through:
ollama launch claude --model hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:latest
can be created successfully, but after exiting, resuming that session produces the same error.
Expected behavior:
Sessions created with Ollama local models should resume using the original local model instead of switching to the default Claude model.
What Should Happen?
What Should Happen?
Claude Code should correctly restore sessions created with Ollama-backed local models (e.g. hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:latest) when using:
claude --resume <session-id>
or the in-app resume flow
The original model specified at session creation should be preserved and reattached on resume, so that:
The session continues using the same local model via Ollama
No fallback to Anthropic cloud models occurs unless explicitly requested by the user
If a model cannot be restored:
Claude Code should fail gracefully and clearly indicate that the original model is unavailable
It should not silently switch to the default Anthropic model
Claude Code should not require /login for sessions that were originally created using a local Ollama backend.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
Start a new Claude Code session using an Ollama local model:
ollama launch claude --model hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:latest
Confirm the session is running with the local model (Gemma via Ollama).
Run a simple prompt (e.g. “Hello” or “What model are you using?”).
Exit Claude Code to end the session.
Resume the same session using either:
claude --resume <session-id>
or the in-app resume flow.
Observe that the session fails to restore the original model and instead shows:
“Session model … could not be restored (not a model this version of Claude Code recognizes)”
Model switches to: Default (claude-opus-4-8[1m])
Attempt to send a prompt in the resumed session.
Observe that the session reports:
“Not logged in · Please run /login”
and does not continue using the original Ollama model.
Repro frequency 100% (occurs every time after upgrading to v2.1.198)
Regression note This worked in previous version(s) prior to v2.1.198 with the same Ollama setup.
Claude Model
Other
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.198
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="2849" height="1524" alt="Image" src="https://github.com/user-attachments/assets/21d680bc-6b54-4f2c-b158-45f54ebf1b9a" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗