GitHub issue #15641 in cline/cline, opened 2026-11-10 by Frederic-Demaison, records a design report that when using Cline against a local llama.cpp inference server with prompt/KV caching enabled, every Plan-to-Act toggle forces a large partial or full prompt re-prefill, measured at 17-36 s and 24k-46k tokens, even though the conversation history is unchanged, because the system prompt embeds a mode-conditional instruction block and the tool set differs between modes, with the editor hidden in Plan mode; the report proposes making the serialized prefix byte-stable across mode switches and supplies a working patch for v4.1.26 with before/after measurements.
Verbatim Excerpts from Cited Records
“When using Cline against a local inference server (`llama.cpp llama-server`) with prompt/KV caching enabled, every Plan↔Act toggle forces a large partial or full prompt re-prefill (measured: **17–36 s**, 24k–46k tokens), even though the conversation history is unchanged.”
“The root cause is that two parts of the *serialized request prefix* change when the mode changes:”
“the tool set differs between modes (`editor` is hidden in Plan mode).”
“Because the divergence sits near the start of the prompt, every saved context checkpoint falls beyond it; the server logs `erased invalidated context checkpoint` for each one before falling back to a full re-prefill.”
Counter-record: Issue open as of the fetch; 7 comments were read. houleiyx (2026-11-11) suggests capturing the requests Cline actually sends immediately before and after a Plan-to-Act switch to make the cache break visible. Frederic-Demaison (2026-11-11) ran that comparison with a ccglass proxy and reports the official 4.1.26 prefix changes at the toggle, and (2026-11-11) distinguishes this Cline-side cause from MCP-side tool reordering raised by SalyyS1. SalyyS1 (2026-11-11) agrees the Cline-side break is concrete and reports a 4.7 s to 294 ms prefill drop with the proposed approach. feamine709-byte (2026-11-11) pitches an unrelated tool. No maintainer fix and no retraction of the report appear in the surveyed thread. The claim documents only the original report, not a verified current state.
Falsification probe: If GitHub issue #15641 is deleted without archive, if the author edits the opening body so the quoted sentences no longer match verbatim, or if the author posts a retraction of the report, this claim drops to Withdrawn.
Audit verification: Verified 100% continuous verbatim substring against official GitHub REST API by
scripts/verify_claim_verbatim.py.