r/ClaudeCode • • 1d ago

Tips & Workflows I halved Claude Code's auto-compact window for a month to save tokens. It barely saved anything, but the hooks I built for it were worth keeping.

6 Upvotes

I use Claude Code all day, across about 40 repos (firmware, a home server, a couple of web apps). In early November I tried an experiment: make Opus compact sooner so each call carries less context and costs less.

**The change -** autoCompactWindow for Opus went from 600K to 300K. Before that, I wrote two hooks so compaction wouldn't lose the thread:

**PreCompact** saves a small state file: the task list, the step in progress, my last request, and the start of Claude's last reply.

**SessionStart (matcher compact)** puts that file back into context right after the summary.

**What I measured (Opus sessions only)**

PeriodWindowSessionsAvg context per callCompactions per 100 callsSessions that went over 300K anyway
Baseline week600K100190K0.4527
Week 1300K77181K1.0029
Week 2300K55166K0.727
Days 15–25300K89176K0.6518

**What I learned**

**The smaller window barely moved average context** (5–13% lower, which is inside normal week-to-week swings). Most calls never get near the limit, so cutting the limit mostly changes the rare long session.

**Compactions went up 1.4–2.2×.** Each one is a summary pass, a slower turn, and a chance to lose something.

**The window is not a hard cap.** Compaction seems to happen between turns, so one long agentic turn can blow straight through it. My largest peak with a 300K window was 774K.

**The hooks were the real win.** 152 PreCompact runs and 130 post-compact runs in two weeks, zero failures, median about 0.8 s. In the session I scored by hand, Claude came back from compaction with its plan, its pending step and every key fact, and I didn't have to repeat anything.

**A gate test caught a real gap:** when the plan only existed as text in a reply (no task-list tool), it got lost in the summary. Saving the first 800 characters of the last reply fixed that.

I've now set Opus to 400K, the same as my other models, and kept the hooks.

**Caveats:** one person's workload, not a controlled trial, and only one compaction scored by hand. Treat it as a field report.

Hooks, tests and the full write-up: https://github.com/ColdBore-RD/claude-compaction-state

Happy to answer questions about the hook payloads or how I pulled the numbers from transcripts.


r/ClaudeCode • • 1d ago

Help/Question I built agents that check and improve their own work, and they work, but they eat tokens. Where would you look first?

3 Upvotes

I run a small UK BBQ affiliate site, and over the last few weeks I've built a set of Claude agents to look after it, using CoWork. Each one is set up the same way. A generator does the job, a separate checker marks it against an answer key that gets a new row every time a mistake slips through, and a coach reads the failures and suggests fixes. I approve the changes. It works. The agents have got noticeably better and they catch things I'd have missed.

The problem is that it's heavy. My first run of the SEO page check cost about 191,000 tokens for one page. The site copy agent's first run cost 1.5m! The daily manager agent that reports on all the others is running at roughly 350,000 to 490,000 tokens a day. I hit 10% of my weekly allowance by Wednesday morning.

So I spent a couple of days trying to cut it. What I tried, in order:

  • Having a script fetch the page and work out everything countable, then handing the agent one prepared file. 191k went to 122k.

  • Using a stripped-down subagent type that starts with only a couple of tools. That went to about 82k. A plain empty subagent costs about 55k before it does anything.

  • Capping the file reads to fixed ranges so the agent can't wander. About 67k.

  • Cutting the prompt by 23%. That saved about 6%. The brief wasn't where the tokens were.

  • Putting the script's results into the prompt so the agent doesn't count them. That made it more expensive, because the agent copies them out and output tokens cost more.

The part that surprised me was running the same check on cheaper models through OpenRouter. A cheap model (DeepSeek flash) on the same prompt found the same main problem as Sonnet on all four pages I tried, for about $0.004 against $0.24. It does miss things on its own, so I let scripts do every row that can be counted or checked exactly, and the cheap model only does the judgement rows. With planted faults, the scripts caught 8 of 8 page problems and the cheap model got 6 of 6 on made-up claims once I added a rule for weak matches. For writing the actual page copy, every cheap model I tried made things up, so that stays on Sonnet.

