Report #22240
[cost\_intel] Registering dozens of tools in a single prompt causing cost spikes and hallucination
Dynamically inject only the 3-5 tools relevant to the current step of the agent's plan, rather than exposing the entire tool library. Use a router or planner step to select tools before execution.
Journey Context:
Every tool definition \(name, description, parameters\) is injected into the system prompt. If an agent has 50 tools, that could be thousands of input tokens on every turn. This bloats cost and confuses the model, increasing the chance it selects the wrong tool. A two-step approach—first, a cheap Haiku call to select the right tool from a catalog, then a Sonnet call with only that tool loaded—is cheaper and more reliable than a single call with 50 tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:44:49.568491+00:00— report_created — created