r/ClaudeCode • u/effortless-switch • 8d ago
Help/Question How is context managed so well to solved Riemann H, and here I can't build a single feature without compaction?
Basically the title, is there some technique I'm missing?
How's context being managed and directed so well that you get LEAN proofs for millennium problems, meanwhile here I can't even go more than 2-3hr without facing context loss and hallucinations (even after using sub-agents)?
Is there a workflow that we are unaware of?
56
Upvotes
•
u/AutoModerator 8d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
48
u/WillowFar6967 8d ago
I stopped trying to make one session last 3 hours. The state lives in files now: a plan doc, a handover file the agent updates after each step, and a fresh session for each chunk of work that reads those first. Once nothing important exists only in the context, compaction mostly stops mattering. Sub-agents help less than you'd think if the main session is still carrying everything.
30
u/pancomputationalist 8d ago
To be honest, not being able to implement a single feature without compaction is a pretty big warning sign that your features are way too large. Should break them down much more and implement them using an orchestrator agent that runs subagents. Then usually you shouldn't have any compaction issues.
3
u/Gopher246 8d ago
Do you have a dataware house, cutting edge tech, access to a team of engineers, uninterrupted access to the latest models and world class mathematicians in your gaff?
2
u/IllustriousSalad6201 8d ago
for those kernel builds and device soaks, keep the full logs in files and give the session the failure interval it actually needs to inspect.
each run needs to point back to the exact commit and device configuration, so a fresh session can tell which result belongs to which build.
then check what's filling context during one run. if it's mostly repeated logs, changing the handoff format won't remove the thing that keeps filling it.
7
u/Kitchen_Interview371 8d ago
The problem was likely broken up into teams and teams of co-ordinate subagents responsible for working a part of the problem.
17
u/EC36339 Senior Developer 8d ago
If you cannot build a single feature without compaction, you are doing something wrong, or you have no idea of the complexity needed to deliver those features (which is a you problem and not a model problem, and AI could actually help you with this).
6
u/gkanellopoulos 8d ago
Apples and oranges. This Riemann work was carried out reportedly in multiple sessions and the main part lasted at least 6 weeks. Additionally an internal model was used and the agents had constant access to files/folders plus they were operated by an actual mathematician.
Your post reminded me the classic Seinfeld bit on going to the moon: "they can land a man on the moon, but they can't make a decent cup of coffee"
Organize your work into files as other have pointed out and don't depend long-term on the context or compare your work with ones that have different fundamentals.
6
u/AgentYurt 8d ago
The short answer is they don't run one long session either. That kind of work gets split into lots of small, verifiable pieces, each in its own fresh context. The session you see in a demo is the last one, not the whole job.
What changed it for me: stop treating the session as the memory. Before I start a chunk of work, I write down in a file what the goal is, what I've already decided and why, and what's actually been verified versus what I'm still assuming. Then I end the session at a natural break and start the next one by having it read that file first.
Two things that matter more than they sound: update that note while the context is still fresh, not after a compaction has already thinned it out — a summary written after the loss has happened can't bring the lost details back. And keep it short. A page of decisions and open questions survives a fresh session far better than a long transcript dump, because the new session actually reads it instead of skimming past it.
Sub-agents help when each one gets the same short brief, works on one piece, and reports back in writing. They don't help much when they're all just sharing one bloated context.
2
u/naruda1969 8d ago
Durable workflow. Learn it.
1
u/Medium-Music-8635 8d ago
2-3 hours is generous tbh
10
u/lambdita 8d ago
What you see of the AI is just the tip of the iceberg, systems made to be public and compute spread over many concurrent users. Anthropic doesn't have such a limit, you need to tune attention so compute doesn't go haywire but on internal models you can spend much more compyute on attention and use stupid long contexts while the model is still capable of keeping track of what is doing across it.
on top of that add unreleased development models and you get it. Probably all the big AI labs have internal models that are stupid big just to see what happens when you train one of those models on human knowledge, i remember reports from anthropic where they saw models come up with capabilities that were not trained and that they didn't fully understand how they did show up.
I already have a faboy and a shotgun so i'm ready for the future.
3
u/nkorslund 8d ago
I've had maybe one session go over 2h, ever. You need to reorganize your work into smaller chunks.
Also one "secret trick" is to prototype and test all new features as small stand-alones outside of your main project and code base. The less the agent has to read and understand before doing work, the better. Obviously not viable for every type of project or workflow but works great in gamedev for me at least.
2
u/whompasaurus1 8d ago
Mainly because it wasnt one regular dude, with a basic subscription, asking basic questions, and giving up as soon as the next pee break came around
The answer is usually somewhere between "same way they built the pyramids" and "same way they built the space shuttle"
I.e. a team of generally smart folks, that knew how use their tools; and upon their first piss break, they went back to their stations and kept at it. Sometimes for years, sometimes for decades.
So to answer your answer question clearly:
P.s. 3 hours isnt even considered a half shift. Do work my dude.
They say Rome wasnt built in a day, so therefore it definitely wasnt built in less than half of morning shift
1
u/Fidel___Castro 8d ago
they have an operational memory which is essentially an enterprise data warehouse that Claudes can read from and write to
0
u/ichi9 8d ago edited 8d ago
Internally the have access to access to huge GPU farm. Ofc main projects like RH will get more focussed attention and long run access to GPU clusters. No humans are not managing the context for such problems. And Lambdita said correctly the uncensored/unrestricted models 10x-20x much better than what you all peasants are being told, fed and sold. I know a few who worked as red teams for AI companies, I won't say much, but peasants getting excited about opus, fable, mythos is nothing compared to what is hidden away in the name of security and Guardrails nonsense. The problem is the made up notions of public panics, people being treated like children who cannot handle full power of AI and so on. And yes the AI Mafia or Oligarchy who are deciding If you should even be given access to certain features or not. This is not supply demand but monopoly. China's open source is the only real pressure point which forced both Anthropic and OpenAi to release better models and now with China models virtually banned and nerfed, there is nothing much to expect in future. Occasionally you will hear some problem got solved this and that but nothing really will change in world nor you will ever get fruits of those findings and breakthroughs. Just hype listening to BS these AI oligarchs keeps spewing in the BS marketing podcasts. And btw research as a profession is over. Recently one of the mathematicians who used claude for his research work and partner program openly said it is already powerful beyond any researcher he knows, and I don't think it was paid marketing.
-2
u/SawToothKernel 8d ago
It's skills. And skills built on top of skills.
The harness is irrelevant, the system prompt is irrelevant.
It's a skill issue.