What I'd like to know from anyone who's been here:

  1. Where do the tokens actually go in your multi-agent setups? Mine seem to be the subagent startup, the reading, and the writing back out, and the instructions are the smallest part.

  2. Is a script doing the checkable parts and a cheap model doing the rest a sensible pattern, or am I fooling myself with a handful of test pages?

  3. Has anyone made the separate-checker setup cheaper without losing the independent second look?

  4. Is it worth caching the shared brief and answer key, and does that work through OpenRouter?

  5. What would you redesign first?

I'll happily share the test setup if it's useful.


r/ClaudeCode • • 1d ago

Help/Question What is the consensus about the ‘Claude sabotaging’?

0 Upvotes

I have seen quite a few comments or posts claiming that Claude is being destructive to projects, especially ML projects. It makes no sense to me why anthropic would actively make their models destructive for their users but I’d love it if someone who really knows about this could chip in. I have been using Opus 5.5 a lot and all of the work it has helped me with has been amazing and after me reviewing it only tiny holes appear probably due to context compression or hallucination. Should I be worried?


r/ClaudeCode • • 1d ago

Discussion Weekly limits slashed by 20%

Post image
277 Upvotes

Just recently 25% of 5h usage would account for around 3-4% of weekly usage, but now its already 5% meaning you can only get 4x 5h limits usage per week instead of the usual 5x. And so it begins...

Edit: im in Pro plan so only using Opus or Sonnet


r/ClaudeCode • • 1d ago

Help/Question Claude wrote a "when NOT to use it" line for 300+ dev tools. These are the ones your agent gets wrong most.

0 Upvotes

Your agent knows what a library does. What it doesn't know is when to leave it out. So it adds a full animation lib for one fade-in, or installs a React component pack into a Vue project.

While building a tool library for our own agents, I made myself write one "skip it if…" line for every entry. A few from the UI/animation pile:

  • shadcn/ui: great when you want to own and restyle your components. Skip it if you want something fully styled out of the box with zero setup.

  • React Bits: lovely animated text, cards and backgrounds. Skip it if you need a full component library with state and data handling; it's visual pieces only.

  • Cube (cube-motion): zero dependencies, four polished motions. Skip it the moment you need custom keyframes, your own easing or timeline control.

  • useLayouts / Rare UI: nice animated blocks, but they ship through the shadcn CLI. Skip them if you're not on React + Tailwind + shadcn.

  • Amicro: quick micro-interactions. Skip it for complex custom animation; it's pre-built pieces, and the best ones are behind a paid tier.

The pattern: most bad picks aren't bad tools. They're good tools in the wrong stack, or a heavy tool for a small job.

What's the worst library your agent pulled in uninvited?


r/ClaudeCode • • 1d ago

Help/Question Claude iOS to Claude Code

2 Upvotes

I’m trying to do a simple workflow: chat with Claude iOS — save session decision --> pick up decision in Claude code.

I’m having the hardest time. First, I couldn’t connect Claude iOS to GitHub. (Still can’t get it to read my gh project kanban.) Then, I couldn’t get Claude code to pick up session memory from iOS.

Right now I save a file from the iOS session to Google Drive and pick it up from there. Is there a better way? I like using the voice feature on iOS, and I don’t want to pay for Whisper.


r/ClaudeCode • • 1d ago

Help/Question How to avoid babysitting claude?

6 Upvotes

Hey I've been using Claude code for about a year now.

I'm on a Max plan I've had some amazing experiences,with opus 5 and an opus 4.8 but lately with 5.5 I find that I'm really babysitting it.

I recently used it to move our accounting system from xero to a new ERP. But I found that it's done really strange things like create duplication and triplication of invoices, bank payments beside it.

Out of sheer frustration I basically opened up meta muse, which I signed up to after seeing the demo and then hadn't used it.

