xiji2646-netizen

xiji2646-netizen

Anyone else hitting Claude Code rate limits way too fast?

Been using Claude Code on Max for a few weeks and kept running into rate limits by early afternoon. Same tasks as colleagues who weren’t hitting limits at all. Figured it was just quota differences, but it turns out the issue was entirely on my end.

Anthropic just published an engineering post explaining how Claude Code’s cost structure actually works, and it changed how I use the tool.

The core mechanic: every request is built as a prefix chain (system prompt → tools → project docs → messages). The API caches that chain. If the prefix matches on the next request, those tokens cost 1/10 the normal price. If anything in the prefix changes, the cache invalidates from that point forward — full price recalculation.

The things I was doing that were silently killing my cache:

  • Switching between Sonnet and Opus mid-conversation with /model. Cache is model-bound, so every switch wiped everything I’d accumulated.

  • Opening a new claude session for every task instead of continuing the previous one.

  • Adding MCP tools mid-session when I needed them. Tool definitions are part of the cached prefix.

The fix that made the biggest difference: claude --resume. It restores your last session and picks up the cache chain where it left off. I’d never used it before.

Also: long conversations actually get cheaper over time because of how Claude Code’s compaction works. I was doing the opposite — short sessions, frequent restarts — which meant I was always paying full price for the first turns.

Full writeup here if you want the details:

https://www.anthropic.com/engineering/claude-code-prompt-caching

Curious if others have noticed the model-switching issue specifically — that one surprised me the most.

Where Next?

Popular Ai topics Top

AstonJ
This video about multi-agent AI is a really nice watch - it only took them a few million tries to master certain strategies - doing much ...
#ai
New
Eiji
Today, I tried to find some information and few times I not only got completely wrong answers, but even fake GitHub links … Every time I ...
#ai
New
apoorv-2204
General thoughts on google gemini ? IMHO , when compared chatgpt and claude sonnnet its pretty shit, and its feels broken,
#ai
New
Eiji
Yesterday a very interesting to discuss situation have happen. While StackOverflow still suffer a lot, because of chat bots, but yesterda...
New
xiji2646-netizen
I’ve been tracking this for the past two weeks and wanted to see if others are experiencing the same thing. BridgeBench (independent hal...
New
xiji2646-netizen
There’s a GitHub repo at forrestchang/andrej-karpathy-skills that’s sitting at 97.8k stars. It’s a single CLAUDE.md file with four behavi...
New
xiji2646-netizen
Anthropic shipped Opus 4.7 last week and the agentic coding improvements look real. But the breaking changes are giving me pause. Specif...
New
xiji2646-netizen
Curious how others deal with this: you start a refactoring task with your AI coding assistant, close the terminal, come back – and it has...
New
xiji2646-netizen
Anthropic shipped something called Dreaming for Managed Agents this week. It’s a scheduled background process that runs between sessions ...
New
xiji2646-netizen
Been using the skills repo (77K stars, #1 on GitHub Trending recently) with Claude Code. Sharing what worked and what did not. What work...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
New