Claude Code adds a "tokens left" system message after every tool result. Since ollama moves system messages to the front of the prompt, this breaks the KV cache on every request.