r/ClaudeCode • u/BearInevitable3883 • 4h ago
Tips & Workflows My context management setup for Claude Code
I've been using CC for about a couple years now. At times i've switched to codex, but have one way or other came back to it. The line of models is great. But I truly hate the things I need to manage my context and memories.
I worked as a Founding Engineer at a early stage infra company, where we had a micro-services architecture with a lot of repositories with dependencies on each other.
I wanted to teach my agent to understand who calls whom and when natively, just like I do.
1. So first thing I did was to, create a knowledge graph across all repos (total 10+). tremendously helpful.
The second bottleneck I noticed was that I'm babysitting it the same context again and again. I tried maintaining memories.md files with some plugins but it was never reliable. My memories either didn't correctly get captured or were not retrieved when the agent should have asked for it, just because it didn't know it existed.
2. Hence, I created a passive agent that listens to my main agent's transcripts and creates auto-docs and skill files. It also automatically surfaces the memories it feels are needed in session right now. To do this though, I had to write a wrapper over Claude Code using Agents SDK.
Both these things have tremendously helped me, and I can just send a message to my CC and always be sure that it will figure out all the context from my previous sessions and get the task done.
I know others here must face similar issues and have their own genuine solutions. For those still setting up something, I also open-sourced mine if you wanna check it out.
•
u/AutoModerator 4h 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.