Your team's real engineering record is the AI sessions you delete every day A developer argues that AI coding sessions from tools like Claude Code and Codex contain the richest engineering record—capturing the full decision-making process behind code changes—but these sessions are routinely deleted when tabs are closed. To preserve this valuable context, the developer created Klear-Team-Brain, an open-source tool that collects, pools, and makes searchable the team's AI sessions without requiring extra documentation effort. Your team's real engineering record isn't in your commit history. It's in the AI sessions everyone closes and forgets every day. A commit says "refactor auth." It doesn't tell you which two approaches you tried, which one broke, which doc settled the call, or why you rejected the obvious path. That "how we actually decided this" always got lost. It only ever lived in someone's head, never written down. That changed. Your team writes code with Claude Code and Codex now, and all of those judgment calls are, for the first time, recorded in full. They're in the session. And then the tab closes and they're gone. I've hit this myself more than once. I couldn't remember why a module was split the way it was, the commit and the PR said nothing, and I finally found the reasoning in one of my own sessions from months back. It only existed there, and it almost went with the tab. Worth being precise about, because it's the whole point. An AI session isn't a chat log. It's a transcript of a problem being solved: what got tried, what broke, which docs it read, the judgment in every turn. It's also pinned to the exact git repo you were working in. Put another way, a session is roughly all the context it took to do the thing, packed into one unit. That's a step up from commits and PRs. A commit is a lossy summary a human wrote afterward. A session is a recording of the work as it happened. We've never had this before. The catch: it lives in one person's local chat and dies when they close the tab. So your team is now producing the best engineering record it has ever had, and deleting it daily. Three concrete costs. Someone leaves, and the "how" leaves with them. Their replacement inherits the code, not the reasoning nobody kept. Bus factor was never about the hands. It was about the head. New hires can only read conclusions, not replay the process. A full session lets someone see how a thing was figured out, not just what it ended up looking like. Decision archaeology has nowhere to dig. Six months later someone asks "why did we build it this way," and the answer is either in the original record or in a meeting nobody remembers. Right now it's the meeting. And here's the part that matters most: keeping this record costs nobody any extra work. Knowledge bases always failed for one reason. They asked the busiest person to find time to write docs. Not this time. The best record is a byproduct of people just doing their work. The only thing you have to do is stop deleting it. The rest is an engineering problem: how to keep the team's sessions, pool them into one place, and make them searchable. Here's how. Trying it solo first takes about five minutes. The tool is open source, Apache-2.0, called Klear-Team-Brain https://github.com/Asklear/Klear-Team-Brain . Want to see the finished state first? The repo README has the same commands you're about to run. Node 22+, and an MCP-capable editor or CLI. Claude Code, Codex, Cursor, Cline, Gemini CLI all work the same way. You'll also want some existing Claude Code / Codex sessions to capture. If you've used either tool at all, they're already in ~/.claude and ~/.codex . After that, just a terminal. No database, no Docker unless you want it, no cloud account. Before reaching for a tool, picture doing it manually. Your sessions live as JSONL files in ~/.claude and ~/.codex , one file per conversation. If you've ever opened one you know the state of it: raw tool calls, base64 images, huge pasted blobs, all mashed together. To make any of it usable you'd pick out the relevant ones, scrub the secret you definitely pasted at some point we've all done it , and squash each into something readable. And that's just yours. For the team to benefit you'd gather everyone's, then build some way to search across all of it. By hand, for a whole team, forever. Nobody does this. That's why the best record keeps rotting on individual machines. I tried keeping just my own by hand once. Scrubbing the secrets I'd pasted out of each transcript was enough to make me quit. The rest of this makes it automatic and the result something you query in plain language: Let's build it. We'll run it solo on your own machine first. It's the fastest way to see the result, and nothing leaves your laptop. git clone https://github.com/Asklear/Klear-Team-Brain.git && cd Klear-Team-Brain npm install npm run quickstart quickstart is a one-time thing. It mints a local identity and token, points the client at localhost , and wires up MCP for you. What MCP is comes in step 4. The "truth store" is the git repo that holds your sessions. Start the server and leave it running: npm run server serves at http://127.0.0.1:8787 — leave this terminal open That's the whole backend: one git repo, one Node process, a static frontend. No database, no queue, no vector store. Queries run on git grep , so the server never calls an LLM, not once. The understanding happens in the agent inside your editor, not here. To confirm it's up, open http://127.0.0.1:8787/ . You'll get a dashboard. Empty for now. In a second terminal leave the server running in the first one , grab the AI sessions on your machine: npm run sync -- --once This walks your ~/.claude / ~/.codex history, squashes each session inline images stripped, oversized tool outputs truncated, signal not bytes , strips secrets and home-directory paths client-side before anything gets written, and commits each one into the truth store. Drop the --once and run npm run sync and it stays resident, capturing new sessions as they settle. Refresh the dashboard. Your sessions should be listed now. Back in step 1, quickstart quietly connected the truth store to Claude Code over MCP. Think of MCP as a USB-C port for AI apps: a standard way for an agent to plug into an external tool. Here the tool is your truth store. Don't take my word for it. Check: claude mcp list You should see team-brain listed and connected. To wire up a different editor Codex, Cursor, and so on , the MCP server is a plain stdio binary. Run brain mcp and it prints the exact command for your machine, which looks like: this is what quickstart registered; shown so you can add it to any other MCP client claude mcp add team-brain --scope user -- node /absolute/path/to/Klear-Team-Brain/mcp/server.mjs Use the absolute path brain mcp gives you, and restart the editor after adding it. This is the fun part. In Claude Code, just ask. No special syntax: Where did I leave the auth refactor, and what was still unresolved? The agent treats the truth store as a read-only folder and uses a few Unix-style tools to dig through it: | Tool | What it does | |---|---| grep | regex full-text search across sessions, via git grep | find | find files by name or glob | read | read any file by path | ls | inspect structure: spaces, branches, session counts | sessions | find sessions by person and work time | stats | aggregate token/session/turn counts by day/person/repo | log | the git activity timeline | read github | fetch live code state from GitHub/GitLab/Gitea on demand | So your one-line question becomes grep for "auth", read the sessions it hit, then synthesize. The answer cites the specific sessions it drew from, the dead ends and judgment calls that never made it into a commit message included. What's really changed is how the team works. Both of these normally mean finding the right person, hoping they remember, and taking half an hour of their day: Who's been touching the ETL code this week? How did we decide the billing schema, and what did we reject? Now they're a query. Worth being precise here, because it's the part that decides whether you'd hand it your team's work. It's read-only. Every server-side query goes through git grep , git ls-files , git log , or a plain file read, via execFile , no shell, locked inside the truth-store directory. The tools can read. They can't write, and they can't run arbitrary commands. The server never calls a model, not once. It just hands text to the agent in your editor, which does the reasoning. That's why it runs fine on a tiny VPS later. It isn't doing the heavy work. The data is a git repo. You can cd into it and read everything with normal tools. No proprietary format, no lock-in. If you walk away tomorrow, you still have a clean, redacted record of your team's thinking. Some honesty. It's not a chatbot and it's not a project manager. It aggregates the team's sessions, code, and docs and helps you understand them. It won't assign work, and it doesn't replace Slack. If you work solo and you have a good memory, you probably don't need it. The value grows with team size and time, not on a one-person weekend project. And it captures AI sessions, not your whole job. The reasoning you did in your head or settled in a meeting isn't in there. That said, the share you type to an AI keeps growing, which is the whole point. On data, to be clear: only directories you explicitly allowlist get uploaded. Secrets are redacted client-side before anything leaves your machine. You can run brain viewer to see exactly what was captured per session and retract anything you don't want shared. The whole thing is self-hosted, so when you take it to your team it lives on infrastructure only your circle can reach. If your team's sessions touch sensitive data, "read-only, self-hosted, redacted at the source" is the part that matters most. The solo run above is the real thing, scoped to one person. To turn it into the shared memory, you stand up the same server on one small VPS low memory is fine , and each teammate points their client at it: curl -fsSL https://your-server.example.com/get | bash installs the client + the brain command brain join