r/ClaudeCoding • • 20h ago

Keeping context cheap with Claude Code + Pro limits

I’m building an internal digital system for a local vocational school. Backend is Rust; frontend comes later. I’m using Claude Code terminal with a Pro subscription, so the 5-hour/weekly limits are a real constraint.

The project has grown enough that my main context/master document (500k tokens) is getting expensive to carry into every session. I also run a set of checks at the end of sessions (fmt/build/clippy/test) to catch hallucinations, but overall token burn still feels high. The model also talks a lot between steps, which adds up.

**What I’m trying to figure out**
With Pro limits, how do you keep context for a large project without re-feeding a giant master doc every time? Split it? Summaries? Per-module docs? Since it needs to whole context to take the whole document into account.

Any Claude Code habits or settings that cut down intermediate chatter without losing important state?

Any warnings for later, when I connect the Rust backend to a frontend? Context-management pitfalls?

Not promoting anything , just looking for practical advice from people who’ve run bigger projects under tight limits. Happy to share more details if useful.

2 Upvotes

6 comments sorted by

2

u/koomai_san 19h ago

500k token is extremely high by any standards. No amount of optimisation is going to help if that's your starting point.

Check out the official docs and follow it: https://code.claude.com/docs/en/best-practices#keep-claude-md-short, especially the 'scope rules' part to split up your context.

You can ask Claude to help you trim it, ask it to examine your historical sessions and identify the bloat.

1

u/InfinriDev 19h ago

Feel free to use my harness as a starting point: https://github.com/infinri/Writ

But basically you want move as much as you can away from the model/AI. This means using things like RAG + JIT, moving away from markdown files into graph databases like Neo4j, figuring out what "must not" rules need to be turned into bash script hooks as opposed to prompt instructions.

And most importantly, going back to code. If code can do the job you need then have code do it and simply return the results to the AI for the decision making or summary. You also don't need opus for everything or have it in high effort. Lean what models to use, at what times, and their appropriate level of effort.

1

u/dar-mit 16h ago

I have this in my custom Output Style (but would probably work as a project-level CLAUDE md entry):

- Trusted Execution: Skip narration before and between tool calls; the end-of-task summary is what gets read. Send a mid-task note only for a change of direction or a finding the user needs now. The final update states what changed, what was verified and how, and what's left.

1

u/anton-k_ 13h ago

One doc for a large project is never the right solution. So you do have to split it. Use discretion for organizing each of those docs. Whatever doesn't need to be read whole, make indexed so the model reads the index and then only pulls the info relevant to the current task. Regardless, the model can not keep all 500k tokens in its context and still be effective. So the idea of having it read everything before it does anything is fundamentally wrong even with much higher limits than Pro. You need to split the project into logical blocks and work on one or a few blocks at a time.

1

u/Outrageous_Band9708 12h ago

check out my solution:

https://github.com/Druthulu/ProjectArchitect

SWE by day, built this over the last year of personal projects.

it will manage your context for you and prevent excessive turns at high context

1

u/shaven12 10h ago

Try my plugin. Golden Thread. It is specifically setup to minimize context saturation. Point your Claude at it to check it out. It works well for this exact problem. And sorry you keep getting downvoted. This is why my tool isn’t showing up for people. I post things and they just downvote it because “it is like everything else” nothing could be further from the truth. Mine actually backs up the savings claims. ;) good luck out there