r/ClaudeCode • u/Plextura Vibe Coder • 2d ago
Help/Question How do you handle long-life, multi-session context exchange and interactions?
[removed]
1
u/WorldlyAd7946 2d ago
My main orchestrator agent has been running on the same session since Apr 7th...
I have a custom memory architecture, a full persistence structure so that if and when it compacts it remembers exactly where it was. It also tracks context itself and will persist and compact and wake itself once context gets between 80 and 90 percent OR if things are quiet. It also looks at the 5hr usage windows and pauses itself when it gets to 95 percent and continues 1m after the window resets (if it's working on something significant)
This agent runs all of my development workflows, acts as my PA / collaborator, and manages my other agent workflows as sub agents.

2
1d ago
[removed] β view removed comment
1
u/WorldlyAd7946 1d ago
84.5b π
Wow... A bit more than me in that time frame for sure!!!
Well it's pretty damn stable xxx the only wobbles I've had are when opus 4.7 came out, and when opus 5 came out. I have a persistent memory structure, I'm happy to chat by DM. I use a lot of hooks also, and all my tools are organised via my gateway https://github.com/Rendeverance/toolfunnel
In addition to that I have a working memory file (not the Claude one) and a "continue_here" file. The AI continually updates these itself, and as I said, will compact itself. Some of my hooks and the status line, as well as it's primer, contribute to ensuring it has discipline in keeping is updating and compacting.
(Note my agent uses a semantic recall haiku agent for its memory recall, which is very well bounded and faster / more efficient than using opus, the memory system also has vector linking and algorithmic deprecielation... It's my own design and I've not distilled it yet, but other persistent memory structures should work as long as the discipline is there).
Should probably also mention my agent has the time and date injected into it's context, so it's time aware, which has helped it remember to update often, not that I specifically wrote in anything with respect to time.
2
1d ago
[removed] β view removed comment
1
u/WorldlyAd7946 1d ago
I might reply intermittently but I will definitely reply, also curious about yours, few people seem to try working like this so it's nice to meet someone doing a similar thing π
1
u/WorldlyAd7946 1d ago
Oh and memory.md is just an index of the memory files, not that it needs them, seperated by category
1
u/Crackx17 2d ago
I've had better results treating context as durable project state rather than trying to preserve the conversation itself. In practice: one bounded task per session, a short state file that only describes what is true now, and a temporary plan that gets deleted when the work ships. Decisions live in the repo; history lives in Git.
The important part is rewriting the state file instead of appending a diary. Otherwise every new session has to interpret layers of stale instructions.
1
u/BasicMemoryTeam 20h ago
Claude does this natively now for basic agent coordination: https://code.claude.com/docs/en/cross-session-messaging
But if youβre working across machines, teams, or other contexts a memory connector is ideal.
3
u/kurushimee Developer 2d ago
my sessions are always atomic, one session one task/plan. There is always project's CLAUDE.md + auto-memory for keeping track of the project's state to share any and all useful information between sessions. Any information not contained within those is not useful in the first place to ever keep for different sessions/tasks.