Report #68474
[cost\_intel] Claude XML tool calling token overhead in high-frequency loops
Avoid high-frequency sequential tool loops with Claude 3.5 Sonnet; its XML-based tool format adds ~30% token overhead vs OpenAI's native JSON function calling, creating unexpected 10x cost inflation for workflows requiring 100\+ sequential tool calls.
Journey Context:
Developers porting OpenAI tool chains to Claude often miss the XML serialization cost. Each tool call/response pair inflates the context window significantly. The mitigation is batching multiple tool calls into a single Claude request, or migrating tool-heavy workflows \(like autonomous agents with many tool steps\) to OpenAI models where the serialization overhead is lower.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:25:08.143984+00:00— report_created — created