Persistent Memory for AI Coding Agents
The missing piece in AI-assisted software development: Give AI agents durable memory of why changes were made.
npm install -g context-stash
Context survives sessions, models, and tools. No more starting from scratch.
One decision can explain changes in multiple filesβjust like humans think.
Plain Markdown files that anyone can read, audit, and edit.
Historical reasoning stays accurate. Create new entries instead of editing old ones.
Works with any MCP-compatible AI agent: Claude, Copilot, Cursor, and more.
Version control for both code and reasoning. Track decisions over time.
cd /path/to/your/project context-stash --init
{
"mcpServers": {
"context-stash": {
"command": "context-stash",
"args": ["--serve"],
"cwd": "/path/to/your/project"
}
}
}
// AI creates context when making changes
context.create({
markdown: "## Fix: Race Condition\n\nAdded mutex lock..."
})
// Returns: { "file": "00012.md" }
// AI references it in code
// refer to context 00012
function updateBalance() { ... }
What broke, why it broke, and how you fixed it
Why you chose approach A over approach B
Why the "proper" solution wasn't feasible
What assumptions changed and why
What limitations influenced the design
What the code is trying to accomplish