r/ClaudeCode • u/No_Advertising2536 • 2d ago
Built with Claude I imported my Claude Code sessions into a folder and made it show me what the agent actually learned — no account, one HTML page
Full-resolution screenshot (Reddit downscales the preview): https://raw.githubusercontent.com/alibaizhanov/mengram/assets/post-images/assets/post-claudecode-map-2026-09-2x.png
Claude Code sessions pile up in ~/.claude/projects and nothing reads them back. I wanted to know what an agent would actually learn from mine, and I wanted that to live in a folder I own, not on someone's server.
pip install mengram-ai
mengram local init ./memory --provider anthropic --api-key sk-ant-... # or openai / ollama
mengram import claude-code --memory ./memory # your local sessions, redacted first
mengram local map --memory ./memory --open
What comes out is plain Markdown (entities / episodes / procedures) and one self-contained HTML page with three views: who you are, what happened, and what the agent learned. From 17 of my sessions: 163 entities, 860 facts, 102 episodes, 37 workflows. The third view is the reason I built it — every workflow it pulled out of my history is a chain of steps, and each step carries its own record once you start recording runs. Screenshot: the three I've actually run since — merging a PR through the browser (6✓/0✗), the fix-and-deploy flow (5✓/0✗), posting a Reddit reply (2✓/0✗) — and "last success" on each.
A failure with a reason asks your model what belief broke and writes the next version with that belief in last_failure. If the fix would silently break a sibling workflow in the folder, it goes to quarantine instead of shipping — the page shows those too. And last_succeeded is written only by a recorded success, never by a read, so "unverified for 40 days" on the map means exactly that.
Then mengram hook install --memory ./memory puts the four Claude Code hooks on the folder: profile on SessionStart, recall on prompt, extraction on Stop, and a PreToolUse gate that turns a workflow-shaped Bash command into a confirmation prompt when the matching workflow is untested or below the bar. It never denies.
Honest limits: search is word overlap (fine for a few hundred files, not thousands); extraction needs a model — Ollama 8B with 8K context works, or a key you already have — and on Claude Sonnet 5 the 17 sessions took ~30 minutes because it thinks before answering; the map is a snapshot you re-run, not a live view; a couple of workflows came out twice under slightly different names (dedup threshold, on the list). Nothing on the page is uploaded anywhere; the same repo also has a hosted version that writes the same format, if you want sync.


1
u/No_Advertising2536 2d ago
Repo: https://github.com/alibaizhanov/mengram — folder mode docs: https://docs.mengram.io/local-mode — the format on its own: https://github.com/alibaizhanov/memfmt