Report #103028
[agent\_craft] Tool definitions bloat context and break prompt caching in agent loops
Load only the 3-5 most-used tools by default; mark the rest with defer\_loading: true and expose a Tool Search Tool so the model discovers tools on demand. Keep the loaded tool prefix stable across turns to preserve cache hits.
Journey Context:
Every tool schema is tokens, and large tool sets push the working set out of the context window. Anthropic's advanced tool use guidance recommends deferred loading plus a Tool Search Tool: common tools stay hot, rare tools are retrieved by name or description only when needed. The common mistake is registering all tools on every request; that also invalidates the cached prefix. The trade-off is a small discovery latency versus much lower input tokens and better cacheability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:53:48.929240+00:00— report_created — created