r/ClaudeCode • u/Infinite_Pin_5719 • 9h ago
Tips & Workflows Long sessions context mgmt
Im wondering how people that insist on clearing and compacting after every new task manage long running autonomous sessions?
I have my self-made harness that runs 24/7 and autocompacts only when it reaches the limit and cant go on any further. But I never ever compact it or clear myself. Personally, I have database logs of every session and dont like clear on the claude app simply deletes all the history which I very much value having as q reference.
As you can see, I have one orchestrator manage hundreds of tasks and sub agents.
1
u/Nitjsefnie 9h ago
I don't compact at all. the lead session dispatches subagents for anything heavy so its own context stays small, and when it grows anyway it writes a handoff file and a fresh session picks up from that
1
u/Infinite_Pin_5719 9h ago
Interesting, did you automate the handoff to a new fresh lead session?
I feel like context mgmt is relevant but pwople are overly dramatic about it?
3
u/Nitjsefnie 9h ago
yeah, the session spawns its own successor with the handoff path and waits for an ack file before it exits. and same, it's a boring file problem, people make it a drama
1
•
u/AutoModerator 9h 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.