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
AstonJ
Can you spot the AI generated person in the pic below? ▶ Spoiler Video here:
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New
apoorv-2204
General thoughts on google gemini ? IMHO , when compared chatgpt and claude sonnnet its pretty shit, and its feels broken,
#ai
New
apoorv-2204
How are you using AI in my life? How the day to day life is changed around you? professional and in personal life? I it use for autocom...
#ai
New
xiji2646-netizen
Just went through the Anthropic migration guide for Opus 4.7 and there are more gotchas than the announcement implied. Curious if others ...
New
xiji2646-netizen
Google just dropped a significant Deep Research upgrade: collaborative planning, multi-tool orchestration (MCP servers, Code Execution, F...
New
xiji2646-netizen
Alibaba just opened public API access for HappyHorse 1.0, the model currently ranked #1 on Video Arena’s blind tests. What caught my att...
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
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 ...
New

Other popular topics Top

PragmaticBookshelf
Stop developing web apps with yesterday’s tools. Today, developers are increasingly adopting Clojure as a web-development platform. See f...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
PragmaticBookshelf
Build modern server-driven web applications using htmx. Whatever programming language you use, you’ll write less (and cleaner) code. ...
New