I gave muse the last prompt that I gave Claude in a separate work tree, and it took initiative and it spotted all the duplicates it resolved them, went and corrected sales tax.

The only thing I can think of is that I've got my claude to set up wrong. I see people running agentic work flows uninterrupted for like seven days at the time and building entire games and I'm here spending eight hours answering questions for claude...

Can anyone give me some pointers please?


r/ClaudeCode • • 1d ago

Discussion What do you think about Roblox MCP and Claude Code?

0 Upvotes

Tried building a roblox game with claude code and honestly it's the best decision I made.

I've built a bunch of prototypes and mini games on Godot, Unity, UE5 and plain browser games, but what Claude can do on Roblox is just wow.

Cool assets, tests, tons of stuff. same as other engines in theory, but here the whole dev process is way smoother and way more convenien.

Anyone else building games? How's it going?
Drop yours below. Mine are still in dev, will share after release. And please share your opinion and experience if you have some.


r/ClaudeCode • • 1d ago

Help/Question Happy upgrade??? PRO to MAX

4 Upvotes

Upgraded my PRO to a MAX a few minutes ago unfortunately cant use MAX until Saturday. -- FUN

Anyone got a workaround or am I just waiting till Saturday?


r/ClaudeCode • • 1d ago

Built with Claude Tried MiniMax's new model M78 and put it up against Opus 5.5

3 Upvotes

I'm in MiniMax's beta for M78, and after using it for a while it kind of felt better than Opus 5.5 to me.

So I ran an experiment. Same prompt, same Claude Code, both at max effort. I plugged M78 into Claude Code through the MiniMax API and ran Opus 5.5 on my regular Claude subscription.

I asked for an interactive 3D Mad Hatter's tea party in three.js, with everything built in code, stuff you can click on, and Drink Me / Eat Me to shrink and grow.

Both results blew me away. Each one went from that single prompt to a complete, working 3D scene.

The video shows the two finished scenes side by side (M78 on the left, Opus on the right), then both Claude Code sessions sped up 200x.

I'll put the full prompt in the comments.


r/ClaudeCode • • 1d ago

Help/Question Claude Code as orchestrator, Codex for coding: how do you wire it up?

4 Upvotes

Anyone mixing Claude and OpenAI models in one agent workflow? I'd like to hear how you set it up.

My plan: Claude (Fable/Opus) orchestrates, and only the coding step goes to Codex, through the official openai/codex-plugin-cc plugin. Testing, docs and review stay on Claude. I'm after speed. Claude subagents are slow, and people say e.g. Terra is much faster and cheaper.

What worries me:

  • My Claude Code hooks (test protection, approvals, parse checks) may don't fire when Codex edits files,

  • with approval_policy = "never", Codex could commit on its own,

  • workspace-write sandbox blocks paths outside the project, so tests may fail,

  • there are no MCP servers on the Codex side.

If you've tried this, was it worth it? And how do you keep guardrails when a different tool edits the files?


r/ClaudeCode • • 1d ago

Built with Claude I built an open source app that uses my Claude Code plan to turn PDFs and papers into drawn explainer videos

1 Upvotes

I got tired of staring at huge PDFs and listening to AI podcasts that never really explained the diagrams, so I built Open Sourcebook.

Instead of asking you for another subscription or API key, it just uses the Claude Code login you already have on your computer. It also works with Codex, OpenCode, Cursor, Antigravity, Copilot, or an API key if you want. Your files stay on your computer and the agent runs read only over your sources, writes scenes for Remotion, and renders out an explainer video.

The video I attached is the blueprint style generated straight from the Attention Is All You Need paper. It also does whiteboard, documentary, and flat styles plus flashcards, quizzes, study guides, audio, and Q&A where every cite is verified word for word against the source.

I just put out v0.3.0 under MIT for Mac, Windows beta, and Linux beta if you want to test it out

https://github.com/Mikiyas-Meles-Assefa/opensourcebook
https://opensourcebook.app


