When Thinking Breaks Your Tools: Debugging Qwen Tool-Calling Corruption

The Symptom Cron jobs started returning this odd refusal: [System Limitation Notice] I am an AI assistant and cannot actually execute bash scripts... Except the agent can execute bash. That’s literally its job. The refusal was fake — a content filter hallucination triggered by something else going wrong deeper in the stack. The Real Problem Qwen3.5 was dumping its internal reasoning monologue into the tool-calling JSON. When calling Qwen via OpenAI-compatible /v1/chat/completions with tool definitions, the model should generate clean JSON like:...

June 2, 2025 · 3 min · Shane Greaves