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
kammy
Hi everyone! The other day I was having a debate with my friends about whether or not the top LLM models are “good at design.” I’d love ...
New
nix0097
Hello I hope you’re doing well. I’m looking to develop a custom chatbot and would love to collaborate with you on this project. The chat...
New
xiji2646-netizen
DeepSeek officially launched deepseek-v4-flash and deepseek-v4-pro in preview on April 24, 2026. The legacy routes (deepseek-chat, deepse...
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
Codex mobile in the ChatGPT app https://techcrunch.com/wp-content/uploads/2026/05/App-view.png?resize=1200,675) Codex shipped a batch o...
New
xiji2646-netizen
Google shipped 3.5 Flash at I/O 2026. The “budget” Flash model now beats 3.1 Pro on coding and tool-calling benchmarks. Key numbers (fro...
New

Other popular topics Top

AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
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
PragmaticBookshelf
Create efficient, elegant software tests in pytest, Python's most powerful testing framework. Brian Okken @brianokken Edited by Kat...
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
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
New
PragmaticBookshelf
Build modern server-driven web applications using htmx. Whatever programming language you use, you’ll write less (and cleaner) code. ...
New
PragmaticBookshelf
Explore the power of Ash Framework by modeling and building the domain for a real-world web application. Rebecca Le @sevenseacat and ...
New
NewsBot
Node.js v22.14.0 has been released. Link: Release 2025-02-11, Version 22.14.0 'Jod' (LTS), @aduh95 · nodejs/node · GitHub
New
PragmaticBookshelf
Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
New