A developer building a Node.js-based AI harness for llama.cpp resolved issues with the Qwen3.6-27b model ignoring tool call results and drifting attention to previous questions.

The root cause was identified as stripping reasoning tokens from the chat history while using the `--chat-template-kwargs '{"preserve_thinking":true}'` setting, which caused the model to become confused.

Retaining these thinking tokens in the context resolved the attention drift and tool call handling issues.