Original Reddit post

The biggest productivity killer in Claude Code isn’t token cost — it’s the cold start. Every new session, Claude rediscovers the same codebase, re-reads the same files, re-learns the same gotchas you already explained yesterday. I wanted to fix this without changing how I work — no manual note-taking, no markdown files to maintain. So I built a passive memory layer that sits alongside Claude Code as an MCP server. How it works: It observes every tool call and file change in the background. When code is modified, it computes AST-level diffs — not just “file changed” but which functions were added, removed, renamed, or had their signature changed. It correlates tool calls with file changes in a 2-minute window and auto-generates observations linked to the dependency graph. The key design choice: memories are linked to specific code symbols, not just files. When you refactor validateToken next week, any observations linked to that symbol get flagged as stale automatically. No outdated context silently polluting your sessions. What this looks like in practice: Session 1 (Monday): You fix an auth bug. Claude explores the auth module, you explain that the JWT validation has a quirk with expired tokens. The memory system captures this passively — no manual save needed. Session 2 (Wednesday): You ask Claude to add a new endpoint that needs auth. Monday’s observation auto-surfaces: “JWT validation quirk with expired tokens” appears in the context. Claude skips re-exploring the auth module. Session 3 (Friday): Someone refactored validateToken and renamed it. The Monday observation is now marked [STALE] — Claude sees it but knows the code has changed since. The search uses 5 signals: FTS5 BM25 keyword match (35%) TF-IDF cosine similarity (25%) Recency decay with 7-day half-life (20%) Dependency graph proximity (15%) Staleness penalty (-30%) Every result includes a why field explaining how it was ranked. No black box. This is part of vexp , the context engine I’ve been posting about ( benchmark results , PreToolUse hook pattern). The memory system is in the free tier — it starts accumulating from the first session. Disclosure: I’m the developer of vexp. It’s a context engine + session memory MCP server. Free tier includes the full memory system (2K nodes, 1 repo, no time limit). Pro is $19/mo (50K nodes, 3 repos). The memory features described in this post are all in the free tier. Curious if anyone else has tried solving cross-session context — what approaches have you used? submitted by /u/Objective_Law2034

Originally posted by u/Objective_Law2034 on r/ClaudeCode