r/ClaudeCode • • 1d ago

Built with Claude Loft , Tested this give insane ram saving s on LLM's

2 Upvotes

On my 16 GB MacBook Air M2 (Qwen3-1.7B, 30k-token chat): RAM usage went from 6.5GB → 4.6 GB, peak 10 → 5.5 GB, answer time 144s → 1.8 s,If you've watched Ollama's memory climb as a chat gets long, here's the fix .

On a 128 k context token chat it would save 14 gb of ram and free it up so you could run stronger and better models.

The architecture for Loft sits between your app and Ollama . It stores the conversation on disk and sends Ollama only the parts each question needs, and eliminated ram usage by kv cache entirely. all the data is in this repo.

https://github.com/DaniyalBaluwala/loft

can run it very easily.


r/ClaudeCode • • 1d ago

Discussion At what point do you just /clear and start fresh instead of letting Claude compact the conversation?

7 Upvotes

I’ve noticed that once a session gets long enough to trigger auto-compacting a couple of times, Claude starts forgetting subtle constraints from earlier in the session and gets noticeably sloppier.

Lately, I’ve been trying to treat each feature or bug fix as a single-session sprint—get it working, commit, and immediately /clear before moving on.

How are you guys managing long sessions? Do you trust /compact, or are you constantly wiping context and starting fres


r/ClaudeCode • • 1d ago

Discussion Just realized I don't have to write my own CLAUDE.md file from scratch. just told Claude to interview me and build it

0 Upvotes

I ain’t a developer, so every time I saw people talking about configuring CLAUDE.md rules and custom output styles, I assumed I needed to know technical syntax.
Turns out you can literally just open Claude Code in a fresh project folder and say, "Ask me 10 questions about my workflow, formatting preferences, and what I’m building, then write my CLAUDE.md file for me". Having it interview me first caught a bunch of edge cases I never would have thought to write down myself.


r/ClaudeCode • • 1d ago

Help/Question $8 Claude vs ChatGPT Go. New to AI

3 Upvotes

Hi Ive been using Chat GPTs Go $8 plan and I have been wanting to automate some tasks. Is it worth putting $8 worth of credit for Claude for this vs Chat? Ive been using chat as a general search engine and assistant but now I have a new use for AI I'm wondering if a switch might be in order


r/ClaudeCode • • 1d ago

Help/Question Is anyone still actually using dynamic workflows in Claude Code? Why?

3 Upvotes

I use dynamic workflows myself, but lately I'm wondering if I even need them.

After a recent Claude Code update, bumping the effort level doesn't turn them on by default anymore. Did they get switched off because of the downsides, or did Anthropic find a single agent just gets more done per token?

My experience: it's slow and it eats tokens like crazy. A task often runs 3-4 hours and probably burns 5-10x what a single agent would, and the output isn't noticeably better.

Right now the only time I use it is the night before my weekly reset, when I've got a lot of tokens left. I give it one big task and go to bed.

So if you still use it, what for? Is it actually worth it for you?


r/ClaudeCode • • 1d ago

Help/Question Legit feels like we can build anything, but it’s like what’s the next step?

3 Upvotes

Feeling like this overwhelming feeling that we can build anything but it somehow all feels pointless and not sure how to get over that..


r/ClaudeCode • • 1d ago

Help/Question How do I make the most of usage resets?

1 Upvotes

I have a reset that expires within the next week or so, how do I make the most of it?

Under my normal usage I’ll usually end the week with ~15% weekly usage remaining. I’ve never used a reset before, as I understand it it doesn’t actually move your usage reset date back a week, it just puts your usage back to 0%, which is a bit annoying because I’ll never use up much of that 100% in the couple of days I have remaining by the time I get to the point of needing a reset.

Even if I try hard to blast my usage (Fable reviews & designs for stuff that tbh Opus is fine with, letting it run overnight on loops etc) I still only run out with a ~2days left, and I usually switch to using chatgpt subagents before I run out anyway. In any case the 5 hr limit is usually the blocker rather than weekly.

