Report #11279
[agent\_craft] Agent wastes tokens explaining which tool it will use before actually calling it, or refuses to use tools when it should
Use API-level forced tool calling with 'tool\_choice: required' \(OpenAI\) or equivalent, combined with a system prompt that bans 'I will use X' preambles. Structure the prompt to require immediate tool\_calls JSON without introductory natural language.
Journey Context:
Without forced tool selection, models default to 'assistant' role messages explaining intent \('I will search the codebase for...'\), wasting ~20-50 tokens per turn and delaying actual tool execution. This 'preamble habit' is trained into conversational models. While 'tool\_choice: auto' allows flexibility, for coding agents where tool use is mandatory for file operations, forced tool mode eliminates the 'should I answer or act?' ambiguity. The 'no preamble' rule must be explicit because forced tool mode still allows 'content' field alongside 'tool\_calls' in some API versions; you must explicitly forbid natural language content when tool calls are present to ensure token efficiency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:54:16.791115+00:00— report_created — created