Hover any function to see why it exists
Decision archaeology reads git history and your captured sessions, then shows the branches you tried, the approach you dropped, and the commit that settled it.
Memory for VS Code and MCP agents
SecondCortex records what you open, run, and decide in VS Code, strips secrets on your machine, and turns it into memory any MCP agent can query. Ask why the retry limit dropped to 3 and get the branch, the commit, and the reason.
> search_memory("retry limit")
{
"file": "processor.ts",
"branch": "feat/payment-v2",
"decision": "retry 5 → 3",
"why": "backoff storm at load",
"evidence": ["a3f4b2c"]
}Free and MIT licensed
Backed by
[01]The problem
The reason behind a line of code lives in a closed tab, a cleared terminal, or a teammate on leave. So you paste context into chat again, and the agent still guesses.
Before: explain the codebase again at the start of every chat
Before: git blame tells you who changed it, never why
Before: incident triage across three tools and 40 minutes
After: agents call search_memory and get the decision
After: every function carries its branches and reasoning
After: the incident timeline rebuilds itself in 30 seconds
[02]Features
Five things SecondCortex does with the context it captures. All of them read from the same memory.
Decision archaeology reads git history and your captured sessions, then shows the branches you tried, the approach you dropped, and the commit that settled it.
API keys, JWTs, bearer tokens, and private keys are stripped inside the extension before a snapshot is stored.
Files, terminal, and git state come back after you approve the plan. A simulator checks for unstashed changes and conflicts first.
A team timeline of edits, commits, deploys, and alerts replaces 40 minutes of digging across three tools.
Claude Code, Cursor, and Copilot call search_memory and get_function_context directly, scoped to your project.
Your code already knows why it looks this way. Now you and your agents never forget it.
[03]How it works
Capture and scrubbing run inside the extension, so secrets are gone before anything is stored.
The extension snapshots open files, terminal commands, git state, and diagnostics, debounced so you keep decisions, not keystrokes.
eventCapture.tsThe semantic firewall strips secrets on your machine. Clean snapshots are embedded and written to per user memory.
semanticFirewall.tsAsk in VS Code or from any MCP agent. The retriever ranks your history and your team's by meaning and returns the decision with its evidence.
retriever.pyWorks with Claude Code · Cursor · GitHub Copilot · Codex · PicoClaw
[04]Live demo
This demo runs on five sample memories from a two person team. Click a memory or ask a question in plain English.
retriever · awaiting query
Click a memory on the left or ask a question. Answers come from personal and team memory, with the evidence attached.
[05]Proof
[06]FAQ
Open files, the active file, terminal commands, git branch and diff state, code comments, diagnostics, and function signatures. Snapshots are debounced, so you get a history of decisions rather than a keystroke log.
The semantic firewall runs inside the extension and strips API keys, JWTs, bearer tokens, and private keys before anything is stored. If you want zero network calls, run the fully local stack with ChromaDB and Ollama from the offline setup guide.
Any MCP client. Claude Code, Cursor, GitHub Copilot, and Codex connect to the SecondCortex MCP server and call tools such as search_memory and get_function_context.
Git records what changed. SecondCortex also keeps what surrounded the change: the files you had open, the commands you ran, the branches you tried and abandoned, and the comments you wrote while deciding.
No. A restore starts as a plan you approve. Before anything runs, the simulator checks for unstashed changes, branch conflicts, and running processes, and it blocks the restore if a risk is unresolved.
Yes. The offline setup guide runs storage on ChromaDB and models on Ollama, both on your machine, with no cloud dependency. Read the offline setup guide →
Nothing. The extension is free on the VS Code Marketplace and the source is MIT licensed on GitHub. View the source on GitHub →
Team Cortex shares decisions across developers with team scoped isolation. The hosted team backend is offline while we rebuild it, and you can self host the backend from the repository today.
Install the extension and SecondCortex starts building memory from your next session.
Install free for VS Code ↗