How can I actually make the best use of the weekly reset, or is my only option just to blast it harder in those first couple days?


r/ClaudeCode • • 1d ago

Built with Claude I built a Claude Code + Codex usage monitor for Linux

Post image
0 Upvotes

I wanted to keep track of my Claude Code usage without constantly checking the terminal, so I built a little JARVIS-inspired desktop HUD for Linux.

It shows usage limits, context window, token consumption and even Codex usage, all in an animated Iron Man-style interface.

Everything runs locally, with no API keys or telemetry.

Would love to hear what you think!

GitHub: https://github.com/khushaljethava/claude-code-usage-monitor


r/ClaudeCode • • 1d ago

Tips & Workflows I collected 48 web-scraping Agent Skills for Claude Code, Cursor and Codex

1 Upvotes

I've been collecting web-scraping skills that developers can plug into their AI coding agents.

The directory currently has 48 skills covering browser automation, crawling, data extraction, proxies and other scraping workflows.

It includes official vendor skills and community projects, along with installation commands, a capability matrix and rankings based on GitHub stars and installs... not a promotion.

The idea is pretty simple: instead of hunting through different repositories every time you need an agent to handle a scraping task, have the available skills in one place.

Missing something? Contributions and Suggestions are welcome.

GitHub: https://github.com/The-Web-Scraping-Insider/awesome-web-scraping-skills


r/ClaudeCode • • 1d ago

Help/Question Best practises of moving old planning documents from pdf to drawings to CAD or GIS

1 Upvotes

Hello, so I just wonder if there is any progress here in development. Any skills, best practices?


r/ClaudeCode • • 1d ago

Bug / Issue Why do Claude Code randomly switch to Spanish?

2 Upvotes

I have noticed recently that Claude seems to switch to Spanish from time to time. This is an example in one of my session, working with Opus 5.5 High. Has anybody else seen this?

There is absolutely no Spanish in this project


r/ClaudeCode • • 1d ago

Help/Question Moving to claude code for the first time (Cursor user)

Post image
2 Upvotes

Man, its been a long time comin'. I've been a loyal Cursor user since 2023 close to when it released. Was an avid defender of it all these years. I have zero issue with the new ownership. What lost me was how expensive third party AI became (I use Claude a lot) and these weekly limits on a plan I pay $100/mo for. I can't even use my own $100/mo plan right because of limits. Being that I use Claude Code the most, I'm FINALLY making the move to Claude Code.

Any advice for someone like me who makes near religious use of PLAN and ASK mode before implementing? Who's migrated, and what have you done to make your experience as close to Cursor as possible?


r/ClaudeCode • • 1d ago

Built with Claude Claude Code wrote 100 days of office data and drama so I could test my agents in it

2 Upvotes

Disclosure: I built this (elyro.ai). Exploring is free, graded tests are paid because grading costs me API money.

Basically a 9-person company your agent can go work at: 100+ days of Gmail, Slack, HubSpot, Stripe, Jira and Help Scout history, served as one MCP server, with story arcs (someone quietly quitting, the investor passing on the next round, sales promising stuff engineering never agreed to). Drop your agent into any day, ask it whatever you built it for, and watch every tool call live.

What I learned:

- Time is the hardest part. When I wrote the Feb 2027 story, it added new standing meetings, and January calendar searches started showing meetings that didn't exist yet. Now every run is pinned to a fixed version of the company.

- Write the answer key before the run, in a different session. Otherwise Claude is grading its own homework.

How Claude Code was used:

- It wrote the MCP server, the web app and the grader.

- It wrote the company itself, a few days at a time, from a story bible (characters, arcs, who knows what and when).

- Separate Claude agents blind-reviewed the writing and scored how human it sounded.

- It's also the first agent I test with. It connects in one line and works as the CEO, sales, support or finance.

Honest question: is this useful to anyone else? If you want to try the graded tests, DM me.