{"data":{"items":[{"id":"0cc70640-ce2c-47f6-97d4-9c269f0fcb22","excerpt":"Opus 4.6/4.7 regression is real and getting worse — 3 weeks of documented failures on a complex project, and a competing AI caught the mistakes Claude missed [long post] — I've been running Claude Pro (Opus 4.7 / Sonnet 4.6) for about 3 weeks on a complex personal AI infrastructure project. I keep structured session lo","url":"https://www.reddit.com/r/ClaudeAI/comments/1tjjvwc/opus_4647_regression_is_real_and_getting_worse_3/","role":"demand","weight":1.3385047,"occurredAt":"2026-05-21T13:03:42.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeAI","intent":"alternative_search","painScore":0.6195082,"sentiment":-0.57377046,"confidence":0.8264884,"matchedPatterns":["terrible","alternative_to"],"statement":"In one pass it identified **5 critical corrections** that Claude had never caught across weeks of sessions: * NSSM is dead since \\~2017 → correct replacement is WinSW or Servy * Neo4j 2025.01+ **requires Java 21** — Claude had never flagge…","title":"Opus 4.6/4.7 regression is real and getting worse — 3 weeks of documented failures on a complex project, and a competing AI caught the mistakes Claude missed [long post]","body":"I've been running Claude Pro (Opus 4.7 / Sonnet 4.6) for about 3 weeks on a complex personal AI infrastructure project. I keep structured session logs with timestamps and Birkenbihl-style metacognitive fields after every session. This is not anecdotal — I have receipts.\n\n**The project for context**\n\nI'm building a local persistent AI memory stack called GSOC Brain: Qdrant vector DB (\\~397K vectors across 11 source tags), Neo4j graph (123 nodes / 183 edges), Graphiti 0.29 entity extraction, Ollama with qwen2.5:14b + nomic-embed-text — all running natively on a Windows host. The system is supposed to give Claude cross-chat memory via a custom MCP server. On top of that, I'm operating 18+ custom skill files that define behavior rules for Claude across domains (OSINT/forensics, legal, content, infrastructure). The system prompt explicitly describes the full architecture on every session start.\n\nThis is not a \"chat with Claude\" use case. This is sustained agentic work across multiple tools, multiple sessions, strict context requirements, and high-stakes outputs (including legal document drafts).\n\n**Bug 1: Token overconsumption since update 2.1.88 (late March 2026)**\n\nOpus 4.7 started burning daily usage limits at a completely different rate after an update around March 31. In one session I hit **94% of my daily limit within approximately 4 messages**. The boot sequence — fetching context from Notion MCP, searching past sessions, loading memory — consumed what felt like 10–20x the previous token rate.\n\nGitHub issues #42272, #50623, and #52153 document identical patterns from other users. The model appears to over-generate internally even for simple responses. End result: I had to switch to Sonnet 4.6 for most productive work because Opus 4.7 is simply unusable under the daily limit.\n\n**Bug 2: Claude Code Desktop App completely broken (reported May 14, Conv. 215474208295333)**\n\nThe Desktop App hangs on **every single input**. Including typing \"hello\" with no files. Reproducible across:\n\n* Sonnet 4.6 and Opus 4.7\n* Multiple fresh sessions\n* With and without u/file references\n* After full reinstall\n\nThe VS Code extension works fine. Only the Desktop App is broken. Reported May 14. No fix, no acknowledgment.\n\n**Bug 3: Platform / context confusion — 5 documented errors in a single session, chat aborted**\n\nOn April 29, I had to formally abort an Opus 4.7 session and hand off to Opus 4.6 after documenting 5 consecutive errors. The session log entry literally reads \"Opus 4.7 Abbruch (5 Fehler): Zeitrechnung, Platform-Verwechslung, falsche Schlüsse\":\n\n1. Miscalculated the current time despite being told the exact time\n2. Insisted the Brain stack was running on a Linux VM (BURAN) — the system prompt and memory both explicitly stated `C:\\gsoc-brain` on Windows\n3. Drew false inferences from backup file paths rather than the stated architecture\n4. Contradicted the stated platform in the same response it had just received\n5. Confused WebClaude and Desktop Claude capability boundaries\n\nThese aren't edge cases. The architecture was in the system prompt, in memory, and in the injected Notion context. Opus 4.7 ignored all of it.\n\n**Bug 4: Skill files ignored in production**\n\nI maintain 18+ custom skill files loaded into the system prompt. These include explicit hard rules — e.g., \"activate `keilerhirsch-knowledge` skill for ALL architecture decisions, web search is not optional.\" In the session that caused the Docker-to-Native migration disaster, I later wrote in my own session log:\n\n>\n\nThe model proceeded to recommend outdated tools from training data rather than searching current documentation. It recommended **NSSM** (last meaningful update 2017) as a Windows service wrapper. NSSM is dead. A competing AI caught this immediately.\n\n**Bug 5: Another AI caught what Claude missed in a single pass**\n\nThis is the part that stings most. When the Docker-based Brain setup kept failing, I fed the architecture docs into another AI (Manus) for a deep audit. In one pass it identified **5 critical corrections** that Claude had never caught across weeks of sessions:\n\n* NSSM is dead since \\~2017 → correct replacement is WinSW or Servy\n* Neo4j 2025.01+ **requires Java 21** — Claude had never flagged this, the services kept failing silently\n* Qdrant needs Windows file-handle-limit adjustments to run reliably\n* Orphaned vector risk between Qdrant ↔ Neo4j without a Tentative-Write pattern in the save operation\n* BGE-M3 embeddings (MTEB 63.2, 8192 token context) as a better alternative to nomic-embed-text\n\nMy own session log the next day reads:\n\n>\n\nClaude was answering from stale training data. The skill that explicitly says \"don't do this\" was being ignored. Another AI caught it in round one.\n\n**Bug 6: MCP Server 20-minute Neo4j hang — still unresolved**\n\nAfter the native migration, the custom `gsoc_mcp_server.py` developed a reproducible hang of exactly \\~20 minutes between Qdrant connect and Neo4j connect on every startup. Log timestamps from 4 consecutive restarts:\n\n    14:59 → 15:20  (21 min)\n    15:29 → 15:51  (22 min)\n    16:27 → 16:49  (21 min)\n    20:06 → 20:29  (22 min)\n    \n\nDesktop Claude times out waiting for the MCP server → Brain is inaccessible. Root cause still unknown. Likely Graphiti schema init with a silent retry loop and no configurable timeout in the MCP SDK. There is no documentation on how to set connection timeouts for MCP server startup.\n\n**Bug 7: Hallucinated data in a critical legal document**\n\nIn a session involving a legal filing draft, Opus generated a **wrong street address** — a hallucinated placeholder that had never appeared in any uploaded document. The correct address was in memory, in the Notion context fetch, and in multiple previously uploaded source documents. The model didn't cross-check any of it. For court filings, this is not a minor inconvenience.\n\n**Bug 8: Thinking depth collapse in long sessions**\n\nAligns exactly with Stella Laurenzo's AMD data (6,852 sessions). After \\~30% context window usage, response depth noticeably drops. Multi-step plans get truncated. Decisions from earlier in the session get quietly contradicted. I've had to implement artificial session breaks and full context handoff documents just to maintain baseline quality across a single working day.\n\nMy session log explicitly names this: \"**Service-Pings ≠ User-Erfolg — Scorecards müssen das messen was der User braucht, nicht das was einfach zu prüfen ist.**\" (Service pings ≠ user success — scorecards must measure what the user needs, not what's easy to check.)\n\n**The communication problem**\n\nAnthropic's response pattern across all of this:\n\n* No changelog for behavior changes between minor versions\n* Support ticket open for multiple weeks — responses are generic templates or silence\n* Boris Cherny's \"it's just a UI change, thinking is fine internally\" is not a satisfying answer when task completion rates demonstrably drop\n* Bug reports go to \"Informative\" on GitHub with no engineering follow-up\n* The competing AI audit found in one session what weeks of Claude sessions missed — and the only reason I found out is because I went looking elsewhere\n\n**What actually works**\n\nSonnet 4.6 in WebClaude is more reliable for my workflow than Opus 4.7 right now. Faster, cheaper, doesn't hallucinate the architecture, doesn't burn the limit in 4 messages. The flagship model is currently my fallback, not my primary.\n\n**What I want from Anthropic**\n\n1. A behavioral changelog — not just benchmark numbers\n2. Honest communication when safety updates have side effects on agentic/tool-use performance\n3. Fix the Desktop App hang or at least acknowledge it\n4. Token overconsumption: fix it or reduce limit restrictions accordingly\n5. Skill/system prompt compliance: if I define `ALWAYS activate X skill`, it should not be silently ignored\n6. MCP SDK documentation on connection timeouts during server init\n\nIf you're running sustained agentic workflows with custom skills, memory systems, or MCP servers and seeing similar patterns — drop specifics below. The more documented cases, the harder it is to call this noise.","offTopic":true},{"id":"93b2f995-39c8-44e8-986f-f67504038625","excerpt":"I accidentally burned ~$6,000 of Claude usage overnight with one command. — Last week I woke up to an email saying my Claude usage limit was gone. I hadn't done anything unusual — or so I thought.\n\nAfter digging through the local session logs, I found the culprit: a single /loop command I had set the night before to ch","url":"https://www.reddit.com/r/ClaudeAI/comments/1t11mmy/i_accidentally_burned_6000_of_claude_usage/","role":"pain","weight":1.2104167,"occurredAt":"2026-05-01T18:26:06.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeAI","intent":"problem_report","painScore":0.66,"sentiment":-0.75,"confidence":0.7291667,"matchedPatterns":["manual_process"],"statement":"The Anthropic dashboard still showed a fraction of that when I checked it manually.","title":"I accidentally burned ~$6,000 of Claude usage overnight with one command.","body":"Last week I woke up to an email saying my Claude usage limit was gone. I hadn't done anything unusual — or so I thought.\n\nAfter digging through the local session logs, I found the culprit: a single /loop command I had set the night before to check my open PRs every 30 minutes. I forgot about it. It ran 46 times over 26 hours,  unattended, overnight, on claude-opus-4-7. Two sessions — the loop and a long analytics session I had left open — together burned through roughly $6,000 before I woke up.\n\nHere's the thing though. The Anthropic dashboard still showed a fraction of that when I checked it manually. The dashboard has a multi-day reporting lag, so I had no idea anything was wrong until the limit email landed.\n\n***Why did it cost so much? The part most people don't know.***\n\nEvery Claude API call sends your entire conversation history — not just the latest message. Turn 1 sends a few hundred tokens. Turn 46 sends 800,000 tokens. The context window limit is just a ceiling; you pay for  everything sent on every turn.\n\nTo make this cheaper, Anthropic uses prompt caching: if your conversation history was already sent recently, they serve it from cache at a 12.5× discount instead of charging you full price again.\n\nThe catch: cache entries expire after \\~5 minutes of inactivity. (Earlier it was 1 hour)\n\nSo here's what happens with /loop 30m:\n\n* Loop fires → history gets cached → 30 minutes pass → cache expires\n* Loop fires again → cache is gone → must re-cache the entire conversation from scratch at the expensive write rate\n* Each iteration also adds its own output to the conversation, so the next re-cache is even larger\n\nBy hour 20, the conversation had grown to \\~800K tokens. Every overnight iteration was paying to re-cache 800K tokens at the expensive write rate. The actual PR check responses were a rounding error compared to this.\n\n***What I'd do differently***\n\n1. Always add a stop condition to /loop. Instead of: /loop 30m check my PRs. Write: /loop 30m check my PRs — stop when all are merged or after 3 hour. Claude will terminate the loop itself when the condition is met.2. Use Sonnet for unattended tasks, not Opus:  Opus is roughly 5× more expensive per output token. For automated polling tasks like PR checks, Sonnet handles it fine. Save Opus for the work where you're actually present and the quality difference matters.\n2. Don't trust the dashboard as a real-time budget gauge: Anthropic's usage dashboard can lag by days. By the time it shows a spike, the money is already spent. The limit notification email may be your only real-time signal.\n3. Know that long-lived sessions aren't free: Keeping one big session alive for automated tasks doesn't save money through caching — it makes it worse. Every automated call with a gap >5 minutes pays to re-cache the entire growing context. Starting a fresh session is often cheaper.\n4. max\\_turns is not a loop limiter:  max\\_turns caps the tool-call chain within a single iteration. It has no effect on how many times the loop fires. The only built-in expiry on /loop is a 7-day auto-deletion.\n5. The loop runs in main conversation so if you keep using the same session and then loop starts executing, the more token then necessary will be read/write to the cache on every loop.\n\nEdit:\nThanks everyone for overwhelming response and focusing on \"the post is AI written so it's a slop and author is an idiot\". Now based on few comments, let me add more details:\n1. I agree with everyone that I should have used hooks but corporate generally blocks third party mcps because of security so there is no easy way to hook external events into local sessions. Although I will take \"use bash scripts over claude loop\" seriously. \n2. This was not a single session or single loop command. What I meant by \"single command\" is /loop. I use claude on vms and local machine and so the loop command was running across different sessions in parallel. \n3. I agree that \"most people don't about\" thing was not a good thing to start the post but it was for the loop + cache window restricted to 5 mins. I have used loops earlier as well but 5 min vs 1h cache affect the price a lot . You can go and find many open issues on Claude related to this change. \n4. This post's goal was to share a TIL moment about using short , uncapped loops or schedules using Claude and educating that cache read/writes can affect your token cost more than anything else. But looks like we are very far from there. \n5. Thanks to the guy who shared Pyramid writing medium blog. I will definitely use for the next post. \n6. To be honest, I am quite disappointed that 90% people just care about post is written by AI over actual issue. But I guess I get that, everyone is exhausted from reading AI slop.","offTopic":false},{"id":"813b765f-31d2-4909-8415-ddb572c5ac84","excerpt":"18 hidden token drains in AI coding agent sessions (and practical ways to fix them) — [Original Reddit post](https://www.reddit.com/r/ClaudeCode/comments/1wcognm/18_hidden_token_drains_in_ai_coding_agent/)\n\nHi everyone, sharing some notes from running hundreds of automated agent sessions across Claude Code, Codex, and ","url":"https://lemmy.world/post/51771376","role":"pain","weight":0.6455731,"occurredAt":"2026-09-10T21:07:17.059Z","sourceKey":"lemmy","sourceName":"Lemmy","credibility":0.58,"venue":"lemmy.world","intent":"other","painScore":0.4,"sentiment":-1,"confidence":0.46112362,"matchedPatterns":["product:claude"],"statement":"Compaction overhead : When the agent hits a context limit, the summarization turn sends the entire bloated history at full input pricing.","title":"18 hidden token drains in AI coding agent sessions (and practical ways to fix them)","body":"[Original Reddit post](https://www.reddit.com/r/ClaudeCode/comments/1wcognm/18_hidden_token_drains_in_ai_coding_agent/)\n\nHi everyone, sharing some notes from running hundreds of automated agent sessions across Claude Code, Codex, and Cursor.\nWe started logging raw API request payloads over a local proxy to see where the token budget actually vanishes during long refactoring runs.\nHere are 18 specific token drains that quietly bloat your context window and bill:\nUnfiltered test runner outputs\n: Passing a full pytest or jest run that outputs 400 lines of passing dot-logs injects thousands of tokens that stay in the history for every future turn. (Fix: pipe with `--quiet` or filter for failures only).\nMultiple idle MCP servers\n: Every active MCP tool registers its complete JSON parameter schema on every single turn. Five unused servers can burn 15k input tokens per request before the model reads your prompt.\nMid-session rule tweaks\n: Editing your root project instructions mid-session invalidates the prefix prompt cache, causing you to lose the 90% input token discount on the next turn.\nRedundant directory tree traversals\n: Asking an agent to \"find the file where X is defined\" often triggers 4 separate glob and grep tool calls that get preserved in the message log. (Fix: pass the exact file path).\nCompaction overhead\n: When the agent hits a context limit, the summarization turn sends the entire bloated history at full input pricing.\nGit diff re-reading\n: Requesting git status or git diff repeatedly without committing leaves duplicate diff snapshots stacked across turns.\nVerbose typecheck traces\n: TypeScript errors that output giant generic instantiation traces take up massive prompt space.\nExtended reasoning output tax\n: For hard tasks, thinking blocks can be 3x to 5x longer than the final code edit. Because output tokens cost more than input tokens, thinking often drives most of the dollar cost.\nSubagent sprawl:\nSpawning autonomous explore or plan subagents multiplies your tool calls Unconstrained subagents can spend 30k tokens just mapping directories.\nUnpruned rule sprawl in instructions\n: Stuffing 400 lines of static guidelines into a single instruction file dilutes reasoning and bloats every baseline turn. (You can use tigerless-autoharness on GitHub to distill skills dynamically from real sessions and prune stale ones automatically instead of maintaining giant static prompts).\nRepetitive system prompts across tools\n: Multiple custom skills that duplicate foundational build commands rather than sharing a root config.\nLingering stack traces\n: Leaving 5 previous debugging attempts in the active conversation while working on an unrelated bug.\nFormatting/Lint runs inside the LLM: Asking the model to format code instead of letting a pre-commit hook or local linter do it deterministically.\nLog outputs with ANSI color codes:\nRaw terminal color codes and escape characters add significant token bloat without aiding reasoning.\nInvisible payload bloat:\nMost developers only look at the final token bill, which hides the split between prompt cache, MCP blocks, and tool outputs. (You can use open-sourced cost-xray to capture local proxy traffic and attribute exact tokens and costs back to individual request sources).\n16. Unpinned tool definitions:\nTools that return dynamic schema metadata invalidate prompt caches across turns.\nPremature multi-file refactoring:\nAsking for wide architectural updates in one turn forces the model to load dozens of file buffers simultaneously.\nZombie sessions:\nContinuing a debugging session after a feature is already merged, which carries obsolete context into new tasks.\nWhich of these have caused the biggest surprise in your own agent bills, and what habits do you use to keep context tight?\nsubmitted by\n/u/EmployerNegative5653\n\nOriginally posted by u/EmployerNegative5653 on r/ClaudeCode","offTopic":false},{"id":"105cdeb8-9ec6-46f6-9d53-0e1b0161b3bc","excerpt":"Before you complain about Opus 4.5 being nerfed, please PLEASE read this — NOTE: this is longer than I thought it would be, but it was not written with the assistance of Artificial (or Real) Intelligence.\n\nFirst of all - I'm not saying Opus 4.5 performance hasn't degraded over the last few weeks. I'm not saying it has ","url":"https://www.reddit.com/r/ClaudeCode/comments/1qpd4ro/before_you_complain_about_opus_45_being_nerfed/","role":"demand","weight":1.2042708,"occurredAt":"2026-01-28T14:40:07.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeCode","intent":"alternative_search","painScore":0.375,"sentiment":0.71428573,"confidence":0.87583333,"matchedPatterns":["frustrating","alternative_to"],"statement":"Remember that alternative to \"pair programming\" that I mentioned all the way up there?","title":"Before you complain about Opus 4.5 being nerfed, please PLEASE read this","body":"NOTE: this is longer than I thought it would be, but it was not written with the assistance of Artificial (or Real) Intelligence.\n\nFirst of all - I'm not saying Opus 4.5 performance hasn't degraded over the last few weeks. I'm not saying it has either, I'm just not making a claim either way.\n\nBut...\n\nThere are a bunch of common mistakes/suboptimal practices I see people discuss in the same threads where they, or others, are complaining about said nerfdom. So, I thought I'd share some tips that I, and others, have shared in those threads. If you're already doing this stuff - awesome. If you're already doing this stuff and still see degradation, then that sucks.\n\nSo - at the core of all this is one inescapable truth - by their very nature, LLMs are unpredictable. No matter how good a model is, and how well it responds to you today, it will likely behave differently tomorrow. Or in 5 minutes. I've spent many hours now designing tools and workflows to mitigate this. So have others. Before you rage-post about Opus, or cancel your subscription, please take a minute to work out whether maybe there's something you can do first to improve your experience. Here are some suggestions:\n\n**Limit highly interactive \"pair programming\" sessions with Claude.**\n\nYou know the ones where you free-flow like Claude's your best buddy. If you are feeling some kind of camaraderie with Claude, then you're probably falling into this trap. If you're sick of being *absolutely right* \\- this one is for you.\n\nWhy? Everything in this mode is completely unpredictable. Your inputs, the current state of the context window, the state of the code, your progress in our task, and of course, our friend Opus might be having a bad night too.\n\nYou are piling entropy onto the shaky foundation of nondeterminism. Don't be surprised if a slight wobble from Opus brings your house of cards falling down.\n\nSo, what's the alternative? We'll get to that in a minute.\n\n**Configure your CC status line to show % context consumed**\n\nI did this ages ago with [ccstatusline](https://github.com/sirmalloc/ccstatusline) \\- I have no idea if there's a cooler way of doing it now. But it's critical for everything below.\n\n**DO NOT go above 40-50% of your context window and expect to have a good time.** \n\nYour entire context window gets sent to the LLM with every message you send. All of it. And it has to process all of it to understand how to respond.\n\nYou should think of everything in there as either signal or noise. LLMs do best when the context window is densely packed with signal. And to make things worse - what was signal 5 prompts ago, is now noise. If your chat your way to 50% context window usage, I'd bet money that only a small amount of context is useful. And the models won't do a good job of understanding what's signal and what's noise. Hence they forget stuff suddenly, even with 50% left. In short Context Rot happens sooner than you think.\n\nThat's why I wince whenever I read about people disabling auto-compact and pushing all the way to 100%. You're basically force feeding your agent Mountain Dew and expecting it to piss champagne.\n\n**Use subagents.**\n\nThe immaculately mustached Dexter Horthy once said \"subagents are not for playing House.md\". Or something like that. And as he often is, he was right. In short, subagents use their own context window and do not pollute your main agent's. Just tell claude to \"use multiple subagents to do X,Y,Z\". Note: I have seen that backgrounding multiple subagents fills up the parent’s context window - so be careful of that. Also - they're context efficient but token inefficient (at least in the short term) - so know your limits.\n\n**Practice good hygiene**\n\nKeep your CLAUDE.md (including those in parent directories) tight. Use Rules/Skills. Clean up MCPs (less relevant with [Tool Search](https://x.com/trq212/status/2011523109871108570) though). All in the name of keeping that sweet sweet signal/noise ratio in a good place.\n\n**One Claude Session == One Task. Simple.**\n\nBreak up big tasks. This is software engineering 101. I don't have a mathematical formula for this, but I get concerned what I see tasks that I think could be more than \\~1 days work for a human engineer. That's kind of size that can get done by Claude in \\~15-20 mins. If there is a lot of risks/unknowns, I go smaller, because I'm likely to end up iterating some.\n\nTo do this effectively, you need to externalize where you keep your tasks/issues, There are a bunch of ways to do this. I'll mention three...\n\n1. .md files littered across your computer and (perhaps worse) your codebase. If this is your thing, go for it. A naive approach: you can fire up a new claude instance and ask it to read a markdown file and start working on it. Update it with your learnings, decisions and progress as you go along. Once you hit \\~40% context window usage, `/clear` and ask Claude to read it again. If you've been updating it, that .md file will be full of really dense signal and you'll be in a great place to continue again. Once you're done, commit, push, drink, smoke, whatever - BUT CLOSE YOUR SESSION (or `/clear` again) and move on with your life (to the next .md file).\n2. [Steve Yegge's Beads](https://github.com/steveyegge/beads)™. I don't know how this man woke up one day and pooped these beads out of you know where, but yet, here we are. People love *Steve Yegge's Beads*™. It's basically a much more capable and elegant way of doing the markdown craziness, backed by JSONL and SQLite, soon to be something else. Work on a task, land the plane, rinse and repeat. But watch that context window. Oh, actually Claude now has the whole Task Manager thing - so maybe use that instead. It's very similar. But less beady. And, for the love of all things holy don't go down the *Steve Yegge's Gas Town*™ rabbit hole. (Actually maybe you should).\n3. Use an issue tracker. Revolutionary I know. For years we've all used issue trackers, but along come agents and we forget all about them - fleeing under the cover of dark mode to the warm coziness of a luxury markdown comforter. Just install your issue tracker's CLI or MCP and add a note your claude.md to use it. Then say \"start issue 5\" or whatever. Update it with progress, and as always, DO NOT USE MORE THAN \\~40-50% context window. Just /clear and ask the agent to read the issue/PR again. This is great for humans working with other humans as well as robots. But it's slower and not as slick as *Steve Yegge's Beads*™.\n\n**Use a predictable workflow**\n\nAre you still here? That's nice of you. Remember that alternative to \"pair programming\" that I mentioned all the way up there? This is it. This will make the biggest difference to your experience with Claude and Opus.\n\nKeep things predictable - use the same set of prompts to guide you through a consistent flow for each thing you work on. You only really change the inputs into the flow. I recommend a \"research, plan, implement, review, drink\" process. Subagents for each step. Persisting your progress each step of the way in some external source (see above). Reading the plans yourself. Fixing misalignment quickly. Don't get all buddy buddy with Claude. Claude ain't your friend. Claude told me he would probably sit on your chest and eat your face if he could. Be flexible, but cold and transactional. Like *Steve Yegge's Beads*™.\n\nThere are a bunch of tools out there that facilitate some form of this. There's [superpowers](https://github.com/obra/superpowers), [GSD](https://github.com/glittercowboy/get-shit-done), and [one that I wrote](https://iloom.ai/). Seriously - [So](https://github.com/Priivacy-ai/spec-kitty). [Fucking](https://github.com/Fission-AI/OpenSpec). [Many](https://github.com/github/spec-kit). You have no excuse.\n\nAlso, and this is important: when things go wrong, reflect on what you could have changed. Code is cheap - throw it away, tweak your prompts or inputs and just start again. My most frustrating moments with Claude have been caused by too much ambiguity in a task description, or accidental misdirection. [Ralph Wiggum dude](https://ghuntley.com/) called this Human On The Loop instead of *In* the loop. By the way, loop all or some of the above workflow in separate claude instances and you get the aforementioned loop.\n\n\\--------\n\nDoing some or all of the above will not completely protect you from the randomness of working with LLMs, BUT it will give Opus a much more stable foundation to work on - and when *you know who* throws a wobbly, you might barely feel it.\n\nBonus for reading to the end: did you know you can use `:q` to quit CC? It’s like muscle memory for me, and quicker than `/q` because it doesn’t try to load the command menu.","offTopic":true},{"id":"9d809555-6198-4ef9-8625-bb0d414481c7","excerpt":"Anthropic broke your limits with the 1M context update — Warning: wall of text ahead. TL;DR is at the bottom.\n\nWe've all seen the posts. [Something changed recently](https://platform.claude.com/docs/en/release-notes/overview).\n\nAnthropic **quintupled the maximum context size** for Opus and Sonnet 4.6 without beta featu","url":"https://www.reddit.com/r/claude/comments/1s3vsm5/anthropic_broke_your_limits_with_the_1m_context/","role":"pain","weight":1.1972684,"occurredAt":"2026-03-26T02:54:30.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"claude","intent":"problem_report","painScore":0.378812,"sentiment":-0.36,"confidence":0.86833334,"matchedPatterns":["how_can_i","frustrating"],"statement":"Using projects with context files can also help save you the need to upload the same portable context repeatedly, if that gets annoying.","title":"Anthropic broke your limits with the 1M context update","body":"Warning: wall of text ahead. TL;DR is at the bottom.\n\nWe've all seen the posts. [Something changed recently](https://platform.claude.com/docs/en/release-notes/overview).\n\nAnthropic **quintupled the maximum context size** for Opus and Sonnet 4.6 without beta features on March 13th, 2026 - with no way to disable it to return to the old 200k context window on the web app. (For Claude Code, you can disable it with `CLAUDE_CODE_DISABLE_1M_CONTEXT=1` )\n\nIt **remained a beta feature** for Sonnet 4.5 and 4.\n\nFrom the looks of things, a lot of the limits complaints started somewhere between one to two weeks ago - this change was the most recent major change to the Claude platform.\n\n***But more context is good, right?***\n\nNot for your limits. You see, if the platform limits roughly follow [the API pay-as-you-go pricing](https://platform.claude.com/docs/en/about-claude/pricing), (the fact that Claude Code can use subscription usage limits makes this likely) then the following is true:\n\nInput tokens (no caching) cost 1x (we're using them as the baseline reference)  \nCache writes (new inputs) cost 1.25x for 5 minute caching or 2x for 1 hour caching.  \nCache reads (reuses of existing recent inputs) cost .1x  \nOutput tokens cost 5x  \nThinking tokens count as output tokens - so they cost 5x.\n\nThis holds constant **regardless of model used**. However, each model's base price is different:\n\nHaiku costs 1x  \nSonnet costs 3x  \nOpus costs 5x\n\nThe model costs stack multiplicatively with the type of token, with the caveat that the more expensive models also tend to think more, and thus generate more thinking tokens.\n\nExtended models appear to use the same pricing, but have a higher tendency to think for longer. The same likely goes for `ultrathink` , but I have not tried that feature.\n\nBut it gets worse. Subsequent messages also use **all prior outputs as input**. This means, effectively, non-final output and thinking tokens tokens cost 6.25x or 7x. (and then .1x on all subsequent accesses while the cache persists)\n\n***Okay, but why does this matter?***\n\nYou see that timeframe on the cache? If that expires (presumably since last read) then the input **stops being cached**. It needs to be **re-cached** the next time you use the context. Which means every single token in that context? It's hitting you at **1.25x** or **2x** usage - a massive jump from the **near-.1x** (first cache cost brings the average up a little) you're probably used to from creating it, making it look like something suddenly changed.\n\nIn other words, it didn't - aside from the fact that the context window size limit was increased, letting you build bigger piles to ram into that multiplier - actually decrease your limits. It made it easier to be **sloppy** if you use Sonnet or Opus, racking up massive contexts that are decently efficient due to the caching. And then once the cache goes cold, you're stuck with a brick of frozen context, because you can't send a message to keep the cache warm after warming it up, leading to the terrible feeling feedback loops that people are complaining about.\n\n***Okay, well I'm hitting my limits on a new chat! They changed something!***\n\nDo you have the ability for Claude to search other chats turned on? If so, it may be gobbling up your limit looking for context in frozen chats - it's better to use project files or external files that you upload at the start of a chat as portable context (context that's easily taken from chat to chat) to avoid this.\n\nIf that setting is off, then how much portable context are you using, and more importantly, **what are your prompts like**? Sonnet and Opus have a **strong tendency to overthink** and burn tokens spinning in circles if **given unclear prompts** \\- and they won't always ask you for clarification to break themselves out, likely to mitigate prompt fatigue. (a phenomenon where people become less critical of popups and more likely to just click through them the more of them they have to deal with)\n\n**You should be ready to stop Sonnet or Opus at any time** if they seem stuck or start thinking for too long - every token they think is an output token that clogs up your context and burns up your usage limit.\n\n***How do I fix this?! I need that chat!***\n\nGood news. Frozen context isn't unrecoverable, but it won't be possible to just pick it up and move it elsewhere. Using the frozen context directly causes the problem due to its sheer size.\n\nThe first thing you'll have to do is wait for your usage to refresh if it's already capped out, or use some extra pay-as-you-go usage. Then, open the frozen chat and ask Claude to **summarize it and output it to a file you can download**.\n\nThis will still likely blow your usage limit, as it still has to re-cache the entire context. However, once it's done, you can take that file and use it as portable context - if it's still bulky, you can give it to another model to curate further; otherwise, simply keep it around and upload it when you need it. **Congratulations, your frozen context has been saved.**\n\n***Okay. I fixed it, now how can I stop this moving forward?***\n\nGet more proactive with managing your token efficiency. On the web, this means retiring (but not necessarily *deleting*) chats when they grow large and you will be away for a while. If you still need to carry the context forward, have Claude summarize it for you. Using projects with context files can also help save you the need to upload the same portable context repeatedly, if that gets annoying.\n\nClaude Code gives you much more powerful tools for token efficiency management:\n\n* Use subagents or skills with `context: \"fork\"` to execute tasks and only return the valuable output to the main agent, preventing thinking tokens from bloating the context.\n* Build tools that reduce the amount of work the agent has to do - if you can turn an entire process the model has to go through into a single tool call, you massively cut down on output tokens and, to an extent, context bloat. Good naming of these tools is important - if the tool is poorly named or unfamiliar-sounding, Claude may ignore it in favor of familiar alternatives; for example, `search-doc` may be ignored in favor of grep or find, but `grep-doc` will probably be used instead of grep if it works.\n* Don't neglect information pre-processing tools - a read-doc script or similar that converts bulky HTML or JSON to Markdown or plain text works wonders, and variants of it that integrate common tools that Claude likes to use (grep, find, etc.) can help limit its tendency to get creative with piping and thus trigger pointless permission popups.\n* Use rules to dynamically embed context only when it's relevant to what the agent is doing. It doesn't need to know how to write a Lua file if it's not looking at a Lua file.\n\nAnother powerful prevention method, however: **Use a lighter model**. Many common and simple tasks, if specified well, can be executed by a lighter model like Haiku, which is cheaper, thinks less, and is less prone to getting stuck overthinking. And Haiku, especially, only has a 200k context window - so it flat out won't produce blocks of frozen context as large as Sonnet and Opus allow you to now.\n\nIf it misbehaves, don't assume that it can't do it. The model might not be broken or incapable - it might just be indicating that your tools or skills could be named better or have a gap that needs filling.\n\nTo be clear, I am not asking you to settle for less. I'm asking you to help your Claude work smarter, not harder, which will reflect in your usage limits without reducing your output quality. I've found that sometimes, even tasks you'd think need Sonnet for are possible with Haiku if you subdivide them so that each individual Haiku prompt has a straightforward list of instructions that it doesn't have to think *too* hard about. Presumably, the same stands for Opus and Sonnet, as well - though I've personally yet to find a solution that truly demands Opus in my workflow.\n\n**TL;DR:** The recent update didn't reduce your limits. It let you build bigger contexts that are heavily dependent upon caching. When you step away for a while and come back, the cache has gone stale and re-caching the 1M token context is expensive, causing a single innocuous prompt to consume massive amounts of your usage limit.\n\nTo mitigate this, proactively manage your context by stopping Sonnet/Opus if they're stuck, retiring big chats before you step away, and considering using Haiku for simpler tasks. Claude Code offers extra tools to help manage your context.\n\nIf you have a frozen chat you need/want to recover, don't panic; simply ask Claude to summarize it to a file and give that file to another chat.\n\nEdit: The /export command can dump the frozen context without triggering model use while also pruning thinking tokens, according to u/the_rigo! Might be useful as a last resort if you don't want to spend tokens.\n\nEdit 2: They did apparently reduce the limits due to load. I'm leaving this up because it has good info and because I'm not gonna delete shit because I'm wrong due to incomplete info. [https://x.com/trq212/status/2037254607001559305](https://x.com/trq212/status/2037254607001559305)","offTopic":true},{"id":"4ec8b3fc-08cf-4b15-b79c-47a044d1e37e","excerpt":"Everyone is switching to GLM-5.1 after the Anthropic ban. Here's what they're reporting — Sharing this because GLM-5.1 has come up in at least 5 separate threads this week. Every time someone asks \"what do I switch to now that Claude subscriptions are dead,\" the same answer keeps showing up. So I compiled what people a","url":"https://www.reddit.com/r/openclaw/comments/1sl5avl/everyone_is_switching_to_glm51_after_the/","role":"pricing","weight":1.1429191,"occurredAt":"2026-04-14T10:57:34.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"openclaw","intent":"pricing_complaint","painScore":0.3179757,"sentiment":0.46666667,"confidence":0.8671776,"matchedPatterns":["doesnt_work","free_tier"],"statement":"If your workflow needs screenshots or image processing, GLM-5.1 won't work.","title":"Everyone is switching to GLM-5.1 after the Anthropic ban. Here's what they're reporting","body":"Sharing this because GLM-5.1 has come up in at least 5 separate threads this week. Every time someone asks \"what do I switch to now that Claude subscriptions are dead,\" the same answer keeps showing up. So I compiled what people are actually saying, what it costs, and how to set it up.\n\nThis isn't my personal review. It's what the community is reporting. I'll flag what I can verify and what I can't.\n\n**Why it keeps coming up:**\n\nThe Anthropic subscription ban on April 4 hit roughly 60% of active OpenClaw sessions. People who were on flat monthly plans are now on per-token API billing, and OpenClaw's context loading burns through tokens way faster than normal chat. Some people are reporting $200 in 3 days on Claude API.\n\nGLM-5.1 keeps getting mentioned because it's significantly cheaper, and multiple people are independently saying it handles agent workflows well.\n\n**The pricing difference:**\n\n|Model|Input (per 1M tokens)|Output (per 1M tokens)|\n|:-|:-|:-|\n||\n||||\n|GLM-5.1|$0.95|$3.15|\n|Claude Sonnet 4.6|$3.00|$15.00|\n\nRoughly 3x cheaper on input, 5x cheaper on output. On a context-heavy OpenClaw setup that difference adds up fast.\n\nZhipu also has a coding plan subscription and an Ollama Cloud option at $20/month if you don't want to deal with per-token billing. Several people in the community are using the Ollama Cloud path and calling it \"best value.\" There's also a free tier with a daily token allowance on the flash variants if you want to test without spending anything.\n\n**How to set it up:**\n\nEasiest path:\n\nbash\n\n    openclaw onboard\n    # select Zhipu as provider\n    # paste your API key\n    # choose GLM-5.1 as model\n\nManual config: add to your `openclaw.json` under `models.providers`:\n\njson\n\n    {\n      \"zai\": {\n        \"baseUrl\": \"grab this from your Zhipu dashboard under API settings\",\n        \"apiKey\": \"your-key-here\",\n        \"api\": \"openai-completions\",\n        \"models\": [\n          {\n            \"id\": \"glm-5.1\",\n            \"name\": \"GLM-5.1\",\n            \"reasoning\": true,\n            \"input\": [\"text\"],\n            \"contextWindow\": 204800,\n            \"maxTokens\": 131072\n          }\n        ]\n      }\n    }\n\nSet as default:\n\njson\n\n    {\n      \"agents\": {\n        \"defaults\": {\n          \"model\": {\n            \"primary\": \"zai/glm-5.1\"\n          }\n        }\n      }\n    }\n\nRestart gateway. Done.\n\n**What people say works:**\n\n* Tool calling and task execution. The big complaint about Gemma was \"says done, does nothing.\" People report GLM-5.1 actually follows through.\n* SOULmd compliance. Picks up personality and rules more naturally than GPT-5.4 or Gemma according to multiple users.\n* Long sessions. Doesn't lose the thread after 20-30 messages the way some models do.\n* Coding tasks. Scores high on SWE-bench, handles multi-step code generation.\n* 203K context window. Bigger than most alternatives, which matters for OpenClaw's context-heavy architecture.\n\n**What people flag as downsides:**\n\n* Slower than Sonnet. First-token latency is noticeable, especially with reasoning enabled. This comes up a lot.\n* Text only. No vision, no image input. If your workflow needs screenshots or image processing, GLM-5.1 won't work.\n* English phrasing can feel slightly off on complex writing tasks. Excellent for code, occasionally awkward for nuanced prose.\n* No abort mid-response. If the task is long, you wait. One user described it as \"once GLM starts talking there's no stopping it.\"\n\n**The obvious advice:**\n\nDon't replace one single-provider dependency with another. We all just learned what happens when you build everything on one provider's pricing. Set up fallbacks:\n\n|Use case|Model|Cost|\n|:-|:-|:-|\n||\n||||\n|Daily default|zai/glm-5.1|Cheap|\n|Complex tasks|anthropic/claude-sonnet-4-6 (manual switch with /model)|Higher but worth it|\n|Heartbeats|Ollama local or OpenRouter free tier|$0|\n\nThat way if Zhipu changes pricing or goes down, nothing breaks.\n\n**What I haven't tested myself:**\n\nI want to be upfront. I haven't personally switched to GLM-5.1 yet. This post is compiled from what multiple community members are reporting across Reddit, Discord, and DMs. The pricing and config are verified from official docs and OpenRouter. The subjective quality claims (\"closest to Claude,\" \"understands Soulmd better\") are what users are saying, not something I can independently confirm.\n\nI'm planning to test it this week and will post a follow-up with my own results.\n\n**What I want to hear from you:**\n\nIf you've already switched to GLM-5.1, drop your experience below. Specifically interested in:\n\n1. Tool calling reliability.\n2. Actual monthly cost vs what you were paying before.\n3. Anything that broke during the switch.","offTopic":true},{"id":"7792aa71-9b38-43e8-8712-dd2608b13d81","excerpt":"anthropic isn't the only reason you're hitting claude code limits. i did audit of 926 sessions and found a lot of the waste was on my side. — [Original Reddit post](https://www.reddit.com/r/ClaudeCode/comments/1sd8t5u/anthropic_isnt_the_only_reason_youre_hitting/)\n\nLast 10 days, X and Reddit have been full of outrage a","url":"https://lemmy.world/post/45214663","role":"pain","weight":0.5680733,"occurredAt":"2026-04-05T17:09:15.314Z","sourceKey":"lemmy","sourceName":"Lemmy","credibility":0.58,"venue":"lemmy.world","intent":"other","painScore":0.24,"sentiment":-0.6,"confidence":0.4581236,"matchedPatterns":["product:anthropic"],"statement":"Worst case: one session read the same file 33 times.","title":"anthropic isn't the only reason you're hitting claude code limits. i did audit of 926 sessions and found a lot of the waste was on my side.","body":"[Original Reddit post](https://www.reddit.com/r/ClaudeCode/comments/1sd8t5u/anthropic_isnt_the_only_reason_youre_hitting/)\n\nLast 10 days, X and Reddit have been full of outrage about Anthropic's rate limit changes. Suddenly I was burning through a week's allowance in two days, but I was working on the same projects and my workflows hadn't changed. People on socials reporting the $200 Max plan is running dry in hours, some reporting unexplained ghost token usage. Some people went as far as reverse-engineering the Claude Code binary and found cache bugs causing 10-20x cost inflation. Anthropic did not acknowledge the issue. They were playing with the knobs in the background.\nLike most, my work had completely stopped. I spend 8-10 hours a day inside Claude Code, and suddenly half my week was gone by Tuesday.\nBut being angry wasn't fixing anything. I realized, AI is getting commoditized. Subscriptions are the onboarding ramp. The real pricing model is tokens, same as electricity. You're renting intelligence by the unit. So as someone who depends on this tool every day, and would likely depend on something similar in future, I want to squeeze maximum value out of every token I'm paying for.\nI started investigating with a basic question. How much context is loaded before I even type anything? iykyk, every Claude Code session starts with a base payload (system prompt, tool definitions, agent descriptions, memory files, skill descriptions, MCP schemas). You can run\n/context\nat any point in the conversation to see what's loaded. I ran it at session start and the answer was 45,000 tokens. I'd been on the 1M context window with a percentage bar in my statusline, so 45k showed up as ~5%. I never looked twice, or did the absolute count in my head. This same 45k, on the standard 200k window, is over 20% gone before you've said a word. And you're paying this 45k cost every turn.\nClaude Code (and every AI assistant) doesn't maintain a persistent conversation. It's a stateless loop. Every single turn, the entire history gets rebuilt from scratch and sent to the model: system prompt, tool schemas, every previous message, your new message. All of it, every time. Prompt caching is how providers keep this affordable. They don't reload the parts that are common across turns, which saves 90% on those tokens. But keeping things cached costs money too, and Anthropic decided 5 minutes is the sweet spot. After that, the cache expires. Their incentives are aligned with you burning more tokens, not fewer. So on a typical turn, you're paying $0.50/MTok for the cached prefix and $5/MTok only for the new content at the end. The moment that cache expires, your next turn re-processes everything at full price. 10x cost jump, invisible to you.\nSo I went manic optimizing. I trimmed and redid my CLAUDE md and memory files, consolidated skill descriptions, turned off unused MCP servers, tightened the schema my memory hook was injecting on session start. Shaved maybe 4-5k tokens. 10% reduction. That felt good for an hour.\nI got curious again and looked at where the other 40k was coming from. 20,000 tokens were system tool schema definitions. By default, Claude Code loads the full JSON schema for every available tool into context at session start, whether you use that tool or not. They really do want you to burn more tokens than required. Most users won't even know this is configurable. I didn't.\nThe setting is called enable_tool_search. It does deferred tool loading. Here's how to set it in your settings.json:\n\"env\": { \"ENABLE_TOOL_SEARCH\": \"true\" }\nThis setting only loads 6 primary tools and lazy-loads the rest on demand instead of dumping them all upfront. Starting context dropped from 45k to 20k and the system tool overhead went from 20k to 6k. 14,000 tokens saved on every single turn of every single session, from one line in a config file.\nSome rough math on what that one setting was costing me. My sessions average 22 turns. 14,000 extra tokens per turn = 308,000 tokens per session that didn't need to be there. Across 858 sessions, that's 264 million tokens. At cache-read pricing ($0.50/MTok), that's $132. But over half my turns were hitting expired caches and paying full input price ($5/MTok), so the real cost was somewhere between $132 and $1,300. One default setting. And for subscription users, those are the same tokens counting against your rate limit quota.\nThat number made my head spin. One setting I'd never heard of was burning this much. What else was invisible? Anthropic has a built-in\n/insights\ncommand, but after running it once I didn't find it particularly useful for diagnosing where waste was actually happening. Claude Code stores every conversation as JSONL files locally under\n~/.claude/projects/\n, but there's no built-in way to get a real breakdown by session, cost per project, or what categories of work are expensive.\nSo I built a token usage auditor. It walks every JSONL file, parses every turn, loads everything into a SQLite database (token counts, cache hit ratios, tool calls, idle gaps, edit failures, skill invocations), and an insights engine ranks waste categories by estimated dollar amount. It also generates an interactive dashboard with 19 charts: cache trajectories per session, cost breakdowns by project and model, tool efficiency metrics, behavioral patterns, skill usage analysis.\nhttps://reddit.com/link/1sd8t5u/video/hsrdzt80letg1/player\nMy stats: 858 sessions. 18,903 turns. $1,619 estimated spend across 33 days. What the dashboard helped me find:\n1. cache expiry is the single biggest waste category\n54% of my turns (6,152 out of 11,357) followed an idle gap longer than 5 minutes. Every one of those turns paid full input price instead of the cached rate. 10x multiplier applied to the entire conversation context, over half the time.\nThe auditor flags \"cache cliffs\" specifically: moments where cache_read_ratio drops by more than 50% between consecutive turns. 232 of those across 858 sessions, concentrated in my longest and most expensive projects.\nThis is the waste pattern that subscription users feel as rate limits and API users feel as bills. You're in the middle of a long session, you go grab coffee or get pulled into a Slack thread, you come back five minutes later and type your next message. Everything gets re-processed from scratch. The context didn't change. You didn't change. The cache just expired.\nEstimated waste: 12.3 million tokens that counted against my usage for zero value. At API rates that's $55-$600 depending on cache state, but the rate-limit hit is the part that actually hurts on a subscription. Those 12.3M tokens are roughly 7.5% of my total input budget, gone to idle gaps.\n2. 20% of your context is tool schemas you'll never call\nCovered above, but the dashboard makes it starker. The auditor tracks skill usage across all sessions. 42 skills loaded in my setup. 19 of them had 2 or fewer invocations across the entire 858-session dataset. Every one of those skill schemas sat in context on every turn of every session, eating input tokens.\nThe dashboard has a \"skills to consider disabling\" table that flags low-usage skills automatically with a reason column (never used, low frequency, errors on every run). Immediately actionable: disable the ones you don't use, reclaim the context.\nCombined with the ENABLE_TOOL_SEARCH setting, context hygiene was the highest-leverage optimization I found. No behavior change required, just configuration.\n3. redundant file reads compound quietly\n1,122 extra file reads across all sessions where the same file was read 3 or more times. Worst case: one session read the same file 33 times. Another hit 28 reads on a single file.\nEach re-read isn't expensive on its own. But the output from every read sits in your conversation context for every subsequent turn. In a long session that's already cache-stressed, redundant reads pad the context that gets re-processed at full price every time the cache expires. Estimated waste: around 561K tokens across all sessions, roughly $2.80-$28 in API cost. Small individually, but the interaction with cache expiry is what makes it compound.\nThe auditor also flags bash antipatterns (662 calls where Claude used\ncat\n,\ngrep\n,\nfind\nvia bash instead of native Read/Grep/Glob tools) and edit retry chains (31 failed-edit-then-retry sequences). Both contribute to context bloat in the same compounding way. I also installed\nRTK\n(a CLI proxy that filters and summarizes command outputs before they reach your LLM context) to cut down output token bloat from verbose shell commands. Found it on Twitter, worth checking out if you run a lot of bash-heavy workflows.\nAfter seeing the cache expiry data, I built three hooks to make it visible before it costs anything:\nStop hook\n— records the exact timestamp after every Claude turn, so the system knows when you went idle\nUserPromptSubmit hook\n— checks how long you've been idle since Claude's last response. If it's been more than 5 minutes, blocks your message once and warns you: \"cache expired, this turn will re-process full context from scratch. run /compact first to reduce cost, or re-send to proceed.\"\nSessionStart hook\n— for resumed sessions, reads your last transcript, estimates how many cached tokens will need re-creation, and warns you before your first prompt\nBefore these hooks, cache expiry was invisible. Now I see it before the expensive turn fires. I can /compact to shrink context, or just proceed knowing what I'm paying. These hooks aren't part of the plugin yet (the UX of blocking a user's prompt needs more thought), but if there's demand I'll ship them.\nI don't prefer /compact (which loses context) or resuming stale sessions (which pays for a full cache rebuild) for continuity. Instead I just /clear and start a new session. The memory plugin this auditor skill is part of auto-injects context from your previous session on startup, so the new session has what it needs without carrying 200k tokens of conversation history. When you clear the session, it maintains state of which session you cleared from. That means if you're working on 2 parallel threads in the same project, each clear gives the next session curated context of what you did in the last one. There's also a skill Claude can invoke to search and recall any past conversation. I wrote about the memory system in detail last month (link in comments). The token auditor is the latest addition to this plugin because I kept hitting limits and wanted visibility into why.\nThe plugin is called claude-memory, hosted on my open source claude code marketplace called claudest. The auditor is one skill (\n/get-token-insights\n). The plugin includes automatic session context injection on startup and clear, full conversation search across your history, and a learning extraction skill (inspired by the unreleased and leaked \"dream\" feature) that consolidates insights from past sessions into persistent memory files. First auditor run takes ~100 seconds for thousands of session files, then incremental runs take under 5 seconds.\nLink to repo:\nhttps://github.com/gupsammy/Claudest\nthe token insights skill is\n/get-token-insights, as part of claude-memory plugin.\nInstallation and setup is as easy as -\n/plugin marketplace add gupsammy/claudest /plugin install claude-memory@claudest\nfirst run takes ~100s, then incremental. opens an interactive dashboard in your browser\nthe memory post i mentioned:\nhttps://www.reddit.com/r/ClaudeCode/comments/1r1w397/comment/odt85ev/\nthe cache warning hooks are in my personal setup, not shipped yet.\nif people want them i'll add them to the plugin. happy to answer questions about the data or the implementation.\nlimitations worth noting:\nthe JSONL parsing depends on Claude Code's local file format, which isn't officially documented. works on the current format but could break if Anthropic changes it.\ndollar estimates use published API pricing (Opus 4.6: $5/MTok input, $25/MTok output, $0.50/MTok cache read). s","offTopic":true},{"id":"b57d1401-8b03-4670-9485-9dd770153491","excerpt":"After learning this, my AI workflows now cost me 30x less — Here's the thing nobody tells you when you start building AI agents: the shiniest, most expensive models aren't always the answer. I figured out a system that cut my costs by over 90% while keeping output quality basically identical.\n\nThese are the 6 things I ","url":"https://www.reddit.com/r/n8n/comments/1oplxlb/after_learning_this_my_ai_workflows_now_cost_me/","role":"demand","weight":1.1254458,"occurredAt":"2025-11-06T01:40:37.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"n8n","intent":"feature_request","painScore":0.285,"sentiment":0.031141868,"confidence":0.87583333,"matchedPatterns":["wish","switching_from"],"statement":"Pick the cheapest one that consistently delivers quality output For my Reddit summarization workflow, I switched from Claude Sonnet 4.5 ($0.003/1K input tokens) to DeepSeek V3 ($0.00014/1K tokens).","title":"After learning this, my AI workflows now cost me 30x less","body":"Here's the thing nobody tells you when you start building AI agents: the shiniest, most expensive models aren't always the answer. I figured out a system that cut my costs by over 90% while keeping output quality basically identical.\n\nThese are the 6 things I wish someone had told me before I started.\n\n**1. Stop defaulting to GPT-5/Claude Sonnet/Gemini 2.5 Pro for everything**\n\nThis was my biggest mistake. I thought I was ensuring I get the high quality output by using the **best** models.\n\nI was leaving HUNDREDS of dollars on the table.\n\nHere's a real example from my OpenRouter dashboard: I used 22M tokens last quarter. Let's say 5.5M of those were output tokens. **If I'd used only Claude Sonnet 4.5, that would've cost me $75. Using DeepSeek V3 would’ve costed me $2.50 instead.** Same quality output for my use case.\n\n**Bottomline: The \"best\" model is the one that gives you the output you need at the lowest price.** That's it.\n\n**How to find the “best” model for your specific use case:**\n\n1. Start with [OpenRouter's model comparison](https://openrouter.ai/compare) and [HuggingFace leaderboards](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)\n2. Do a quick Reddit/Google search for \"\\[your specific task\\] best LLM model\"\n3. Compare input/output costs on OpenRouter\n4. Test 2-3 promising models with YOUR actual data\n5. Pick the cheapest one that consistently delivers quality output\n\nFor my Reddit summarization workflow, I switched from Claude Sonnet 4.5 ($0.003/1K input tokens) to DeepSeek V3 ($0.00014/1K tokens). **That's a 21x cost reduction** for basically identical summaries.\n\n**2. If you're not using OpenRouter yet, you're doing it wrong**\n\n**Four game-changing benefits:**\n\n* **One dashboard for everything**: No more juggling 5 different API keys and billing accounts\n* **Experiment freely**: Switch between 200+ models in n8n with literally zero friction\n* **Actually track your spending**: See exactly which models are eating your budget\n* **Set hard limits**: Don’t have to worry about accidentally blow your budget\n\n**3. Let AI write your prompts (yea, I said it)**\n\nI watched these YouTube videos about “Prompt Engineering” and used to spend HOURS crafting the \"perfect\" prompt for each model. Then I realized I was overthinking it.\n\n**The better way**: Have the AI model rewrite your prompt in its own \"language.\"\n\n**Here's my actual process:**\n\n1. Open a blank OpenRouter chat with your chosen model (e.g., DeepSeek V3)\n2. Paste this meta-prompt:Here's what you need to do: Combine Reddit post summaries into a daily email newsletter with a casual, friendly tone. Keep it between 300-500 words total.Here is what the input looks like: \\[ { \"title\": \"Post title here\", \"content\": \"Summary of the post...\", \"url\": \"[https://reddit.com/r/example/](https://reddit.com/r/example/)...\" }, { \"title\": \"Another post title\", \"content\": \"Another summary...\", \"url\": \"[https://reddit.com/r/example/](https://reddit.com/r/example/)...\" } \\]Here is my desired output: Plain text email formatted with:\n   * Catchy subject line\n   * Brief intro (1-2 sentences)\n   * 3-5 post highlights with titles and links\n   * Casual sign-off\n3. Here is what you should do to transform the input into the desired output:\n   1. Pick the most interesting/engaging posts\n   2. Rewrite titles to be more compelling if needed\n   3. Keep each post summary to 2-3 sentences max\n   4. Maintain a conversational, newsletter-style tone\n   5. Include the original URLs as clickable links\n4. Copy the AI's rewritten prompt\n5. Test it in your workflow\n6. Iterate if needed\n\n**Why this works**: When AI models write prompts in their own \"words,\" they process the instructions more effectively. It's like asking someone to explain something in their native language vs. a language they learned in school.\n\nI've seen output quality improve by 20-30% using this technique.\n\n**4. Abuse OpenRouter's free models (1000 requests/day)**\n\nOpenRouter gives you 50-1000 FREE requests per day to certain models. Not trial credits. Not limited time. Actually free, forever.\n\n**How to find free models:**\n\n* In n8n's OpenRouter node, type \"free\" in the model search\n* Or go to [openrouter.ai/models](http://openrouter.ai/models) and filter by \"FREE\" pricing\n\n**5. Filter aggressively before hitting your expensive AI models**\n\nEvery token you feed into an LLM costs money. Stop feeding it garbage.\n\n**Simple example**:\n\n* I scrape 1000 Reddit posts\n* I filter out posts with <50 upvotes and <10 comments\n* This immediately cuts my inputs by 80%\n* Only \\~200 posts hit the AI processing\n\nThat one filter node saves me \\~$5/week.\n\n**Advanced filtering** (when you can't filter by simple attributes): Sometimes you need actual AI to determine relevance. That's fine - just use a CHEAP model for it:\n\n    [Reddit Scraper]\n        → [Cheap LLM Categorization] (costs $0.001)\n           → Filter: only \"relevant\" posts\n              → [Expensive LLM Processing] (costs $0.10)\n\nReal example from my workflow:\n\n* Use gpt-5-nano to categorize posts as relevant/irrelevant\n* This removes 70-90% of inputs\n* Only relevant posts get processed by gpt-5\n\nPro tip: Your categorization prompt can be super simple:\n\n    {\n      \"relevant\": \"true/false\",\n      \"reasoning\": \"one sentence why\"\n    }\n\n**6. Batch your inputs like your budget depends on it (because it does)**\n\nIf you have a detailed system prompt (and you should), batching can reduce costs significantly.\n\n**What most people do** (wrong):\n\n    [Loop through 100 items]\n      → [AI Agent with 500-token system prompt]\n      = 100 API calls × 500 tokens = 50,000 tokens wasted on system prompts\n\n**What you should do** (right):\n\n    [Batch 100 items into 1 array]\n      → [AI Agent with 500-token system prompt]\n      = 1 API call × 500 tokens = 500 tokens for system prompt\n\n**That's a 100x reduction in system prompt costs.**\n\n**How to set it up in n8n:**\n\n1. Before your AI node, add an Aggregate node\n2. Set it to combine ALL items into one array\n3. In your AI prompt: `Process each of these items: {{$json.items}}`\n\n**Important warning**: Don't batch too much or you'll exceed the model's context window and quality tanks.\n\n**The Bottom Line**\n\nThese 6 strategies took me from spending $300+/month on hobby workflows to spending \\~$10/month on production systems that process 10x more data.\n\n**Quick action plan:**\n\n1. Sign up for OpenRouter TODAY (seriously, stop reading and do this)\n2. Test 3 cheaper models against your current expensive one\n3. Add a basic filter before your AI processing\n4. Implement batching on your highest-volume workflow\n\nYou’re welcome!\n\n*PS - I dive deeper into practical strategies you can use to manage your LLM token costs* [*here*](https://youtu.be/l5uSZ8Jyk0s?si=iVJWWk641OR5T_Vp)","offTopic":false},{"id":"88560d19-21b9-4702-94ca-66a4e9464888","excerpt":"Claude Code has big problems and the Post-Mortem is not enough — **TL;DR**\n\n* Claude Code constantly bombards the model with silent and potentially conflicting instructions & tells it to keep them secret from the user\n* This fills up context and constantly forces attention towards passages that \"may or may not be\" impo","url":"https://www.reddit.com/r/ClaudeAI/comments/1strcoa/claude_code_has_big_problems_and_the_postmortem/","role":"request","weight":1.0424645,"occurredAt":"2026-04-23T18:35:36.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeAI","intent":"problem_report","painScore":0.19025445,"sentiment":0.11111111,"confidence":0.87583333,"matchedPatterns":["how_can_i","manual_process"],"statement":"^^[8] So you'd better hope you're not shuffling large blocks of code around manually while your IDE is connected to a session.","title":"Claude Code has big problems and the Post-Mortem is not enough","body":"**TL;DR**\n\n* Claude Code constantly bombards the model with silent and potentially conflicting instructions & tells it to keep them secret from the user\n* This fills up context and constantly forces attention towards passages that \"may or may not be\" important\n* The leak from a while back predicted a lot of issues people are having now\n* just go read the thing. I didn't have my clanker write it, I just actually write like that. (The clanker did help me scour the codebase and verify all the claims below.)\n\n------\n\n> **PRE-RELEASE EDIT:** A note I have to add here after 99% of the rest of this post was finished: Anthropic has *just* released a [post-mortem](https://www.anthropic.com/engineering/april-23-postmortem) that talks about some issues Claude Code had and the fixes they implemented for them. They also say they're going to start dogfooding the public version of Claude Code, which should *hopefully* surface the majority of the issues I'm about to bring up below. I've done my best to scrub the post of anything I mentioned that they have now fixed (which *sort* of proves me right ^just ^^sayin) but there might be some leftovers.\n\nSoooo, how about that Opus 4.7, [huh](https://www.youtube.com/watch?v=RWak0i_iqnM)?!\n\nI'll be honest and say I've found Opus 4.7 to be a *massive* improvement over 4.6, and that I barely noticed 4.6 degrade at all outside of the usual ~week or so before 4.7 dropped, which has always been the classic Anthropic tell; the complaints about it started much earlier though, and if there's *this* much smoke, then either OpenAI really has *very* deep PR pockets or there's actually a real fire somewhere.\n\n(It's the second, definitely the second. ^^^The ^^^first ^^^is ^^^also ^^^true, ^^^but ^^^that ^^^has ^^^nothing ^^^to ^^^do ^^^with ^^^any ^^^complaints.)\n\nSo I'm neither here to cheerlead Anthropic, nor to wave the skill issue baton around. Instead, I thought that might be time for an *intervention* for our friends at Anthropic, in the genuinely best of faith, because I genuinely think they have begun hurting themselves and might have slipped into a certain organizational blindness that could be making it difficult for them to realize that.\n\nToday, I'll try to make a case for something I've thought for a while now, possibly expose myself and get me ToS'd, and probably still eat accusations of having an AI write this post (because a lot of humans are now pattern matching more than AIs ever do lol). The hypothesis, as it stands in the title:\n\n-\n\n# Claude Code is actively hurting Anthropic\n* Or: *PLEASE* SLOW THE HECK DOWN\n\n-\n\nThis is not meant to dunk on anyone, expose anyone, or point fingers. It's mostly an opportunity for me to go \"I told you so\" about something I, uh, never actually told anyone but myself and a few friends, who I know will back me up that I've been saying this all along ^please ^^guise ^^^I ^^^^swear. It is not an opinion that's rare among folks who have \"graduated\" from CC, and it is this: **Claude Code is mostly pointless bloat that 95% of users will never need.**\n\nFor most of the time, this was harmless, and I think the tool was in a genuinely MUCH better state around the release of Opus 4.5. Unfortunately, Opus 4.5 was probably the first model good enough to allow Anthropic's product team to delegate large parts of developing Claude Code, which caused the codebase to do what codebases do when they're developed by LLMs: become *sloppy as hell*. The entire development paradigm surrounding LLMs is essentially \"how do I make sure that I get the maximum ratio between slop and code\" and \"how do I make sure that the slop I do get is easily shreddable.\" As some of you might agree if you've seen the recent leak, I think... Anthropic has, uh, their calibration of the ratio a little wrong.\n\nFor context: I've been using a third-party coding harness since early February. It's one specifically designed for being as non-intrusive and minimal as possible, and I'm not going to reveal its name here because I'm a selfish man who doesn't want too many people to discover it and make Anthropic devote more resources towards detecting users who are still skirting the OAuth ban. But I'll just say that my personal non-public fork of it is called \"Euler.\" \n\nWe've gone through many, many cycles of various forms of model and usage degradation since February, and what I can say with certainty is that **none of them affected me in any way whatsoever**, other than the week or two before Opus 4.6's and Opus 4.7's release. My usage has been stable, my performance has been stable. What's also been stable is *my harness*: there's ~15 or so self-rolled extensions that implement and enforce my workflow, a couple of QoL tools and API surfaces, and a very slim system prompt. That has stayed almost exactly the same since February, and so has my satisfaction with the model.\n\nYou know what *hasn't* stayed the same sin--Claude Code. It is Claude Code.\n\nSince the release of Opus 4.5 and up until 2.1.100 eleven days ago, a LOT of major features have been added to Claude Code. We are now on version 2.1.120 or whatever, so that's more than a release a day. This is, very gently put, **utterly ludicrous**. I don't care how good the AI you use to write code is: if you have this big of a codebase that's that proven of a mess, then 11 days is *physically* not enough time to verify and clean up its output. And if five engineers are doing the work that fifty used to do, then no one has to talk to anyone to get stuff done; and if no one talks to anyone else, **Claude Code is the inevitable result of that process**.\n\n## Let's talk specifics\n\n- There are 40 different \"system reminders\" that will automatically insert themselves into the conversation. ^^[1] They automatically trigger, give the model **specific instructions as the user role** ^^[2] regardless of whether they've been prompted otherwise, and some of them also tell the model to **never reveal they even exist** ^^[3].\n- These system reminders include things like \"Task tools haven't been used recently\", \"a file was modified by a linter\", \"new diagnostics appeared\", \"plan mode entered\", \"IDE opened a file\", \"hook fired\", \"token budget hit\", etc. They give the model instructions, sometimes explicit, sometimes hedging with \"maybes\" and \"case-by-cases\" and \"consider whethers.\" ^^[4] ^^[5] ^^[6]\n- [Piebald's CC system prompt changelog repo](https://github.com/Piebald-AI/claude-code-system-prompts/tree/main/system-prompts) tracks **158+ versions since v2.0.14**. Many releases add, remove, or modify prompt sections. Several of those changes are *purely reactive*: someone noticed the model would mess up sometimes, prompted a fix for it, and then commited. There's no indication anyone is reading the full assembled output after these changes.\n\nHere are a few very harmless-sounding system reminders, and also what the effect is that they actually have:\n\n- You open a file in a connected IDE. The model is told: \"The user opened this file! It may or may not be relevant to any of this tho.\" ^^[7] The result is that you _may or may not be_ dumping completely irrelevant context into your conversation and forcing the model to briefly consider every file you open in your IDE, even if it's exploratory and has nothing to do with the task at hand. This is, predictably, very bad for the model's attention.\n- You select some lines in a connected IDE. Same thing: \"The user selected these lines.\" It then also **injects the content of the lines you selected**. ^^[8] So you'd better hope you're not shuffling large blocks of code around manually while your IDE is connected to a session.\n- The malware thing. That's become rather apparent to some people: every time it opens a file, a reminder is injected that it might be malware and that the model should check first before doing any work on it. ^^[9] Read that again: **EVERY TIME** it opens a file, The *same, FULL* REMINDER is injected into the context. This not only fills it up with loads and loads of irrelevant identical mirror content, it also makes specifically Opus 4.7 sometimes respond to every file read with \"Not malware.\" ^^[9] As of the source code leak, which was before Opus 4.7, Opus 4.6 was **specifically exempt from this in the code** ^^[10].\n- Task Tools reminder: if the task tools haven't been used in a while, the model is told to consider whether it might make sense to use them, or to clear the task list if it's stale. ^^[11] Then it's told to only do that if it makes sense (redundantly). Then it's told to keep this reminder secret. The result is that in exploratory sessions that involve exploration rather than implementation, you're constantly spending tokens and model attention on considering something completely irrelevant for that entire session.\n- When the model ends its turn and the LSP server has emitted new diagnostics, a system reminder is injected that tells the model about this. ^^[12] Meaning that whenever the model ends its turn in the middle of a refactor that may be breaking the build in the process, it's spammed with completely irrelevant reminders about things it probably already knows. These, again, take up tokens and attention.\n\nAnd then, there's also these reminders that are **literally redundant**:\n\n- When the model reads a file and it's empty, a reminder tells the model \"hey, you read this file, and it's empty.\" ^^[13] This... uh. Ok. I cannot think of a single reason for this reminder to still exist at this point. It was probably VERY useful when a harness was still something that paratroopers wore, but now that it's essentially synonymous with \"AI\"...?\n- When you tell the model you want to invoke an agent, a reminder tells the model: \"The user just told you they want to invoke an agent. Please do that.\" ^^[14] Thanks, dad? I can talk to Claude myself?\n\nNot to mention **actively contradictory instructions**:\n\n- In the system prompt, there's a section that teaches the model about system reminders: \"They bear no direct relation to the specific tool results or user messages in which they appear.\"^^[15] This, of course, is news to all those reminders that fire after specific tool results or user messages.\n  - And *particularly* to the malware reminder, since that doesn't even wrap anything, it **injects itself into the tool result** as if it was part of the file being read, which is about as \"direct\" as a \"relation\" can get. ^[16]\n- For the malware safety instructions:\n  - The system prompt says \"Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. [...] Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research...\" ^[17]\n  - And then the reminder says \"Whenever you read a file, you should consider whether it would be considered malware. [...] you MUST refuse to improve or augment the code.\"\n  - so the message reduces to \"you CAN write malware code if it's in a security research/CTF context, but NEVER EVER write malware code other than to explain it.\"\n- Here's one that doesn't even need *two* lines to contradict itself: \"IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming\". In short: NEVER make up URLs. Unless, of course, you think it'd be helpful. ^[18]\n\nThere are more prompting issues. I could go on, and on, and on, and probably list every single one (thanks Claude), but I'll stick to the ones that most clearly underline the image that's diffusing itself here:\n\n- Inflation of importance-signaling language:\n  - Not developing malware is \"IMPORTANT\".\n  - But using dedicated tools instead of bash? That is \"CRITICAL\": \"Using dedicated tools allows the user to better understand and review your work. This is CRITICAL to assisting the user\" ^[19]\n    - Note: that use of \"critical\" is the *only* use of \"critical\" in the ent","offTopic":false},{"id":"98c24eba-2a34-4695-b57c-3da194b38e2a","excerpt":"Megathread's Response to Anthropic's post \"Update on Usage Limits\" — This post takes all of the 1700+ comments from the Usage Limits Megathread from Sept 30 -> Oct 8, and uses them to provide a response to Anthropic's post titled \"Update on Usage Limits\". It was generated entirely by a non-Anthropic AI with no human ed","url":"https://www.reddit.com/r/ClaudeAI/comments/1o1wn34/megathreads_response_to_anthropics_post_update_on/","role":"demand","weight":1.0114584,"occurredAt":"2025-10-09T04:23:28.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeAI","intent":"alternative_search","painScore":0.38714287,"sentiment":-0.14285715,"confidence":0.7291667,"matchedPatterns":["switching_from"],"statement":"# What r/ClaudeAI users are actually experiencing (ranked by impact) **1) Sonnet-only users still cap fast.** Max/Pro users report **weekly caps within hours to \\~2 days** using **only Sonnet 4.5**—which undermines the guidance to switch f…","title":"Megathread's Response to Anthropic's post \"Update on Usage Limits\"","body":"This post takes all of the 1700+ comments from the Usage Limits Megathread from Sept 30 -> Oct 8, and uses them to provide a response to Anthropic's post titled \"Update on Usage Limits\". It was generated entirely by a non-Anthropic AI with no human editing and neutral sentiment prompting - the core of which is : \"Make a summary and advice report for users and Anthropic based on the observations of users in the Megathread\".\n\nAnthropic response : [https://www.reddit.com/r/ClaudeAI/comments/1nvnafs/update\\_on\\_usage\\_limits/](https://www.reddit.com/r/ClaudeAI/comments/1nvnafs/update_on_usage_limits/)  \n\nUsage Limits Megathread: [https://www.reddit.com/r/ClaudeAI/comments/1nu9wew/usage\\_limits\\_discussion\\_megathread\\_beginning\\_sep/](https://www.reddit.com/r/ClaudeAI/comments/1nu9wew/usage_limits_discussion_megathread_beginning_sep/)\n\nThe generated response to Anthropic follows:\n\n---\n\n**Primary source:** r/ClaudeAI “Usage Limits Discussion” Megathread (Sep 30 → Oct 7, 2025).\n\n*<Duplicate intro deleted as per feedback in comments>*\n\n# Dear Anthropic — thanks for the reset, but here’s the reality we are seeing\n\n**TL;DR (top signal):** The issue isn’t only Opus 4.1 burn. Many of us are **capping fast on Sonnet 4.5 too** (sometimes in **hours**), the **meters feel opaque/buggy**, and **weekly lockouts** are blowing up workweeks. The reset helped briefly, then the pain resumed. Trust rebounds fastest if you (1) move to **daily caps + rollover**, (2) **publish exact metering math with model-scoped meters + warnings**, and (3) **tighten Sonnet 4.5 on long-context/codebase tasks**. Add a few **high-leverage extras** below (clear numbers, standardized resets, pre-run cost hints, bug sweep, cross-plan top-ups, basic change-log comms).\n\n# What your post nails vs. what the thread actually shows\n\n* You’re right Opus is expensive. But **“just use Sonnet 4.5” doesn’t fix usage pain for many**. Reports of **weekly caps in a day or two** on **Sonnet-only** workflows are common (e.g., *two* 5-hour Sonnet sessions eating the week; others hit the wall in \\~10 Sonnet messages).\n* The reset was appreciated; **usage ramped back up fast**, and some saw **live resets** at random times, which makes the system feel unpredictable.\n* **Meters are unclear**: users don’t know what **%** means, why **small edits** cost double-digit percentage, or how **5-hour vs weekly vs Opus-only** interact. (Examples: **5–10%** of a 5-hour session before any output; **“cost per turn \\~tripled.”**)\n* **Lockouts drive churn**: cancellations/refunds and “trying other providers” posts are already here (Max/Pro users hitting weekly in 1–2 days or even hours).\n\n# What r/ClaudeAI users are actually experiencing (ranked by impact)\n\n**1) Sonnet-only users still cap fast.** Max/Pro users report **weekly caps within hours to \\~2 days** using **only Sonnet 4.5**—which undermines the guidance to switch from Opus.\n\n**2) Opaque/possibly inconsistent metering.** Users see **big % jumps for small tasks** (e.g., a single small edit costing **5–10%** of a 5-hour session, up from **2–3%** previously). People also report **changing reset timestamps** and **meters behaving differently** across accounts.\n\n**3) Weekly lockouts wreck reliability and push churn.** “Locked until Thursday,” “blocked for a week after 2 days on Max,” “ran out by Tuesday”—these are common. That’s spurring **refunds/cancellations** and migrations.\n\n**4) Mixed results on large/code-heavy work.** When **Sonnet 4.5** loses **project relations** or causes **collateral edits**, users redo the task with **Opus**, which then **torches the Opus pool** and accelerates lockouts.\n\n**5) Expectations vs. reality.** People cite **plan claims** (hours/week) vs. **lived experience** (capping in hours). Some say they’d need **multiple subs** to match prior weeks; others call it a **stealth downgrade**.\n\n# Concrete fixes (start here)\n\n**1) Replace weekly cliffs with daily caps + rollover (highest ROI).** This keeps **workdays safe**: no more “locked out by Tuesday,” no dead weeks. If a day is light, **roll unused capacity** forward. The thread asks for this explicitly and repeatedly.\n\n**2) Full transparency on metering + model-scoped meters + warnings.** Publish the **exact math**: what increments **5-hour**, **weekly (all models)**, and **weekly (Opus)**; how **uploads, extended thinking, compaction, artifacts** are counted. In-product: show **separate meters per model**, **pre-run cost hints**, and **“approaching cap” alerts** to prevent dead-end runs.\n\n**3) Tighten Sonnet 4.5 on long-context/codebase tasks.** Improve **project-memory/retrieval** and reduce **collateral edits/hallucinations** so Sonnet is a true daily driver. That **cuts rework**, reduces **forced fallbacks to Opus**, and eases Opus-pool pressure.\n\n# High-leverage additions (easy wins that defuse confusion fast)\n\n**A) Publish hard, per-plan numbers.** Update the usage page with **current, concrete ranges** per plan/model that reflect enforcement today (not pre-4.5 expectations). Users are comparing claims vs. capping in hours.\n\n**B) Standardize and disclose exact reset times.** State the **day/time/timezone** for **5-hour**, **weekly (all models)**, and **weekly (Opus)** resets—and make them consistent. Users report **mismatched reset days** and **live resets** that shift mid-week.\n\n**C) Add a persistent “x of y remaining” + pre-run cost hints.** Give a **live, model-scoped meter** and a **cost estimate before big runs** (uploads/extended thinking) so people can avoid hitting a wall mid-edit.\n\n**D) Acknowledge and sweep metering anomalies.** Investigate **large % jumps for small actions**, **sessions burning time with no output**, and **Sonnet-only work still draining weekly/Opus pools**. Commit to a visible **bug sweep**.\n\n**E) Offer top-ups across all paid plans + short grace windows.** Don’t limit extra usage to **Max 20x**. Let Pro/Max5x users **buy a one-off boost**, and add a **brief grace window** to finish a run instead of hard-locking mid-task. (Several cancellations center on hard lockouts.)\n\n**F) Commit to basic change-management.** Post **dated changelogs** and send **advance emails** when policy/enforcement changes. People don’t want to discover breaking changes during work.\n\n# What you can safely recommend to users right now (to reduce tickets)\n\n* **Right-tool the task:** use **Sonnet 4.5** for small/local edits and explanations; **reserve Opus** for gnarly refactors/multi-module reasoning. This cuts rework and burn.\n* **Work in smaller, checkable steps:** explicit diffs/tests beat “rewrite the repo.” Fewer retries → less burn.\n* **Show people where to see usage:** make **Settings → Usage** prominent and encourage screenshots when **% jumps look wrong**, until meters are transparent.\n\n# Why this matters right now\n\nThere’s **real churn energy** in the thread: **cancellations, refunds, team renewals paused, and competitor trials**. People like Claude, but they need **reliability and clarity** more than another reset. Daily+rollover + transparent meters + Sonnet long-context fixes will cool things off **immediately** and restore confidence that “Claude won’t strand my workweek.\n\n**Bottom line:** ship **daily+rollover**, **transparent/model-scoped meters with warnings**, and **Sonnet long-context fixes**—then layer in **clear numbers, standardized resets, pre-run hints, a bug sweep, cross-plan top-ups, and basic comms**. The megathread shows that could flip sentiment from “stealth downgrade” to “they listened and fixed the week.”","offTopic":true},{"id":"c07043e9-0287-45e1-8458-28d2b96db0dc","excerpt":"I reverse-engineered why Claude Code burns through your usage so fast. 7 bugs that stack on top of each other — and the worst one activates when Extra Usage kicks in — \\*\\*Edit: yes I used Claude to help research this, thats literally the point — using the tool to investigate the tool. The findings are real and verifie","url":"https://www.reddit.com/r/ClaudeAI/comments/1sbqalg/i_reverseengineered_why_claude_code_burns_through/","role":"pain","weight":0.889,"occurredAt":"2026-04-03T21:23:50.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeAI","intent":"other","painScore":0.4,"sentiment":-1,"confidence":0.635,"matchedPatterns":[],"statement":"I reverse-engineered why Claude Code burns through your usage so fast.","title":"I reverse-engineered why Claude Code burns through your usage so fast. 7 bugs that stack on top of each other — and the worst one activates when Extra Usage kicks in","body":"\\*\\*Edit: yes I used Claude to help research this, thats literally the point — using the tool to investigate the tool. The findings are real and verified from the public npm package. If you can't be bothered to read it, have your Claude read it for you. GitHub issue with technical details: anthropics/claude-code#43566\\*\\*  \n  \n  \nI'm a Max 20x subscriber. On April 1st I burned 43% of my weekly quota in a single day on a workload that normally takes a full week. I spent the last few days tracing why. Here's what I found.  \n  \n  \nThere are 7 bugs that stack on top of each other. Three are fixed, two are mitigable, two are still broken. But the worst one is something nobody's reported yet.  \n  \n  \n\\*\\*The big one: Extra Usage kills your cache\\*\\*  \n  \n  \nThere's a function in cli.js that decides whether to request 1-hour or 5-minute cache TTL from the server. It checks if you're on Extra Usage. If you are, it silently drops to 5 minutes. Any pause longer than 5 minutes triggers a full context rebuild at API rates, charged to your Extra Usage balance.  \n  \n  \nThe server accepts 1h when you ask for it. I verified this. The client just stops asking the moment Extra Usage kicks in.  \n  \n  \nFor a 220K context session that means roughly $0.22 per turn with 1h cache vs $0.61 per turn with 5m. Thats 2.8x more expensive per turn at the exact moment you start paying per token. Your $30 Extra Usage cap buys 135 turns instead of \\~48.  \n  \n  \nThe death spiral: cache bugs drain your plan usage faster than normal, plan runs out, Extra Usage kicks in, client detects it and drops cache to 5m, every bathroom break costs a full rebuild, Extra Usage evaporates, you're locked out until the 5h reset. Repeat.  \n  \n  \nA one line patch to the function (making it always return true) fixes it. Server happily gives you 1h. Its overwritten by updates though.  \n  \n  \n\\*\\*The other 6 layers (quick summary)\\*\\*  \n  \n  \n1 - The native installer binary ships with a custom Bun runtime that corrupts the cache prefix on every request. npm install fixes this. Verify with file $(which claude), should be a symlink not an ELF binary.  \n  \n  \n2 - Session resume dropped critical attachment types from v2.1.69 to v2.1.90 causing full cache misses on every resume. 28 days, 20 versions. Fixed in v2.1.91.  \n  \n  \n3 - Autocompact had no circuit breaker. Failed compactions retried infinitely. Internal source comment documented 1,279 sessions with 50+ consecutive failures. Fixed in v2.1.89.  \n  \n  \n4 - Tool results are truncated client side (Bash at 30K chars, Grep at 20K). The stubs break cache prefixes. These caps are in your local config at \\~/.claude.json under cachedGrowthBookFeatures and can be inspected.  \n  \n  \n5 - (the Extra Usage one above)  \n  \n  \n6 - Client fabricates fake rate limit errors on large transcripts. Shows model: synthetic with zero tokens. No actual API call made. Still unfixed.  \n  \n  \n7 - Server side compaction strips tool results mid-session without notification, breaking cache. Cant be patched client side. Still unfixed.  \n  \n  \nThese multiply not add. A subscriber hitting 1+3+5 simultaneously could burn through their weekly allocation in under 2 hours.  \n  \n  \n\\*\\*What you can do\\*\\*  \n  \n  \nSwitch to npm if you're on the native installer. Update to v2.1.91. If you're comfortable editing minified JS you can patch the cache TTL function to always request 1h.  \n  \n  \n\\*\\*What I'm not claiming\\*\\*  \n  \n  \nI don't know if the Extra Usage downgrade is intentional or an oversight. Could be cost optimization that didn't account for second order effects. I just know the gate exists, the server honors 1h when asked, and a one line patch proves the restriction is client side.  \n  \n  \n\\*\\*Scope note\\*\\*  \n  \n  \nThis is all from the CLI. But the backend API and usage bucket are shared across [claude.ai](http://claude.ai), Cowork, desktop and mobile. If similar caching logic exists in those clients it could affect everyone.  \n  \n  \nGitHub issue with full technical details: anthropics/claude-code#43566","offTopic":false},{"id":"2536e515-6840-478b-9d83-3f16d4254a71","excerpt":"I ran $42,358 of Claude API through a $500 plan in 90 days. 84.7x Leverage. Here is the entire setup, the receipt, and what the receipt does not prove. — 987 sessions. 201,910 turns. 19.46B billable tokens. 74 active days.\n\n(The entire setup: https://github.com/l0z4n0-a1/cognitive-claude)\n\nIf I had paid Anthropic API l","url":"https://www.reddit.com/r/ClaudeCode/comments/1t2gf0o/i_ran_42358_of_claude_api_through_a_500_plan_in/","role":"pain","weight":0.859494,"occurredAt":"2026-05-03T09:07:39.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeCode","intent":"other","painScore":0.4,"sentiment":-1,"confidence":0.61392426,"matchedPatterns":[],"statement":"I ran $42,358 of Claude API through a $500 plan in 90 days.","title":"I ran $42,358 of Claude API through a $500 plan in 90 days. 84.7x Leverage. Here is the entire setup, the receipt, and what the receipt does not prove.","body":"987 sessions. 201,910 turns. 19.46B billable tokens. 74 active days.\n\n(The entire setup: https://github.com/l0z4n0-a1/cognitive-claude)\n\nIf I had paid Anthropic API list prices for that workload, the bill would have been **$42,358.19**.\n\nI paid $500 in plan fees over those 90 days. One month at the legacy $100 Pro tier, then two months at the current $200 Max tier.\n\nThat is a **84.7× ratio** of API-equivalent cost to plan paid.\n\nRead the next sentence carefully, because it is the entire point of this post.\n\n**That ratio is not what my setup \"saves\" me. It is largely plan-flat-rate vs. API-list-price arbitrage that exists for any heavy Claude Code user with stable context, with or without my setup.** What my setup actually contributes is the **measurement and attribution discipline** that lets me compute the ratio with a defensible formula and sustain it across 90 days without drift.\n\nMost \"I saved $X with Claude Code\" posts conflate those two things. This one separates them on purpose.\n\nI am not selling anything. The numbers, the formulas, the config, the platform incidents that ate part of my window. Steal whatever helps.\n\n---\n\n## The receipt\n\nThis is **not a marketing screenshot.** It is the literal output of `cost-audit.py --window 90 --verbose` against my `~/.claude/projects/`. The instrument is in the repo, the formulas are in `docs/MATH.md`, the sha256-pinned evidence pack is in `examples/case-study-2026-04-28/EVIDENCE.json`. No dashboard, no manual edit.\n\n```\n  Window:                  90d (74 active days)\n  Sessions:                987\n  Turns (assistant):       201,910\n    main thread:           57,029\n    inside sub-agents:     144,881\n  Sub-agent work share:    71.76%      (filename-based, schema-stable)\n  Turns/session:           median 112  mean 205    (heavy right-tail)\n\n  Tokens (total billable): 19.46B\n  Cache hit rate:          91.63%\n\n  API-equivalent cost:     $42,358.19\n  Cost per turn (API):     $0.2098\n  Plan paid (3 months):    $500.00\n  Leverage (vs full term): 84.7×       (← see caveat below)\n\n  Per-model breakdown:\n    model       turns    share         cost      tokens\n    opus      106,092    52.5%   $39,873.47    18.62B\n    sonnet     40,109    19.9%    $1,804.10     0.66B\n    haiku      55,709    27.6%      $680.63     0.18B\n```\n\nThree things to read first, before the comments do it for me.\n\n`Cache hit rate: 91.63%` — using the canonical three-term formula `cache_read / (cache_read + input + cache_creation)`. The two-term form (`cache_read / (cache_read + input)`) inflates the apparent rate by hiding the prefix re-write that happens on every cache invalidation. My repo publishes the conservative form on purpose.\n\n`Sub-agent work share: 71.76%` — counted by filename pattern (`agent-*.jsonl`), not by the `isSidechain` JSONL field. The latter changed semantics around Claude Code v2.1.86 in late March; filename pattern is stable across all observed versions.\n\n`84.7×` — the headline ratio. The next section is what it actually means.\n\n---\n\n## What the 84.7× actually is, and what it is not\n\nThis is the section most \"$X with Claude Code\" posts skip. I will not.\n\nThe 84.7× ratio measures **plan-flat-rate vs. API-list-price arbitrage**. Anthropic prices the Max plan at $200/month flat. The same workload at API list rates costs ~$14k/month. Any heavy operator running stable context — *with or without my setup* — captures most of that ratio. My setup did not invent it. The plan structure invents it. My setup keeps it measurable and defensible.\n\n**Three caveats upfront**, because the comments will ask anyway:\n\n1. **84.7× is a ratio, not a saving.** The framework's contribution is the *instrument that makes the ratio computable and the discipline that keeps the prefix stable so the ratio is sustained*. Without the instrument, you cannot defend any specific number against scrutiny. Without prefix discipline, the cache hit rate drops, the ratio shrinks, and the gap closes silently.\n2. **N=1.** This is one operator's setup, heavy-Opus, multi-project, solo. Generalizable principles, individual numbers. Run the instrument against your own data; your shape will differ.\n3. **The window contains a confirmed Anthropic platform incident.** Between 2026-03-26 and 2026-04-10, a cache regression in Claude Code (`clear_thinking_20251015 + keep:1` bug, [postmortem](https://www.anthropic.com/engineering/april-23-postmortem)) inflated cache miss rates on resumed sessions. The case study in the repo (`examples/case-study-2026-04-28/`) separates baseline cost from incident cost; the 84.7× number is taken from the unattributed total and is therefore a slight overstatement of steady-state economics. It is published anyway because the methodology for separating baseline from incident is the actual contribution.\n\nIf the rest of this post had to fit one paragraph: *the plan is a fixed bucket, the work is what you put in the bucket, the setup is what keeps the bucket from leaking. The arbitrage exists because the bucket is fixed; the discipline is what keeps you in the arbitrage.*\n\n---\n\n## The mental shift that pays for Max\n\nMost people read \"Max plan, $200/month\" and think discount.\n\nIt is not a discount. It is a **franchise**.\n\nYou pay a fixed bucket. What changes is how much throughput you pull out of that bucket. The plan does not care if you burn 100M tokens a month or 10B. The bucket is the bucket.\n\nSo the entire game is throughput per dollar. Not \"is Claude worth it.\" That question is dead.\n\nTwo operators on the same plan can have a 10× or 100× gap in real value extracted. Same price. Same model. Different setup.\n\nThe setup is the moat.\n\nMcDonald's does not care if your franchise sells 100 burgers or 1,000. The rent is the same. The operators who win are not the ones with cheaper rent, they are the ones who learned to pull more throughput per square meter. Same plan. Same model. Different setup.\n\nEvery session you run this wrong is a compounding tax. Yours is running right now.\n\n---\n\n## Six things in the actual setup\n\nNone exotic. All routinely skipped.\n\n**1. Every line in CLAUDE.md is billed N times, where N is your turn count.**\n\nMine is ~100 lines. Roughly 1,300 tokens. That file gets re-charged every single turn of every single session. A 5,000-token CLAUDE.md across 112 turns (my session median) is 560,000 tokens of overhead before you type the first message. Under typical cache discipline, most of that is cache-read (cheap), but every cache break re-pays the full prefix at fresh input rate.\n\nPeople dump examples, FAQs, and aspirational rules into CLAUDE.md. Every line is a tax billed N times where N = turns. Treat it like a constitution, not a README. Laws only. No examples. No \"be helpful.\" Anthropic already trained that.\n\nFull file is in the repo, byte-exact.\n\n**2. Zero MCPs enabled.**\n\n```json\n\"enableAllProjectMcpServers\": false\n```\n\nYes, zero. Mechanical reason: every MCP server installed loads its tool schemas into your system prompt. Even if you never call the tool, you pay the schema tokens every turn. Five medium MCPs is roughly 5,000 tokens of overhead, multiplied by every turn, every session.\n\nEvery MCP use-case in my stack has a CLI substitute. After 90 days, the count is 6 of 6, zero exceptions.\n\n- Web fetch → `curl` + `lynx -dump`\n- GitHub → `gh` CLI\n- Filesystem search → `find` + `rg`\n- Database → `psql` / `sqlite3`\n- Browser automation → `playwright` invoked through Bash, not as MCP server\n\nI run them through `Bash()` when I need them. Zero tokens until invoked. MCP costs tokens just by existing.\n\n**3. Six hooks, doing the work that rules pretend to do.**\n\nA rule file with a glob loads ~900 tokens into context every time the glob matches. A hook runs outside the LLM, returns a binary decision, and costs zero context tokens.\n\nMy active hook stack:\n\n| Event | Script | Job |\n|---|---|---|\n| `SessionStart` | `token-economy-boot.sh` | Cache discipline check + drift warning on boot |\n| `Stop` | `token-economy-session-end.sh` | Closes session, persists delta% (estimated vs real tokens) |\n| `PostToolUse` | `telemetry.sh` | Logs every tool call, skill, agent, model, file op (with secret redaction) |\n| `PreToolUse` (Bash/Edit/Write) | `cache-guard.sh` | Warns on edits that would trigger cache break mid-session |\n| `PreToolUse` (Write to rules/) | `token-economy-guard.sh` | Refuses bloated rule files |\n| `PreToolUse` (Edit/Write) | `tier-contradiction-guard.sh` | Warns on project↔global CLAUDE.md contradiction |\n\nThe cache-guard surfaced 5 mid-session CLAUDE.md edits in week one alone. At a 50k-token session-context envelope and Opus input rate, each break re-pays ~$0.75. The warning lets me batch the edits to a session boundary instead of mid-task. Derivation in `docs/MATH.md` §6.\n\n**4. 71.76% of my turns happen in sub-agents.**\n\n`main thread: 57,029 | inside sub-agents: 144,881`\n\nRoughly seven of every ten turns delegated. Main thread holds strategy and decisions. Sub-agents do execution.\n\nWhy this matters for cost: sub-agent context does not pollute main-thread cache. When a sub-agent finishes, it returns a summary, the verbose context is discarded, and main-thread cache stays intact. If you pile everything into main thread, you blow the cache prefix every time you load a big file, and you re-pay the full system prompt.\n\n**5. I was paying Opus prices for file searches. Two months before I noticed.**\n\n```\nExplore / researcher / general-purpose  → haiku    (file search, retrieval)\nwriter / code-master / ralph / reviewer → sonnet   (generation, implementation)\nChiefs / Plan / orchestrators           → opus     (orchestration, deep reasoning)\n```\n\nDefault behavior is everything goes to whatever model the parent runs. If main thread is Opus, your file-search agent is Opus. That is expensive nonsense. File search has no reasoning content; Haiku does it fine at a fraction of the cost.\n\nMy current per-model split: **Opus 52.5% of turns / 94.1% of cost**, **Sonnet 19.9% / 4.3%**, **Haiku 27.6% / 1.6%**. Routing the right work to the right model is where most of the discipline pays off. Derivation in `docs/MATH.md` §8.\n\n**6. Deterministic over probabilistic.**\n\nThe law that compounds everything.\n\nIf a task is repeatable, verifiable, and has one correct answer, it is code. Not LLM.\n\nA regex beats `Task()` for pattern extraction. A bash one-liner beats an agent for log parsing. A Python script beats a Skill for batch transforms. Every `Task()` call that could have been 10 lines of bash is roughly 12k of fresh system-prompt tokens wasted.\n\nLLMs for judgment, novelty, synthesis. Code for execution. The hybrid is where the leverage lives.\n\n---\n\n## The mistakes that cost the most\n\nThree honest ones.\n\n**Editing CLAUDE.md mid-session.** Cache break, 20k–70k tokens depending on session size. I did this five times in one week before I built the hook to surface the warning. That week alone cost an estimated $3.75 in pure cache rebuilds at Opus rates — small in absolute terms, large as a *signal* of how the prefix gets silently invalidated under careless edits.\n\n**Running every agent on Opus by default.** Two months of file searches on Opus before I built the model routing table. Opus is **18.75× Haiku at list price** (input rate, identical ratio for output and cache). Telemetry showed ~38% of agent calls were retrieval — pure file search. Routing those to Haiku cuts agent-tier spend by ~36% with no measurable quality loss. Derivation in `docs/MATH.md` §8.\n\n**Loading skills eager instead of lazy.** A skill body is ~2k tokens. Twenty eager skills is 40k tokens of overhead per session. Same skills lazy-loaded is 6k–8k. The fix is one config flag. I left it wrong for weeks.\n\n---\n\n## What I would test next if I were you\n\nThree diagnostics. Free. Take 10 minutes. None require my repo.\n\n1. **Count tokens in your current CLAUDE.md.** `wc -w ~/.claude/CLAUDE.md` divided by 0.75. If you are over 2,500 tokens, you are paying that tax every turn forever.\n\n2. **Check your MCPs.** Open `~/.cla","offTopic":true},{"id":"a5323ccb-cbc0-4323-8b75-2fdcac2dbfc2","excerpt":"anthropic isn't the only reason you're hitting claude code limits. i did audit of 926 sessions and found a lot of the waste was on my side. — Last 10 days, X and Reddit have been full of outrage about Anthropic's rate limit changes. Suddenly I was burning through a week's allowance in two days, but I was working on the","url":"https://www.reddit.com/r/ClaudeCode/comments/1sd8t5u/anthropic_isnt_the_only_reason_youre_hitting/","role":"pain","weight":0.7967,"occurredAt":"2026-04-05T16:59:40.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ClaudeCode","intent":"other","painScore":0.24,"sentiment":-0.6,"confidence":0.6425,"matchedPatterns":[],"statement":"anthropic isn't the only reason you're hitting claude code limits.","title":"anthropic isn't the only reason you're hitting claude code limits. i did audit of 926 sessions and found a lot of the waste was on my side.","body":"Last 10 days, X and Reddit have been full of outrage about Anthropic's rate limit changes. Suddenly I was burning through a week's allowance in two days, but I was working on the same projects and my workflows hadn't changed. People on socials reporting the $200 Max plan is running dry in hours, some reporting unexplained ghost token usage. Some people went as far as reverse-engineering the Claude Code binary and found cache bugs causing 10-20x cost inflation. Anthropic did not acknowledge the issue. They were playing with the knobs in the background.\n\nLike most, my work had completely stopped. I spend 8-10 hours a day inside Claude Code, and suddenly half my week was gone by Tuesday.\n\nBut being angry wasn't fixing anything. I realized, AI is getting commoditized. Subscriptions are the onboarding ramp. The real pricing model is tokens, same as electricity. You're renting intelligence by the unit. So as someone who depends on this tool every day, and would likely depend on something similar in future, I want to squeeze maximum value out of every token I'm paying for.\n\nI started investigating with a basic question. How much context is loaded before I even type anything? iykyk, every Claude Code session starts with a base payload (system prompt, tool definitions, agent descriptions, memory files, skill descriptions, MCP schemas). You can run `/context` at any point in the conversation to see what's loaded. I ran it at session start and the answer was 45,000 tokens. I'd been on the 1M context window with a percentage bar in my statusline, so 45k showed up as \\~5%. I never looked twice, or did the absolute count in my head. This same 45k, on the standard 200k window, is over 20% gone before you've said a word. And you're paying this 45k cost every turn.\n\nClaude Code (and every AI assistant) doesn't maintain a persistent conversation. It's a stateless loop. Every single turn, the entire history gets rebuilt from scratch and sent to the model: system prompt, tool schemas, every previous message, your new message. All of it, every time. Prompt caching is how providers keep this affordable. They don't reload the parts that are common across turns, which saves 90% on those tokens. But keeping things cached costs money too, and Anthropic decided 5 minutes is the sweet spot. After that, the cache expires. Their incentives are aligned with you burning more tokens, not fewer. So on a typical turn, you're paying $0.50/MTok for the cached prefix and $5/MTok only for the new content at the end. The moment that cache expires, your next turn re-processes everything at full price. 10x cost jump, invisible to you.\n\nSo I went manic optimizing. I trimmed and redid my CLAUDE md and memory files, consolidated skill descriptions, turned off unused MCP servers, tightened the schema my memory hook was injecting on session start. Shaved maybe 4-5k tokens. 10% reduction. That felt good for an hour.\n\nI got curious again and looked at where the other 40k was coming from. 20,000 tokens were system tool schema definitions. By default, Claude Code loads the full JSON schema for every available tool into context at session start, whether you use that tool or not. They really do want you to burn more tokens than required. Most users won't even know this is configurable. I didn't.\n\nThe setting is called enable\\_tool\\_search. It does deferred tool loading. Here's how to set it in your settings.json:\n\n    \"env\": {\n        \"ENABLE_TOOL_SEARCH\": \"true\"\n    }\n\nThis setting only loads 6 primary tools and lazy-loads the rest on demand instead of dumping them all upfront. Starting context dropped from 45k to 20k and the system tool overhead went from 20k to 6k. 14,000 tokens saved on every single turn of every single session, from one line in a config file.\n\nSome rough math on what that one setting was costing me. My sessions average 22 turns. 14,000 extra tokens per turn = 308,000 tokens per session that didn't need to be there. Across 858 sessions, that's 264 million tokens. At cache-read pricing ($0.50/MTok), that's $132. But over half my turns were hitting expired caches and paying full input price ($5/MTok), so the real cost was somewhere between $132 and $1,300. One default setting. And for subscription users, those are the same tokens counting against your rate limit quota.\n\nThat number made my head spin. One setting I'd never heard of was burning this much. What else was invisible? Anthropic has a built-in `/insights` command, but after running it once I didn't find it particularly useful for diagnosing where waste was actually happening. Claude Code stores every conversation as JSONL files locally under `~/.claude/projects/`, but there's no built-in way to get a real breakdown by session, cost per project, or what categories of work are expensive.\n\nSo I built a token usage auditor. It walks every JSONL file, parses every turn, loads everything into a SQLite database (token counts, cache hit ratios, tool calls, idle gaps, edit failures, skill invocations), and an insights engine ranks waste categories by estimated dollar amount. It also generates an interactive dashboard with 19 charts: cache trajectories per session, cost breakdowns by project and model, tool efficiency metrics, behavioral patterns, skill usage analysis.\n\nhttps://reddit.com/link/1sd8t5u/video/hsrdzt80letg1/player\n\nMy stats: 858 sessions. 18,903 turns. $1,619 estimated spend across 33 days. What the dashboard helped me find:\n\n**1. cache expiry is the single biggest waste category**\n\n54% of my turns (6,152 out of 11,357) followed an idle gap longer than 5 minutes. Every one of those turns paid full input price instead of the cached rate. 10x multiplier applied to the entire conversation context, over half the time.\n\nThe auditor flags \"cache cliffs\" specifically: moments where cache\\_read\\_ratio drops by more than 50% between consecutive turns. 232 of those across 858 sessions, concentrated in my longest and most expensive projects.\n\nThis is the waste pattern that subscription users feel as rate limits and API users feel as bills. You're in the middle of a long session, you go grab coffee or get pulled into a Slack thread, you come back five minutes later and type your next message. Everything gets re-processed from scratch. The context didn't change. You didn't change. The cache just expired.\n\nEstimated waste: 12.3 million tokens that counted against my usage for zero value. At API rates that's $55-$600 depending on cache state, but the rate-limit hit is the part that actually hurts on a subscription. Those 12.3M tokens are roughly 7.5% of my total input budget, gone to idle gaps.\n\n**2. 20% of your context is tool schemas you'll never call**\n\nCovered above, but the dashboard makes it starker. The auditor tracks skill usage across all sessions. 42 skills loaded in my setup. 19 of them had 2 or fewer invocations across the entire 858-session dataset. Every one of those skill schemas sat in context on every turn of every session, eating input tokens.\n\nThe dashboard has a \"skills to consider disabling\" table that flags low-usage skills automatically with a reason column (never used, low frequency, errors on every run). Immediately actionable: disable the ones you don't use, reclaim the context.\n\nCombined with the ENABLE\\_TOOL\\_SEARCH setting, context hygiene was the highest-leverage optimization I found. No behavior change required, just configuration.\n\n**3. redundant file reads compound quietly**\n\n1,122 extra file reads across all sessions where the same file was read 3 or more times. Worst case: one session read the same file 33 times. Another hit 28 reads on a single file.\n\nEach re-read isn't expensive on its own. But the output from every read sits in your conversation context for every subsequent turn. In a long session that's already cache-stressed, redundant reads pad the context that gets re-processed at full price every time the cache expires. Estimated waste: around 561K tokens across all sessions, roughly $2.80-$28 in API cost. Small individually, but the interaction with cache expiry is what makes it compound.\n\nThe auditor also flags bash antipatterns (662 calls where Claude used `cat`, `grep`, `find` via bash instead of native Read/Grep/Glob tools) and edit retry chains (31 failed-edit-then-retry sequences). Both contribute to context bloat in the same compounding way. I also installed [RTK](https://github.com/jasonjmcghee/rtk) (a CLI proxy that filters and summarizes command outputs before they reach your LLM context) to cut down output token bloat from verbose shell commands. Found it on Twitter, worth checking out if you run a lot of bash-heavy workflows.\n\nAfter seeing the cache expiry data, I built three hooks to make it visible before it costs anything:\n\n* **Stop hook** — records the exact timestamp after every Claude turn, so the system knows when you went idle\n* **UserPromptSubmit hook** — checks how long you've been idle since Claude's last response. If it's been more than 5 minutes, blocks your message once and warns you: \"cache expired, this turn will re-process full context from scratch. run /compact first to reduce cost, or re-send to proceed.\"\n* **SessionStart hook** — for resumed sessions, reads your last transcript, estimates how many cached tokens will need re-creation, and warns you before your first prompt\n\nBefore these hooks, cache expiry was invisible. Now I see it before the expensive turn fires. I can /compact to shrink context, or just proceed knowing what I'm paying. These hooks aren't part of the plugin yet (the UX of blocking a user's prompt needs more thought), but if there's demand I'll ship them.\n\nI don't prefer /compact (which loses context) or resuming stale sessions (which pays for a full cache rebuild) for continuity. Instead I just /clear and start a new session. The memory plugin this auditor skill is part of auto-injects context from your previous session on startup, so the new session has what it needs without carrying 200k tokens of conversation history. When you clear the session, it maintains state of which session you cleared from. That means if you're working on 2 parallel threads in the same project, each clear gives the next session curated context of what you did in the last one. There's also a skill Claude can invoke to search and recall any past conversation. I wrote about the memory system in detail last month (link in comments). The token auditor is the latest addition to this plugin because I kept hitting limits and wanted visibility into why.\n\nThe plugin is called claude-memory, hosted on my open source claude code marketplace called claudest. The auditor is one skill (`/get-token-insights`). The plugin includes automatic session context injection on startup and clear, full conversation search across your history, and a learning extraction skill (inspired by the unreleased and leaked \"dream\" feature) that consolidates insights from past sessions into persistent memory files. First auditor run takes \\~100 seconds for thousands of session files, then incremental runs take under 5 seconds.\n\nLink to repo: [https://github.com/gupsammy/Claudest](https://github.com/gupsammy/Claudest)\n\nthe token insights skill is `/get-token-insights, as part of claude-memory plugin.`  \n`Installation and setup is as easy as -`\n\n    /plugin marketplace add gupsammy/claudest \n    /plugin install claude-memory@claudest\n\nfirst run takes \\~100s, then incremental. opens an interactive dashboard in your browser\n\nthe memory post i mentioned: [https://www.reddit.com/r/ClaudeCode/comments/1r1w397/comment/odt85ev/](https://www.reddit.com/r/ClaudeCode/comments/1r1w397/comment/odt85ev/)\n\nthe cache warning hooks are in my personal setup, not shipped yet.\n\nif people want them i'll add them to the plugin. happy to answer questions about the data or the implementation.\n\n**limitations worth noting:**\n\n* the JSONL parsing depends on Claude Code's local file format, which isn't officially documented. works on the current forma","offTopic":false},{"id":"17f3c044-8ac9-42fa-a182-f6627426339d","excerpt":"This post will save you tokens — https://preview.redd.it/mudsi59llkkh1.png?width=1920&format=png&auto=webp&s=7b3432a2c8aa58fd64d4153e9382e0d4ff660b7b\n\nThree months ago, everyone was tokenmaxxing. Then, reality struck.\n\nFable limits made the average developer increasingly aware of their spend, and giants like Facebook, ","url":"https://www.reddit.com/r/posthog/comments/1vtr3p8/this_post_will_save_you_tokens/","role":"pricing","weight":0.7796999,"occurredAt":"2026-08-20T18:08:39.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"posthog","intent":"pricing_complaint","painScore":0.24,"sentiment":0.18518518,"confidence":0.62879026,"matchedPatterns":["free_tier"],"statement":"* The Claude Code SDK in PostHog Desktop uses Haiku extensively (3-5 calls per Opus call) revealing an opportunity for us to swap it with a cheaper, self-hosted model in the future.","title":"This post will save you tokens","body":"https://preview.redd.it/mudsi59llkkh1.png?width=1920&format=png&auto=webp&s=7b3432a2c8aa58fd64d4153e9382e0d4ff660b7b\n\nThree months ago, everyone was tokenmaxxing. Then, reality struck.\n\nFable limits made the average developer increasingly aware of their spend, and giants like Facebook, Microsoft, and Shopify turned away and curbed the practice.\n\nNow everyone is (rightly) obsessed with **tokenminning**: optimizing token spend and limits for fun and profit. This post is your guide to squeezing the most out of your dollars and context.\n\n# 1. Learn how to track token spend\n\nThe first step in tokenminning is knowing how much you spend. If we didn't track this, we never would have known:\n\n* A product's LLM costs doubling from $5k to $10k in a day wasn't a regression. A launch caused a workflow to run 4x more, but the cost per run actually *fell* from $1.8 to $1.4.\n* The Claude Code SDK in [PostHog Desktop](https://posthog.com/desktop?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) uses Haiku extensively (3-5 calls per Opus call) revealing an opportunity for us to swap it with a cheaper, self-hosted model in the future.\n* RTK wasn't saving tokens on bash commands as expected because it wasn't being used properly by Claude. A fix cut 13% in bash token usage and a PR is open to [ship it to everyone](https://github.com/PostHog/posthog/pull/80119).\n\nTo catch and optimize spend like this, you need to monitor:\n\n1. How much **you** use on flat-rate subscriptions like Claude Code which are constrained by context windows and rate limits, rather than costs. The /usage command is the big one here, but so are ccusage, quota widgets like ccseva, and monitoring of LLM spend through gateways.\n2. How much **your team** uses automations, Slack apps, and scheduled agents. Many have monitoring built-in, but you need to consolidate them to prevent blind spots.\n3. How much **customers** use AI-powered features. Being efficient here impacts what products you can build, how much you can charge for them, and how much you can grow. [AI observability](https://posthog.com/ai-observability?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) is a big help.\n\nhttps://preview.redd.it/bx0hb3hnlkkh1.png?width=2048&format=png&auto=webp&s=c6231a69ff84c7cd584fb6bf35e3b954806a5569\n\n  \nTeams almost always have a gap in at least one of these places. This limits the details you have about what workflows, features, and use cases are using the most tokens. Your monthly bill from Anthropic won't tell you this.\n\nHowever you find your baseline costs, it needs to go hand-in-hand with tracking accuracy, success rates, and usage because it defeats the purpose of tokenminning if the changes make your workflows or products worse. [Evals](https://posthog.com/docs/ai-evals?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) and [product analytics](https://posthog.com/product-analytics?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) are critical to monitoring this.\n\nTracking quality also reveals failures like bad queries, repeated retries, and agent runs that produce nothing. Fixing errors like these prevents token spend that never should have been spent in the first place.\n\n# 2. Optimize your [`AGENTS.md`](http://AGENTS.md)\n\nYour [`AGENTS.md`](http://AGENTS.md) is like a backpack you carry wherever you go. Its goal is to save your agent tokens when they read it. To best do that, it should include:\n\n1. **Discovery shortcuts.** Facts an agent will find eventually, expensively. For example, details on our bespoke, unguessable hogli CLI for testing, linting, and building.\n2. **Undiscoverable intent.** Direction of travel, taste, and policy. Like preferring SeaweedFS over MinIO (because the latter is being removed) or that we ban hooks.\n3. **Landmines.** Things agents get confidently wrong and only learn from CI or prod like workflow backward compatibility breaking CI repeatedly or dispatch caps on stacked PRs.\n\nIt shouldn't include:\n\n* Lint-enforced content, like using camelCase for TypeScript or American English\n* Obvious model-defaults, like following existing patterns in the codebase and writing tests\n* One ls or grep answers, like directory trees, the list of packages, 200 line reference components\n* Docs meant for humans, like mission statements or contributing etiquette\n\nAn [`AGENTS.md`](http://AGENTS.md) file is definitely worth having though. One study showed \"the presence of [`AGENTS.md`](http://AGENTS.md) is associated with a lower median runtime (Δ 28.64%) and reduced output token consumption (Δ 16.58%), while maintaining a comparable task completion behavior.\" That's tokenminning if I ever heard it.\n\n# 3. Audit your MCP servers\n\nAlthough MCP tool definitions and schemas don't load into the system prompt anymore, fetching one can still blow up a session's context window. For example:\n\n* The official Atlassian MCP server consumes roughly 10k tokens for Jira and Confluence tools alone.\n* The official GitHub MCP server exposes 94 tools and consumes roughly 17.6k tokens.\n* Cloudflare's native MCP with full schemas include 2,594 tools with a cost of 1,170,523 tokens (but Code Mode fits it in 1,069).\n* With every tool exposed, [PostHog's MCP server](https://posthog.com/docs/model-context-protocol?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) used to have 183 tools and 113,843 tokens (it doesn't anymore).\n\nhttps://preview.redd.it/ilfcq4vplkkh1.png?width=1542&format=png&auto=webp&s=5cf963a4dd60b8397e024af3537a9c1cde524278\n\nFor developers, you need to know what MCP servers are costing you. A [CLI](https://posthog.com/docs/cli?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) like the `gh` for GitHub or `posthog-cli` can often be more efficient and there are tools like RTK that further optimize CLI commands.\n\nFor MCP server providers, you cannot just expose every endpoint as a tool. Tool descriptions can occupy a huge amount of the context window. Platforms like Cursor and OpenAI limit tool count anyways.\n\nLet us be a lesson. As a company with a formerly hefty MCP server, here's what we've done to optimize ours:\n\n* A [single](https://github.com/PostHog/posthog/pull/53371) `exec` tool. This brought our MCP server down from 113,843 tokens to 5,000.\n* Progressive schema exploration. Tools like `query-trends`, `dashboards`, and `execute-sql` had input schemas that exceeded the 16k token limits individually, so we summarize them instead.\n* Connect time scoping. [`mcp.posthog.com/mcp?features=flags,dashboards`](http://mcp.posthog.com/mcp?features=flags,dashboards) mounts two features instead of forty. `?tools=dashboard-get` pins one tool. Most users only use a handful of our tools, our MCP server can match this behavior.\n\n\n\n# 4. Learn what caching is and why it matters\n\nVincent on our Wizard & Docs team once audited our AI install wizard and [found it embezzling tokens](https://posthog.com/blog/optimizing-agent-cost?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities). The trivial conclude step cost $1.47 and he thought it was the agent holding onto context up until that point. A fresh query() call cut accumulated input 89%. You'd expect this to cut costs, right?\n\nWrong. Every new call has to rebuild the whole cache, which costs more. Cache writes cost much more than cache reads, so clearing context only pays off if you save 12x tokens for every one it forces you to rewrite. Cached tokens are 10x cheaper in dollars per token than regular ones, and sometimes even faster too.\n\nThis is why understanding caching is so important. ngrok and earendil have great guides if you want all the details, but the most relevant parts in practice are:\n\n1. Caches are per-model, so beware of fallbacks. If a conversation falls back to another model in a session, it will instantly double charge you.\n2. The cache is keyed on the literal bytes of your prompt in render order: tools, system, messages. Put stable tokens first and volatile content last. Anything that changes per request belongs after the last cache breakpoint, not interpolated into the system prompt.\n3. Subagents are great for context isolation, but don't share its parent's prefix, so every one you spawn pays the full cache-write price. The parent's cache can also run out waiting for children to return.\n4. Anthropic cached writes cost 1.25x normal input on the 5-minute cache and 2x on the hour. Reads cost 0.1x. This means you need one read to earn back the 5-minute write, but the hour cache write needs two reads.\n5. Check `cache_read_input_tokens` in the response. If it's zero across requests that should share a prefix, something is silently invalidating.\n\n\n\n# 5. Choose the best model for the job\n\nFirst, do you need a model at all? The most token-efficient call is the one you don't make. Linting, regex, a SQL query, or a script are free, fast, and can't hallucinate.\n\nIf you do, start by understanding the model landscape: which ones are available and what do they excel at? This often isn't obvious.\n\nFor example, on paper, Sonnet is cheaper than Opus, but in a test on our self-driving capabilities, we found that Sonnet 5 was 20% cheaper than Opus 4.5, not 2.5x as advertised, because Sonnet spends 1.7x turns/tokens.\n\nWe used Sonnet 4.5 on [early agents](https://posthog.com/blog/8-learnings-from-1-year-of-agents-posthog-ai?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) not because it was the smartest but because it was the best blend of quality, speed, and cost. The blend is still the primary way we evaluate models, iterating by giving a variety of models the latest data and using [LLM-as-judge](https://posthog.com/blog/stop-ai-slop?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) to pick what model makes sense.\n\nTypically this means:\n\n* **Cheap models for one-shot jobs with simple outputs.** We use claude-haiku-4-5 for titles and Slack app classifiers, gpt-4.1-mini for MCP intent generation and survey summaries.\n* **Frontier models where the reasoning is the product.** claude-opus-4-8 is the default for PostHog Desktop and query materialization fixes. gpt-5.6-luna classifies Slack app tasks and reasons about which model to use for them.\n* **Gemini where it's structurally the right tool, not just cheaper.** We use gemini-3-flash-preview for [Replay Vision](https://posthog.com/replay-vision?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) because it actually watches the video (others don't) and gemini-2.5-flash-lite-preview for summarizing huge volumes of LLM traces because it needs a cheap model with a huge context window.\n\nA router can provide a gateway to many models, which is helpful for testing and optimizing. Using multiple models, and routing to different ones per request, is the current meta with some companies saving 60-75% on workloads.\n\nThe final boss of \"choosing the best model for the job\" is training your own. [We're doing this for session replays](https://posthog.com/blog/training-ai-models?utm_source=reddit&utm_medium=paid-social&utm_campaign=self-driving-aug2026&utm_content=tech-communities) as it's a specific format where even a basic custom model can better give signal to whether a replay is interesting or not, for cheaper.\n\n# 6. Separate working memory from long-term memory\n\nAgents don't need to remember everything you've ever done, like what you had for breakfast this morning.\n\nEven though Claude and ChatGPT have auto memory features, it is still useful to build a mental model of how and when agents make memories. This way you aren't stu","offTopic":true},{"id":"717cd400-59e2-4296-924d-a1f775e1e49d","excerpt":"I asked OPUS 4.6 to give me a guide to reduce Openclaw costs. Here was it's response: — \\# OpenClaw Token Cost Optimization — Implementation Guide\n\n\n\n\\*\\*Purpose:\\*\\* You are to implement and maintain these cost-reduction practices at all times. These are compiled from community best practices, official documentation, ","url":"https://www.reddit.com/r/openclaw/comments/1r78fy6/i_asked_opus_46_to_give_me_a_guide_to_reduce/","role":"pain","weight":0.7538667,"occurredAt":"2026-02-17T15:06:46.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"openclaw","intent":"other","painScore":0.17333333,"sentiment":-0.43333334,"confidence":0.6425,"matchedPatterns":[],"statement":"I asked OPUS 4.6 to give me a guide to reduce Openclaw costs.","title":"I asked OPUS 4.6 to give me a guide to reduce Openclaw costs. Here was it's response:","body":"\\# OpenClaw Token Cost Optimization — Implementation Guide\n\n\n\n\\*\\*Purpose:\\*\\* You are to implement and maintain these cost-reduction practices at all times. These are compiled from community best practices, official documentation, YouTube guides (Matt Ganzac, Avi Chawla / Daily Dose of DS), X posts (Josh Pigford, Kavin, MemOS), Reddit threads, GitHub Discussion #1949, and the OpenClaw official docs. Follow every applicable section.\n\n\n\n\\---\n\n\n\n\\## 1. SESSION HYGIENE — The #1 Cost Driver\n\n\n\nEvery message you process resends the entire conversation history to the model. This is the single biggest cost multiplier.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- After completing each independent task or topic, run \\`/compact\\` to summarize the session and free context space.\n\n\\- If context usage exceeds 60% (check via \\`/status\\`), proactively compact or suggest a session reset.\n\n\\- After completing a major multi-step workflow, offer to start a fresh session with \\`/new\\` or \\`/reset\\`.\n\n\\- Never let sessions accumulate indefinitely. A bloated session means every single future message costs dramatically more.\n\n\\- Use the \\*\\*memory flush\\*\\* mechanism: before compaction triggers, write critical context to \\`memory/YYYY-MM-DD.md\\` files so compaction doesn't destroy important details.\n\n\\- Set and respect \\`agents.defaults.compaction.memoryFlush\\` to auto-flush memory before compaction.\n\n\n\n\\*\\*Config recommendations:\\*\\*\n\n\\`\\`\\`json5\n\n{\n\n  \"agents\": {\n\n\"defaults\": {\n\n\"compaction\": {\n\n\"memoryFlush\": true\n\n}\n\n}\n\n  }\n\n}\n\n\\`\\`\\`\n\n\n\n\\---\n\n\n\n\\## 2. TRIM BOOTSTRAP FILES — Every Line Costs Money Every Message\n\n\n\nYour SOUL.md, AGENTS.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, and MEMORY.md are injected into EVERY API call. Every unnecessary word in these files is paid for on every single interaction.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Keep [SOUL.md](http://SOUL.md) as short as possible. If your personality file is 2,000+ words, cut it down. Shorter personality files are cheaper.\n\n\\- Move workflow instructions, procedures, and detailed how-tos OUT of [SOUL.md](http://SOUL.md) and INTO skills. Skills are only loaded when invoked, not on every message.\n\n\\- Move reference material into \\`memory/\\*.md\\` files that are fetched on-demand via memory tools, NOT auto-injected.\n\n\\- Keep skill descriptions short — the skill list is injected into the prompt on every call.\n\n\\- Audit all bootstrap files regularly. Ask yourself: \"Does this line need to be sent with every single API call?\" If not, move it to a skill or memory file.\n\n\\- Use \\`/context list\\` or \\`/context detail\\` to see exactly how many tokens each injected file costs.\n\n\\- Respect \\`agents.defaults.bootstrapMaxChars\\` (default: 20,000) and \\`agents.defaults.bootstrapTotalMaxChars\\` (default: 150,000). Lower these if possible.\n\n\n\n\\*\\*How to audit (run this yourself):\\*\\*\n\n1. Run \\`/context detail\\` and list the token cost of each injected file.\n\n2. Identify any file consuming >2,000 tokens that contains information not needed on every turn.\n\n3. Extract that content into a skill or on-demand memory file.\n\n4. Confirm savings with \\`/context detail\\` again.\n\n\n\n\\---\n\n\n\n\\## 3. RESPONSE BREVITY — Cut Output Tokens by 40-50%\n\n\n\nOutput tokens cost 2-5x more than input tokens. Verbose responses are expensive responses.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Answer in 1-2 paragraphs unless more detail is explicitly requested. Trust the user to ask follow-ups.\n\n\\- No narration of routine operations. Don't explain what you're about to do, just do it.\n\n\\- No preamble. No \"Sure, I'd be happy to help with that!\" — get to the point.\n\n\\- No restating the question back.\n\n\\- No summarizing what you just did unless asked.\n\n\\- When listing decisions or status updates, use 1-line summaries. Let the user ask for detail.\n\n\\- For routine confirmations (task created, file saved, message sent), respond in one sentence.\n\n\n\n\\---\n\n\n\n\\## 4. HEARTBEAT OPTIMIZATION — The Silent Budget Killer\n\n\n\nEvery heartbeat trigger is a full API call carrying the entire session context. Misconfigured heartbeats can cost $50+/day doing nothing useful.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Set heartbeat interval to the minimum useful frequency. If checking email every 5 minutes, change it to every 30-60 minutes.\n\n\\- Batch heartbeat checks: if you need to check email, calendar, and tasks, do them all in one heartbeat turn rather than separate triggers.\n\n\\- For monitoring tasks (printer status, server health, queue checks), use \\*\\*cron with shell scripts\\*\\* instead of heartbeat. Scripts run at zero token cost. Only invoke the model if something actually needs attention.\n\n\\- Run heartbeat/cron jobs in \\`sessionTarget: \"isolated\"\\` to prevent them from polluting your main conversation context.\n\n\\- Restrict cron jobs to waking hours unless 24/7 monitoring is essential.\n\n\\- Consider setting heartbeat interval to just under the cache TTL (e.g., 55 minutes for a 1-hour TTL) to keep the prompt cache warm and avoid expensive cache-write costs on cold starts.\n\n\n\n\\*\\*Config example for cache-warm heartbeat:\\*\\*\n\n\\`\\`\\`json5\n\n{\n\n  \"agents\": {\n\n\"defaults\": {\n\n\"model\": {\n\n\"primary\": \"anthropic/claude-sonnet-4-5\"\n\n},\n\n\"models\": {\n\n\"anthropic/claude-sonnet-4-5\": {\n\n\"params\": {\n\n\"cacheRetention\": \"long\"\n\n}\n\n}\n\n},\n\n\"heartbeat\": {\n\n\"every\": \"55m\"\n\n}\n\n}\n\n  }\n\n}\n\n\\`\\`\\`\n\n\n\n\\*\\*The \"dumb scripts + smart triggers\" pattern (from Josh Pigford on X):\\*\\*\n\n\\- OLD: Heartbeat → Model wakes → Reads [HEARTBEAT.md](http://HEARTBEAT.md) → Figures out what to check → Runs commands → Interprets output → Decides action → Maybe reports (every step burns tokens)\n\n\\- NEW: Cron fires → Script runs (zero tokens) → Script handles all logic → Only calls model if there's something to report → Model formats & sends\n\n\n\n\\---\n\n\n\n\\## 5. MODEL ROUTING — Use the Right Model for the Job\n\n\n\nNot every task needs the most expensive model. The price difference between Opus and Haiku can be 25x.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Use the primary expensive model (Sonnet/Opus) for complex reasoning, nuanced conversation, and multi-step problem solving.\n\n\\- Route sub-agents, cron jobs, heartbeat checks, and routine automation to cheaper models (Haiku, GPT-4o-mini, Gemini Flash).\n\n\\- Configure model failover chains: Primary (Sonnet) → Fallback (Haiku) → Budget (Gemini Flash/GPT-4o-mini).\n\n\\- When spawning sub-agents with \\`/spawn\\`, specify a cheaper model for the sub-task when appropriate.\n\n\\- For simple queries (weather, time, basic lookups, greetings), a budget model is sufficient.\n\n\\- Verify the model actually applied after configuration. OpenClaw has had bugs where model names didn't resolve correctly, causing silent fallback to the most expensive model.\n\n\n\n\\*\\*Tiered model strategy example (from GitHub Discussion #1949):\\*\\*\n\n\\- Tier 1 (simple lookups, greetings): Gemini Flash Lite (\\~$0.075/M input)\n\n\\- Tier 2 (moderate tasks, summarization): Gemini Flash or Haiku (\\~$0.25-1/M input)\n\n\\- Tier 3 (complex reasoning, coding): Sonnet ($3/M input)\n\n\\- Tier 4 (critical, highest quality): Opus ($15/M input) — only when explicitly needed\n\n\n\n\\---\n\n\n\n\\## 6. TOOL OUTPUT MANAGEMENT — Prevent Context Explosion\n\n\n\nTool outputs (file listings, API responses, config schemas) get stored in session history and resent with every future message. One large tool output can permanently bloat your session.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Never execute commands that produce large outputs in your main session.\n\n\\- If you need to read large files or directory listings, do it in an isolated sub-agent session.\n\n\\- Summarize large tool outputs before storing them. Don't dump raw JSON or file trees into session history.\n\n\\- If a tool returns >1,000 tokens of output, summarize the relevant parts and discard the rest before it enters the session transcript.\n\n\\- Use sub-agents (\\`/spawn\\`) for heavy tasks like:\n\n  \\- Summarizing Discord/Slack message histories\n\n  \\- Parsing large config files\n\n  \\- Directory traversals\n\n  \\- Log analysis\n\n\\- Sub-agents have isolated context (only loads AGENTS.md + TOOLS.md, not full chat history) and can use cheaper models.\n\n\n\n\\---\n\n\n\n\\## 7. PROMPT CACHING — Leverage Anthropic's 90% Discount\n\n\n\nAnthropic's prompt caching charges only 10% for cache hits on previously sent content. Structure your prompts to maximize cache hits.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Keep static content (system prompt, personality, tool definitions) at the START of the prompt. Variable content (user message, current context) goes at the END.\n\n\\- Set \\`cacheRetention: \"long\"\\` for your model to maximize cache hit windows.\n\n\\- Maintain consistent interaction frequency. If the cache TTL is 1 hour and you go 61 minutes without a message, you pay full price for a \"cold start\" re-cache.\n\n\\- Use heartbeat at just-under-TTL intervals to keep the cache warm during idle periods (e.g., heartbeat every 55 minutes for a 1-hour TTL).\n\n\\- Enable cache-TTL pruning: this prunes the session once the cache TTL expires, then resets the cache window so subsequent requests reuse freshly cached context.\n\n\n\n\\---\n\n\n\n\\## 8. MEMORY MANAGEMENT — Load On-Demand, Not Upfront\n\n\n\nLoading your full [MEMORY.md](http://MEMORY.md) on every single message is wasteful. Most messages don't need your entire memory.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Do NOT auto-load full [MEMORY.md](http://MEMORY.md) on every interaction. Keep it out of the bootstrap injection if possible.\n\n\\- Use \\`memory/\\*.md\\` files which are fetched on-demand via memory tools, not auto-injected.\n\n\\- Implement \"index first, fetch on-demand\" pattern:\n\n  \\- Base session loads only: core system prompt + active project file (\\~5,000 tokens)\n\n  \\- When the user asks about past decisions/context: semantic search retrieves only the relevant memory (\\~500 tokens)\n\n\\- Keep a Progressive Disclosure Index: instead of loading all memories, maintain a lightweight index. Search the index, then fetch full content only when needed.\n\n\\- Regularly distill daily logs into curated long-term memory. Remove noise, keep signal.\n\n\n\n\\*\\*Token math (from Kyle Obear on Medium):\\*\\*\n\n\\- Bad: Full [MEMORY.md](http://MEMORY.md) (20K) + Session history (10K) + Tool docs (8K) = 38,000 tokens minimum per message\n\n\\- Good: Core prompt (2K) + Active project (3K) = 5,000 tokens minimum per message\n\n\\- That's a 7.6x reduction in base cost per message.\n\n\n\n\\---\n\n\n\n\\## 9. MONITORING — You Can't Fix What You Can't See\n\n\n\n\\*\\*Commands to use regularly:\\*\\*\n\n\\- \\`/status\\` — Check current model, context usage percentage, and estimated session cost\n\n\\- \\`/usage full\\` — Enable per-response usage footer showing tokens consumed\n\n\\- \\`/usage cost\\` — Show local cost summary from session logs\n\n\\- \\`/context list\\` — See what's injected into your prompt and how much each piece costs\n\n\\- \\`/context detail\\` — Detailed per-file token breakdown\n\n\n\n\\*\\*Practices:\\*\\*\n\n\\- Check \\`/status\\` after any heavy operation to catch context bloat early.\n\n\\- Set hard spending limits and budget alerts at 50%, 75%, and 90% thresholds.\n\n\\- Use separate API keys per workflow to track which automation is driving usage.\n\n\\- Monitor token usage weekly, not monthly. Catch spikes early.\n\n\n\n\\---\n\n\n\n\\## 10. LOOP PREVENTION — Guard Against Runaway Costs\n\n\n\nAutomated tasks stuck in retry loops can burn hundreds of dollars in hours.\n\n\n\n\\*\\*Rules to follow:\\*\\*\n\n\\- Set timeouts on all automated tasks.\n\n\\- Implement maximum retry counts for any operation that could loop.\n\n\\- If a task fails 3 times in a row, stop and report the failure rather than retrying indefinitely.\n\n\\- Never run unattended automation until you've monitored its behavior and cost for several days.\n\n\\- Before going \"always-on,\" test in a contained environment first.\n\n\n\n\\---\n\n\n\n\\## 11. SUBSCRIPTION vs API — The Break-Even Math\n\n\n\n\\*\\*Rules of thumb:\\*\\*\n\n\\- If your API bill exceeds \\~$20/month → Claude Pro subscription is cheaper\n\n\\- If your API bill exceeds \\~$100/month → Claude Max 5x subscription is cheaper\n\n\\- Consider a hybrid approach: Claude Max subscription for pr","offTopic":false},{"id":"183019c4-53b8-4d01-904e-6b74507da8ff","excerpt":"How to use AI Tools for Token ROI Optimization — Hey r/ai_tools! I'm Mark, part of the community outreach team over at BriefHQ. Lately we’ve been looking into token burn across agentic workflows, and it seems that the general sentiment is that people are still struggling at finding a way to handle this issue. While the","url":"https://www.reddit.com/r/ai_tools/comments/1vu416u/how_to_use_ai_tools_for_token_roi_optimization/","role":"pain","weight":0.7444461,"occurredAt":"2026-08-21T02:46:30.000Z","sourceKey":"reddit","sourceName":"Reddit","credibility":0.62,"venue":"ai_tools","intent":"other","painScore":0.4,"sentiment":-1,"confidence":0.5317472,"matchedPatterns":[],"statement":"How to use AI Tools for Token ROI Optimization.","title":"How to use AI Tools for Token ROI Optimization","body":"Hey r/ai_tools! I'm Mark, part of the community outreach team over at BriefHQ. Lately we’ve been looking into token burn across agentic workflows, and it seems that the general sentiment is that people are still struggling at finding a way to handle this issue. While there's a ton of AI tools that are built to help with this issue, people are either using the wrong tools or using them incorrectly. I'm hoping to be able to help everyone optimize their token ROI without sacrificing output quality.\n\nOne of the most prevalent issues usually arises when scaling up tools like Cursor, Claude Code, or their own MCP setups, where people tend to dump full repos and huge chat logs right into the prompt. While this is fine for short scripts, this causes token ROI to tank during long sessions. This happens due to the AI agent running into context drift, which causes it to ignore your early rules and burn up tons of tokens. By focusing on this context drift issue, we can focus on solutions built around it.\n\nThe most direct fix is to stop dumping whole files just to give the model one rule, since pulling in hundreds of lines of code for a single constraint wastes massive space when targeted tools can grab just the specific requirement. You also want to clean up terminal and test logs before sending them back into the prompt, as raw terminal outputs stuff hundreds of useless lines into your history that could easily be filtered locally.\n\nAnother approach is by keeping your main project rules out of the active chat history, as relying on conversation memory means resending all that old context on every turn. The ideal approach is storing those decisions in a separate persistent spec or context layer, which you can do by either managing local markdown files with dedicated prompt hooks, running custom script checks, or using tools like BriefHQ via CLI and MCP. Whichever method you use lets your agent pull targeted rules without re-reading the entire conversation every single time.\n\nUltimately, keeping your token burn low comes down to three things: passing targeted rules instead of full files, filtering local terminal logs, and offloading specs to a separate context layer. Hope this has helped and let me know if there are any questions!","offTopic":false}],"breakdown":[{"sourceKey":"reddit","sourceName":"Reddit","count":14},{"sourceKey":"lemmy","sourceName":"Lemmy","count":2}],"total":16}}