Skip to content

F14 Tool misuse (wrong, unknown or missing tool call, loop)

Tool use went wrong: the model called a tool that was not offered, the wrong tool, no tool when one was needed (or one when none was), gave arguments with wrong values, repeated the same call (a loop), or an agent run did not reach the user's goal. Arguments that are not JSON or break the schema are F2.

How counterfix finds it

Live and free (ToolUseCheck): unknown tool, loops, a tool the item expects that was never called, too many steps, on single calls and on agent runs (counterfix.detect.agents.record). With an expected call, the tool_call metric names the cause. Judge (AgentTaskCheck): did the run complete the task, and if not, why. See Agents and tool calls.

Fixes it tries

In this order (a model profile can reorder them). Each one is kept only if it passes 2 of 3 re-runs.

Intervention Change
tool_choice Set tool_choice: the right tool when known, any tool when one was needed, none when no tool was needed
name_the_tool Say in the system prompt which tool the request needs (or that it needs none)
describe_arguments Spell out each tool's arguments (type, required, allowed values) in its description
no_repeat Tell the model never to repeat a tool call with the same arguments

When no fix verifies

  • Rename tools so their names say what they do, and merge tools that overlap
  • Check tool calls in code before running them, and return errors the model can read
  • Use a model trained for tool calling