Token Counting for Fun and Profit

One skill invocation in a Claude Code session wrote 261,974 tokens into the prompt cache. The tokens replayed from cache on each subsequent request went from 93,786 to 355,760, and 93,786 + 261,974 = 355,760 exactly. Every turn after that point cost several times what the turns before it cost, for the rest of the session. That arithmetic is the mechanism confirming itself. Model choice and…