Report #10710
[agent\_craft] Agent generates verbose reasoning that interferes with tool parameter formatting or leaks into final output
Separate chain-of-thought from tool calls: use a dedicated 'reasoning' field/message type that is not parsed as tool arguments, or explicitly mark reasoning as internal-only with stop sequences before tool parameter generation.
Journey Context:
Chain-of-Thought \(CoT\) improves reasoning but when agents generate tool calls, the CoT can leak into the tool parameters \(e.g., including 'Let me think about this...' inside a JSON value\) or confuse the parser. Common mistakes include: \(1\) Asking the model to output reasoning and then tool JSON in the same block without clear delimiters, causing JSON parsing to fail. \(2\) Not distinguishing between 'thinking tokens' \(internal monologue\) and 'action tokens' \(tool calls\). The fix is to explicitly structure the output format: first generate reasoning in a designated block \(e.g., \`...\`\), then generate the tool call in a strict format \(e.g., JSON\). Some frameworks use 'internal monologue' fields that are masked from the user but visible to the model. This prevents the 'stream of consciousness' from corrupting structured tool parameters, which is critical for reliable agentic tool use.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:23:11.680176+00:00— report_created — created