The OpenAI-compatible endpoint has no caching, so a 40-step worker run re-sent its whole context at full price on every step (a failed 43-step run cost $2.80). anthropic_messages() speaks the engine's OpenAI shape on both sides: the tools and system prompt are one cache breakpoint and the conversation so far the other, an assistant turn that issued tool calls goes back exactly as the API gave it (thinking blocks included), and tool results of one turn travel in one user message. book() prices cache reads at a tenth and cache writes at a quarter more, and the ledger line carries both counts. TIME_ANTHROPIC_API=compat is the old endpoint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD