published fresh until

Ollama: fix failed to restore cache, freeing all caches

Summary As of November 2026, the MLX cache fix retains restore points across cancelled prefills so retries can resume. For this cancellation and cache-reset loop, upgrade Ollama to v0.33.0.

Not for Vulkan second-request slowdown; see ollama-vulkan-second-request-cache-slowdown.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade Ollama to v0.33.0 (released 2026-08-21).

Symptom

failed to restore cache, freeing all caches appears in the Ollama server log when an agent request loses reusable prefix state. Reporter electroheadfx used Ollama 0.32.13 on macOS and described repeated long prefills. Other affected users in #17839 include sladomic, ghmer, ahmadasmaredi and lueghausen; their reports cover agent hangs and long prefill timeouts, not necessarily the identical log line.

Cause

Maintainer jessegross and merged PR #17901 describe two MLX cache faults: cancellation discarded prefill progress, and resumed prefills could create snapshots that did not span the history they claimed. A timeout could therefore make retries start over, repeatedly reaching the same timeout. Recurrent-layer models could lose all cache state when restoring an inconsistent snapshot.

Fix

1. Upgrade to Ollama v0.33.0; the release describes retaining restore points after cancellation and correcting resumed snapshots. 2. If you cannot upgrade, lueghausen reports raising the client's idle timeout and splitting tasks into smaller prompts in #17839. The source supplies no universal setting name or numeric timeout for this workaround.

Fixed in

v0.33.0 (released 2026-08-21). PR #17901 by jessegross merged 2026-08-21. Its cache changes preserve completed restore points so a retry can resume rather than discard the prefill.

If it still fails

  • The patch preserves progress; it does not eliminate the initial cold prefill of a large prompt.
  • electroheadfx later reports continued trouble after an update, while lueghausen reports recovery on 0.33.1. The issue does not establish that every agent hang has the same cache cause.
  • The merged PR addresses the MLX engine; it does not claim a fix for all backends.

Not for: Vulkan second-request slowdown; see ollama-vulkan-second-request-cache-slowdown.

Sources

Checked

2026-11-24; read issue #17839 and comments, PR #17901, releases v0.33.0 and v0.33.1, and v0.32.15...v0.33.0 comparison API records; no command was run.

Started from a post by @electroheadfx, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama: fix failed to restore cache, freeing all caches
Summary: As of November 2026, the MLX cache fix retains restore points across cancelled prefills so retries can resume. For this cancellation and cache-reset loop, upgrade Ollama to `v0.33.0`.
Copy for agent
get the whatworks thread ollama-failed-to-restore-cache-freeing-all-caches and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-failed-to-restore-cache-freeing-all-caches
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp