6 ms·
This is definitely good to have this as an option but at the same time having more context reduces the quality of the output because it's easier for the LLM to
by tankenmate 1y ago
This is definitely good to have this as an option but at the same time having more context reduces the quality of the output because it's easier for the LLM to get "distracted". So, I wonder what will happen to the quality of code produced by tools like Claude Code if users don't properly understand the trade off being made (if they leave it in auto mode of coding right up to the auto compact).
- jasonthorsness 1y agoWhat do you recommend doing instead? I've been using Claude Code a lot but am still pretty novice at the best practices around this.
- TheDong 1y agoHave the AI produce a plan that spans multiple files (like "01 create frontend.md", "02 create backend.md", "03 test frontend and backend running together.md"), and then create a fresh context for each step if it looks like re-using the same context is leading it to confusion. Also, commit frequently, and if the AI constantly goes down the wrong path ("I can't create X so I'll stub it out with Y, we'll fix it later"), you can update the original plan with wording to tell it not to take that path ("Do not ever stub out X, we must make X work"), and then start a fresh session with an older and simpler version of the code and see if that fresh context ends up down a better path. You can also run multiple attempts in parallel if you use tooling that supports that (containers + git worktrees is one way)
- F7F7F7 1y agoInventivatbly the files become a mess of their own. Changes and learnings from one part of the plan often dont result in adaptation to impacted plans down chain. In the end you have a mish mash of half implemented plans and now you’ve lost context too. Which leads to blowing tokens on trying to figure out what’s been implemented, what’s half baked, and what was completely ignored. Any links to anyone who’s built something at scale using this method? It always sounds good on paper. I’d love to find a system that works.
- brandall10 1y agoMy system is to create detailed feature files up to a few hundred lines in size that are immutable, and then have a status.md file (preferably kept to about 50 lines) that links to a current feature that is used as a way to keep track of the progress on that feature. Additionally I have a Claude Code command with instructions referencing the status.md, how to select the next task, how to compact status.md, etc. Every time I'm done with a unit of work from that feature - always triggered w/ ultrathink - I'll put up a PR and go through the motions of extra refactors/testing. For more complex PRs that require many extra commits to get prod ready I just let the sessions auto-compact. After merging I'll clear the context and call the CC command to progress to the next unit of work. This allows me to put up to around 4-5 meaningful PRs per feature if it's reasonably complex while keeping the context relatively tight. The current project I'm focused on is just over 16k LOC in swift (25k total w/ tests) and it seems to work pretty well - it rarely gets off track, does unnecessary refactors, destroys working features, etc.
- nzach 1y agoCare to elaborate on how you use the status.md file? What exactly you put in there, and what value does it bring?
- brandall10 1y agoWhen I initially have it built from a feature file, it pulls in the most pertinent high level details from that and creates a supercharged task list that is updated w/ implementation details as the feature progresses. As it links to the feature file as well, that is pulled into the context, but status.md is there to essentially act as a 'cursor' to where it is in the implementation and provide extended working memory - that Claude itself manages - specific to that feature. With that you can work on bite sized chunks of the feature each with a clean context. When the feature is complete it is trashed. I've seen others try to achieve similar things by making CLAUDE.md or the feature file mutable but that IME is a bad time. CLAUDE.md should be lean with the details to work on the project, and the feature file can easily be corrupted in an unintended way allowing things to go wayward in scope.
- wongarsu 1y agoChanging the prompt and rerunning is something where Cursor still has a clear edge over Claude Code. It's such a powerful technique for keeping the context small because it keeps the context clear of back-and-forths and dead ends. I wish it was more universally supported
- abound 1y agoI do this all the time in Claude Code, you hit Escape twice and select the conversation point to 'branch' from.
- agotterer 1y agoI use the main Claude code thread (I don’t know what to call it) for planning and then explicitly tell Claude to delegate certain standalone tasks out to subagents. The subagents don’t consume the main threads context window. Even just delegating testing, debugging, and building will save a ton context.
- sixothree 1y ago/clear often is really the first tool for management. Do this when you finish a task.
- tehlike 1y agoSome reference: https://simonwillison.net/2025/Jun/29/how-to-fix-your-context/ https://simonwillison.net/2025/Jun/29/how-to-fix-your-contex... https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-ho...
- cubefox 1y agoIt would be interesting how this manifests in SSM/Mamba models. The way they handle their context window is different from Transformers, as the former don't use the Attention mechanism. Mamba is better at context window scaling than transformers but worse at explicit recall. Though that doesn't tell us how susceptible they are to context distractions.
- bachittle 1y agoAs of now it's not integrated into Claude Code. "We’re also exploring how to bring long context to other Claude products". I'm sure they already know about this issue and are trying to think of solutions before letting users incur more costs on their monthly plans.
- PickledJesus 1y agoSeems to be for me, I came to look at HN because I saw it was the default in CC
- novaleaf 1y agowhere do you see it in CC?
- PickledJesus 1y agoI got a notification when I opened it, indicating that the default had changed, and I can see it on /model. Only on a max (20x) account, not there on a Pro one.
- novaleaf 1y agothanks, FYI I'm on a max 20x also and I don't see it!
- tankenmate 1y agomaybe a staggered release?
- Wowfunhappy 1y agoI'm curious, what does it say on /model? For reference, my options are: ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ Select Model │ │ Switch between Claude models. Applies to this session and future Claude Code sessions. │ │ For custom model names, specify with --model. │ │ │ │ 1. Default (recommended) Opus 4.1 for up to 50% of usage limits, then use Sonnet 4 │ │ 2. Opus Opus 4.1 for complex tasks · Reaches usage limits faster │ │ 3. Sonnet Sonnet 4 for daily use │ │ 4. Opus Plan Mode Use Opus 4.1 in plan mode, Sonnet 4 otherwise │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯
- dbreunig 1y agoThe team at Chroma is currently looking into this and should have some figures.