| ▲ | Stop wasting tokens and re explaining your project between sessions(github.com) | |||||||||||||||||||||||||||||||||||||
| 55 points by mateenah 3 hours ago | 43 comments | ||||||||||||||||||||||||||||||||||||||
| ▲ | mikeocool an hour ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
I apparently use Claude differently the most people who talk about using Claude on the internet. I’ll typically have a bunch of short sessions over the course of a day. Anytime I start a task that isn’t going to very directly benefit from the existing context I start fresh. I don’t find a lot of benefit in explaining the project overall to Claude — I’ve deleted a lot of that explanation from my Claude.md because it didn’t seem to impact much. I typically start a task by pointing it to 1-2 files and giving it some explanation of what I want done, and it figures it out. Basically never hit context window limits or compactions, and can’t remember the last time I hit a 5 hour or a weekly limit. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | anigbrowl 18 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I use Deepseek and just as it to generate a state.md file with a summary of the project every time I've reached a goal or milestone. I then take a few minutes to edit this and add in or take out details. Between token pricing and generous cache discounts This has proved very efficient so far, I reset every few hours of work and bypass the muddle of having too many priorities or over-extrapolation from un-nuanced instructions I gave at an earlier stage. I do think that this project is interesting in several ways - prioritizing privacy, minimizing spend, and using objective semantic markers to sift and consolidate the key takeaways from long sessions. I'd like to try it on my cline project history. But while it would make a great recording of project history, I wonder if a lot of it doesn't end up detailing blind alleys the project went down and had to back out of. Generally when this happens I feel that it's due to vague specification on my part, or avoiding architectural decisions I didn't want to deal with and implicitly inviting the model to implement a lowest-common-denominator solution. | ||||||||||||||||||||||||||||||||||||||
| ▲ | serial_dev 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I might be missing out on something but I never had to explain my project. Just give it a task, or if you really want to, type it quickly, then you are good to go. I can’t imagine this being worth optimizing. The issue is never that Claude can’t figure out what the projects is about… Am I missing something or does this project not solve a problem most regular people have? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | aubreykilian 18 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I have a documentation vault in my repo, organised using Obsidian (bases, wikilinks, frontmatter, etc), and accessible using obsidian-cli (and related Claude skills, thanks kepano). I started the repo agreeing with Claude the structure and front matter of documents and how to edit and read, all stored in a markdown file in the vault, and a specific instruction in the CLAUDE.md file on when and how to access it. Any updates require consistency sweeps. Any decisions made and agreed during implementation of new features get added to the vault. It's been amazing how I just don't need to explain the project anymore. An empty context and a few sentences on what I'd like to spec next and the LLM finds what it needs in the vault. | ||||||||||||||||||||||||||||||||||||||
| ▲ | SubiculumCode 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Sometimes its good to start fresh. LLMs need large context restart's sometimes so they can better identify holes that they become blind to. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | rabbitlord 31 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
With all due respect, this github repo looks really like an AI-generated project. | ||||||||||||||||||||||||||||||||||||||
| ▲ | comrade1234 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
IntelliJ handles this for you. Basically it sends half your project to Claude even if you're asking some question about Star Wars. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | folays 6 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I was tired of seeing "--resume" loose so much context. I had the idea of an oracle/apprentice. The idea was that the new session would learn from the old session, like a tutor. I asked Claude to code a program, so that the old session would launch in loop, being the "oracle", and the new session would use it to connect to the oracle, to ask it questions. So when I'm doing that, I'm seeing the two Claude sessions discussing between them. It's fun seeing the "apprentice" asking follow-ups questions. The mechanism (on a Linux machine) is relatively simple : I asked Claude to code a Go tool, to use an abstract socket (\0claude-handoff-<projectname>), and specified that whichever is the first to successfully listen (no EADDRINUSE) becomes the "listen()er/accept()er" and that the second becomes the "connect()er". So that establishing the socket in whichever order is independent of which of them is the oracle/listener. I've put the mechanism in a global Claude rules. In the oracle when I'm a 98% usage of the 1M context, I just have to type "handoff <projectname> oracle", and to start a new session with "handoff <projectname> client". And the "oracle" will loop on the tool (with a subagent, waiting indefinitely), the tool exits with a question on output, and re-call (with a subagent "handoff <projectname> answer") to give back the answer (which automatically waits for the next question). And since the oracle is doing the call to the handoff tool in a subagent, when you see it answering, you can also type something along the lines of "hey please also precise to the apprentice <some specific information>". The "transmission of knowledge which matters" is so much efficient, that ~2% of remaining context (20k tokens) is enough to transmis WAY MORE USEFUL information that any memory saving which would miss important informations. It's not unexpected. It's like real-life. You may have an human put all informations that you want in some documentation, nothing can replace a phone line from the new human to the previous human for specific follow-up questions. Tho one of the mattering rule specificity is to precise that the oracle should always include in this response the level of confidence in the answer, like if it is certainty/guess/hypothesis. It's fun. I guess you could also ask Claude to code the tool to instead connect on a localhost IRC server. I think that if you want this tool, you just have to c/c my text into a new Claude session and to tell it "I want this too, please code it, please also setup the global rule". | ||||||||||||||||||||||||||||||||||||||
| ▲ | gman83 an hour ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
How's it different to https://github.com/angelnicolasc/graymatter ? | ||||||||||||||||||||||||||||||||||||||
| ▲ | intothemild 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I think the majority here have stated the same... That CLAUDE.md or AGENTS.md effectively do this. Either that or the readme. The only tip I can give is that your skill that builds or wraps up work. You should have it update those files if anything has changed. Claude/Agents files shouldn't be bloated, but should imho act as a basic amount of context on the project so your agent and skills can pick up and go, with even the most basic initial prompt. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | tt_dev 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
How does this beat a Session specific README? | ||||||||||||||||||||||||||||||||||||||
| ▲ | coherentpony 40 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
My employer is counting token usage, so explaining my project between tokens isn’t necessarily a bad thing. I am clearly a more productive engineer because of it \end{sarcasm} | ||||||||||||||||||||||||||||||||||||||
| ▲ | reckless 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Doesn't Claude have memories like Codex? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | gste 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
CLAUDE.md is already a good system for context window management for all the same reasons that version control management of code is good. And keeping a local copy of everything you ever told Claude in your context window is bad for the same reasons keeping a local copy of your code called My_Code_v3_final.zip is bad. | ||||||||||||||||||||||||||||||||||||||
| ▲ | giancarlostoro 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I never have to because I use a ticketing system the model goes through in addition to a CLAUDE.md file with a summary, including vision, goals, non-goals etc | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | cadamsdotcom 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Exciting to see hooks used for automation. But if I may, the need to manually update the context is a huge hurdle. Automation like this is limited unless no human has to remember it. So perhaps you can save context during the PreCompact and Stop hooks. | ||||||||||||||||||||||||||||||||||||||
| ▲ | dools 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
If I need context for a session then that is output from a previous session, otherwise I find any “memory” functionality cumbersome. I saw /graphify recently which cuts down on exploration cost and seems more appealing (although I haven’t tried it yet) | ||||||||||||||||||||||||||||||||||||||
| ▲ | alansaber 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Nothing wrong with a toy project. | ||||||||||||||||||||||||||||||||||||||
| ▲ | drivebyhooting 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Why would you want a simple summarizer instead of frontier AI doing the summarization for you? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | zihotki 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Are there any benchmarks/evals to back the claims? Or how do you know that it helps reducing waste? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | hbarka 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Willing to try this but the author missed that Claude also has memory.md | ||||||||||||||||||||||||||||||||||||||
| ▲ | dimitrios1 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
The question I find myself asking very often these days: Is this better than asking claude to do the same things the plugin/repo does? | ||||||||||||||||||||||||||||||||||||||
| ▲ | johnwheeler 2 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
How is this different than just using a resume? | ||||||||||||||||||||||||||||||||||||||