The memory layer for AI-generated code. Capture intent, trace execution, and get repair briefs so your agent stops guessing and starts fixing.
AI agents write code, but they don't remember why. When something breaks, they guess. You're stuck in a loop.
Codememory records what your code actually does at runtime — not just what the agent said. When something fails, the agent gets a repair brief instead of a blank slate.
The original prompt, target file, and a content hash are captured the moment code is generated. No more guessing what the agent was trying to do.
An observer instruments your functions and records actual inputs, outputs, and errors — linking every trace back to the intent that created it.
When something fails, Codememory fuses intent + runtime + failure + a suggested fix into a single brief. The agent edits informed, not speculative.
Most AI coding tools store conversation history. Codememory stores code behavior history — what actually happened when the code ran, why it broke, and which fix worked.
| Agent Memory | Codememory | |
|---|---|---|
| Stores | Conversation history | Code behavior history |
| Knows why code broke | — | ✓ |
| Runtime awareness | — | ✓ |
| Repair brief | — | ✓ intent + code + trace + fix |
| Works without workflow changes | ✓ | ✓ |
Each MCP tool captures a different dimension of code behavior, building a complete picture your agent can query.
Record the original prompt, target file, and a content hash the moment code is generated. Every piece of code knows why it exists.
Instrument functions to log actual inputs, outputs, and side effects. Every trace links back to its originating intent.
Capture the exact failure point, error message, and full stack trace. No more vague "something went wrong."
Search across intents, traces, and failures with semantic queries. Find related issues and prior fixes in milliseconds.
One call returns intent + runtime trace + failure details + a suggested fix approach. The agent edits informed, not speculative.
Install globally, initialize your project, and Codememory automatically captures intent when your agent writes code.
# Install globally npm install -g @opvoid/codememory # Initialize your project codememory init
Run codememory init in any project. It creates .mcp.json and CODEMEMORY.md — your agent auto-discovers the MCP server.
Reference Codememory in your CLAUDE.md or equivalent. Claude Code automatically captures intent when writing code and fetches repair briefs before fixing bugs.
Call hook.start() and local require() calls are automatically instrumented. For ESM, use the manual observer API: observer.observe(yourFunction, 'functionName').