[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"post-content-claude-code-prompt-cache-miss-diagnostics":3},"\u003Cp data-page-node-id=\"sDUaBKjeADnqElUxElJJFE\">Tuesday afternoon I checked the cost of a long Claude Code session and did a double take. I had been running a refactor on Fable 5.1 for a couple of hours, mostly small edits across a dozen files. Nothing huge. But the input token count looked like I had pasted my entire repo into the chat a few hundred times.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"KYLMNWbTIJJQwDTvX1txqB\">My first suspect was my own setup. I toggled some hooks off, restarted, watched the cost climb anyway. It was not until Thursday that I found out what actually happened: Fable 5.1 had a caching bug, and version 2.1.260 of Claude Code, released late the night before, fixed it. It also shipped the diagnostic I had been wishing for every time a session got weirdly expensive.\u003C\u002Fp>\n\n\u003Cimg src=\"https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1629654297299-c8506221ca97?w=1200&q=80&auto=format&fit=crop\" alt=\"A terminal window showing a development session in progress\" loading=\"lazy\" data-page-node-id=\"TBG5zkLFYDWygvTo0qLLrb\" \u002F>\n\n\u003Ch2 data-page-node-id=\"VvpSijpMM2GY7qG3Byeu7m\">The cache miss report I kept wanting\u003C\u002Fh2>\n\n\u003Cp data-page-node-id=\"tUIIZR16cKabre9sxDyriF\">Quick refresher on how this works. Anthropic's API caches the conversation prefix, so a cache hit means the model re-reads your context at a steep discount. A cache miss means every token above the break gets billed at full input price. In an agentic session with a big system prompt, a CLAUDE.md, and dozens of tool calls, that discount is most of your bill.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"pZXkEwIvhfyofIN5iHJYA0\">Until now, Claude Code would only tell you \u003Cem data-page-node-id=\"Y8knpz0urqQs3O96rQupsR\">that\u003C\u002Fem> the cache missed, never why. You saw the cost go up and got to guess. As of 2.1.260, \u003Ccode data-page-node-id=\"v41EHG6lBmH5L5UAYCynFr\">\u002Fcost\u003C\u002Fcode> and the \u003Ccode data-page-node-id=\"EnEIvWn2Bv3gvvjK6biGQc\">prompt_cache\u003C\u002Fcode> field in the status line name a likely cause. Three big ones:\u003C\u002Fp>\n\n\u003Cul data-page-node-id=\"cLd2bdgkk5pxGdv54bSTbA\">\n\u003Cli data-page-node-id=\"QeCu4yLYOWiYIFciKoEdoJ\">Your tool definitions changed (a plugin or MCP server loaded differently)\u003C\u002Fli>\n\u003Cli data-page-node-id=\"mKy4d3rlUGEEBCgPJ8rXf1\">Something edited the system prompt, your CLAUDE.md included\u003C\u002Fli>\n\u003Cli data-page-node-id=\"MDeogOvwzQviF4yzMAFFss\">The session sat idle past the cache TTL, which is about five minutes on the default setting\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cp data-page-node-id=\"WKZ30U64AGa8x9TqcRSu9k\">That middle one bit me more than once. I would pause a session, go fix something in CLAUDE.md, come back, and wonder why the next request cost three times the previous one. Editing instructions mid-session quietly rewrites the cached prefix. Now the tool just tells me that instead of me reverse-engineering it from token counts.\u003C\u002Fp>\n\n\u003Ch2 data-page-node-id=\"TuW2jJ9I9REBi8BUk1qi7B\">The Fable 5.1 bug was the expensive part\u003C\u002Fh2>\n\n\u003Cp data-page-node-id=\"ikAJsltDcsRUG4KJ8TWGOs\">The diagnostics are nice. The fix in this release matters more if you run Fable 5.1.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"AZw6C28GkkFdBhu8pYi95j\">Before 2.1.260, prompt caching on Fable 5.1 did not cover context attached after tool results. Tool results are exactly what agentic sessions are made of, so effectively the tail of every tool-call turn went out as uncached input, over and over. If your agent touched a file, ran a test, read output, that output got re-billed at full price on every subsequent call in the session.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"1LonZTByHhhAW1dg2Patd4\">Two related fixes rode along: switching \u003Ccode data-page-node-id=\"NkZgW2V4B3ekuYNVqoDffL\">\u002Feffort\u003C\u002Fcode> mid-session no longer invalidates the cache on Fable 5.1, and the \u003Ccode data-page-node-id=\"7cGwNGAj3iS7GWtMPpUsjM\">\u002Fmodel\u003C\u002Fcode> picker finally shows Fable 5.1 for orgs that have access instead of making you type the model name by hand.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"enCTw2oBFbQnD3hNrQxp2S\">If you have been on Fable 5.1 since Tuesday, update and pull up \u003Ccode data-page-node-id=\"GsWordmhfm3ctq7lyjZfjP\">\u002Fcost\u003C\u002Fcode>. Your cache hit rate should look noticeably healthier than what you remember.\u003C\u002Fp>\n\n\u003Cpre data-page-node-id=\"NU3dHU0P9pj7q8UGDr0jWG\">\u003Ccode class=\"language-bash\" data-page-node-id=\"PBtp3NJr8fJMLtNXANaYWe\"># make sure you actually have the fix\nclaude --version\n\n# then, inside a session\n\u002Fcost   # spend plus, as of 2.1.260, likely cache-miss causes\n\u002Fdiff   # toggle the live diff panel (fullscreen mode)\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch2 data-page-node-id=\"j5gENSpCYEMuCmEDuYHzhN\">The diff panel\u003C\u002Fh2>\n\n\u003Cp data-page-node-id=\"qKVJZtsjZEU0uo7gpXd9OR\">The feature everyone will notice first. In fullscreen mode, \u003Ccode data-page-node-id=\"p7Om5CwWeo1scqv5dVR3vI\">\u002Fdiff\u003C\u002Fcode> opens a panel beside the conversation showing your uncommitted changes while Claude edits. Previously you either split your terminal or kept an IDE open on the side just to watch what the agent was doing to your working tree.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"Efuz4XctJ3qA4K7TZVGh4U\">I was skeptical, honestly. I already review diffs in my editor. But watching the panel fill up while an agent churns through a multi-file change catches certain mistakes early, like an edit landing in the wrong file, before the agent builds ten more steps on top of it. Small thing, but it stays open now.\u003C\u002Fp>\n\n\u003Ch2 data-page-node-id=\"TYCYuUAj2Y65DfSiP9qxD3\">The permission rule fixes deserve attention too\u003C\u002Fh2>\n\n\u003Cp data-page-node-id=\"RWlyzxAsIVGW8fGiObiexN\">One more thing from the changelog, and it is security-adjacent. Several permission rule bugs got fixed, and one of them was real: \u003Ccode data-page-node-id=\"uKlGj8Tc5j4NmUH57AuRgk\">Edit\u003C\u002Fcode>, \u003Ccode data-page-node-id=\"rXyDJ8za2f4wptAIcGTMPD\">Write\u003C\u002Fcode>, and \u003Ccode data-page-node-id=\"dDyXRCv0j2xeh9zdD8k41B\">Read\u003C\u002Fcode> rules whose path contained parentheses were being dropped as invalid, which left folders that were supposed to be read-only writable. Another bug let a single malformed deny rule break every file edit in the session. And Bash checks were auto-approving zsh commands that hid a command substitution inside a \u003Ccode data-page-node-id=\"PgWAW5Pvv1YIcnOOyluDjx\">REPORTTIME\u003C\u002Fcode> or \u003Ccode data-page-node-id=\"iwNgJsgNQI6kKRqyJtj0Ov\">DIRSTACKSIZE\u003C\u002Fcode> assignment.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"YLd1vutV3NJTqSD861vOGl\">If you maintain a strict \u003Ccode data-page-node-id=\"ZQsDi3QdPhDpM66F5GXTyO\">settings.json\u003C\u002Fcode> with deny rules, this release is worth the update on its own. I went back and re-checked my rules with parentheses in paths after reading that one.\u003C\u002Fp>\n\n\u003Chr  data-page-node-id=\"XWdGS7sfj70ytMf4KutNMt\"\u002F>\n\n\u003Cp data-page-node-id=\"Udtax0BaL0vknwC2QDdbYc\">Release cadence on this tool is absurd, a new version a day, and most of them are forgettable. This one is not. The diff panel is the visible feature, but the cache diagnostics plus the Fable 5.1 fix are what actually change what you pay. I wrote before about \u003Ca href=\"\u002Fposts\u002Fstop-wasting-tokens-on-your-ai-coding-assistant\u002F\" data-page-node-id=\"0uqCuFr9dMWV5Br0K5m5yL\">how much money bad habits waste on coding agents\u003C\u002Fa>; this update hands you the tooling to verify the waste is gone.\u003C\u002Fp>\n\n\u003Cp data-page-node-id=\"yHJdPHPjOm9Cu8ljMrNvTJ\">Update, run \u003Ccode data-page-node-id=\"CrBehu2GIV0vbFriZe43aa\">\u002Fcost\u003C\u002Fcode>, and look at your cache hit rate. If it is still ugly, the report will now tell you which part of your setup is to blame.\u003C\u002Fp>\n",1788507918408]