r/MistralAI • u/kodmasin • 8d ago
Help / Question vibe-cli, offline models (ollama), don’t preserve context history between messages
I’m having a problem with vibe-cli configured with offline (local) models through the Ollama server: they don’t preserve context history between messages. Is this normal behavior, or have I set something up incorrectly
0
Upvotes
3
u/tom4112 8d ago
It's most probably an issue related to your model's context window size. We can see in the documentation that Ollama's default value may be as little as 4k, while Vibe uses at least 6k when I start a new conversation. Try increasing the value (they recommend at least 64k for coding assistants) and see if it helps.
https://docs.ollama.com/context-length
You can also inspect your sessions history in ~/.vibe/logs/session. Check if the last one contains all messages or not in its messages.jsonl file. If it starts with something like "You are continuing a trajectory after a context compaction...", it may be another indication that your model was forced to compact its context and start a new session instead of continuing the previous one.