[BUG] Claude Code >= 2.1.36 forcing full prompt re-processing on llama-server
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?
Since Claude Code for Windows version 2.1.36 (including the latest 2.1.71), when using a local model via llama‑server, Claude Code forces a full prompt re‑processing on every prompt.
Llama‑server normally reuses previous context and appends new prompts efficiently, but Claude Code appears to either modify the main prompt or send an additional request that invalidates the previous context, causing llama‑server to rebuild the entire prompt from scratch.
Llama-server's debug logs suggest that Claude Code is triggering a title‑generation request for each prompt, which may be invalidating the cached context.
What Should Happen?
Claude Code should reuse the existing llama‑server context and avoid triggering a full re‑processing cycle for simple prompts.
If the issue is caused by Claude Code re‑requesting a title for each prompt, this behavior should ideally be optional in settings.
Error Messages/Logs
llama.cpp log:
slot update_slots: id 0 | task 1697 | forcing full prompt re-processing due to lack of cache data (likely due to SWA or hybrid/recurrent memory, see https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 8191, pos_max = 8191, n_tokens = 8192, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 16383, pos_max = 16383, n_tokens = 16384, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 24575, pos_max = 24575, n_tokens = 24576, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 32767, pos_max = 32767, n_tokens = 32768, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 40959, pos_max = 40959, n_tokens = 40960, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 49151, pos_max = 49151, n_tokens = 49152, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 57343, pos_max = 57343, n_tokens = 57344, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 65535, pos_max = 65535, n_tokens = 65536, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 73727, pos_max = 73727, n_tokens = 73728, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | erased invalidated context checkpoint (pos_min = 77532, pos_max = 77532, n_tokens = 77533, n_swa = 1, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | n_tokens = 0, memory_seq_rm [0, end)
slot update_slots: id 0 | task 1697 | prompt processing progress, n_tokens = 8192, batch.n_tokens = 8192, progress = 0.104927
slot update_slots: id 0 | task 1697 | n_tokens = 8192, memory_seq_rm [8192, end)
slot update_slots: id 0 | task 1697 | 8192 tokens since last checkpoint at 0, creating new checkpoint during processing at position 16384
slot update_slots: id 0 | task 1697 | prompt processing progress, n_tokens = 16384, batch.n_tokens = 8192, progress = 0.209855
slot update_slots: id 0 | task 1697 | created context checkpoint 1 of 32 (pos_min = 8191, pos_max = 8191, n_tokens = 8192, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | n_tokens = 16384, memory_seq_rm [16384, end)
slot update_slots: id 0 | task 1697 | 8192 tokens since last checkpoint at 8192, creating new checkpoint during processing at position 24576
slot update_slots: id 0 | task 1697 | prompt processing progress, n_tokens = 24576, batch.n_tokens = 8192, progress = 0.314782
slot update_slots: id 0 | task 1697 | created context checkpoint 2 of 32 (pos_min = 16383, pos_max = 16383, n_tokens = 16384, size = 75.376 MiB)
slot update_slots: id 0 | task 1697 | n_tokens = 24576, memory_seq_rm [24576, end)
slot update_slots: id 0 | task 1697 | 8192 tokens since last checkpoint at 16384, creating new checkpoint during processing at position 32768
slot update_slots: id 0 | task 1697 | prompt processing progress, n_tokens = 32768, batch.n_tokens = 8192, progress = 0.419710
slot update_slots: id 0 | task 1697 | created context checkpoint 3 of 32 (pos_min = 24575, pos_max = 24575, n_tokens = 24576, size = 75.376 MiB)
Steps to Reproduce
- Run Claude Code for Windows version > 2.1.36
- Send any prompt
- Send a second simple prompt (e.g., “what color is the sky”)
- Observe that llama‑server performs a full prompt re‑processing
- All subsequent prompts repeat the same behavior
Claude Model
Other
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.34
Claude Code Version
2.1.36+
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Manually downgrading to 2.1.34 and disabling auto‑updates avoids the issue.
Adjusting llama‑server configuration did not resolve the problem.
The issue appears to be a regression introduced in 2.1.36.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