Skip to content

llama.cpp b10219: reasoning_content persists across chat turns

llama.cpp b10219 fixes reasoning_content persistence in chat history, enabling --reasoning-preserve to work across multi-turn conversations with local reasoning models.

llama.cpp b10219 fixes a bug where llama-cli discarded reasoning tokens between turns. The --reasoning-preserve flag is supposed to feed prior reasoning back into context on later turns — but until now, it couldn’t, because the reasoning was never stored.

The fix (PR #26362) persists reasoning_content in the message history:

  • Before: llama-cli collected reasoning from the stream for display only — only assistant content was stored in messages
  • After: reasoning_content is stored alongside assistant content in chat history
  • Result: --reasoning-preserve can now re-inject prior thoughts on later turns, enabling proper multi-turn reasoning chains

Prebuilt binaries cover 20+ platform configurations:

PlatformKey Builds
macOSarm64, x64
LinuxCPU, Vulkan, ROCm 7.2, SYCL
WindowsCPU, CUDA 12/13, Vulkan, HIP
MobileiOS, Android arm64

NOTE

The --reasoning-preserve flag only works with models that output structured reasoning_content fields. Models that embed reasoning in plain text without separate reasoning tokens won’t benefit from this fix.

If you’re running multi-turn conversations with reasoning models, --reasoning-preserve now works as intended. Prebuilt binaries and source on the b10219 release page.