Now available as an MCP server

AI wrote your code.
Now it knows what happened.

The memory layer for AI-generated code. Capture intent, trace execution, and get repair briefs so your agent stops guessing and starts fixing.

Discover

Generate. Break. Guess. Repeat.

AI agents write code, but they don't remember why. When something breaks, they guess. You're stuck in a loop.

Generate Code
Something Breaks
Agent Guesses
Regenerate
This is the loop. Codememory breaks it.

Behavioral memory, not chat history.

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.

capture_intent
Prompt + file + content hash
record_runtime
Inputs, outputs, side effects
log_failure
Exact failure point + stack trace
get_repair_brief
Intent + trace + fix approach

Intent-aware context

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.

Runtime traces

An observer instruments your functions and records actual inputs, outputs, and errors — linking every trace back to the intent that created it.

Repair briefs

When something fails, Codememory fuses intent + runtime + failure + a suggested fix into a single brief. The agent edits informed, not speculative.

Beyond agent memory.

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

Five tools. One memory layer.

Each MCP tool captures a different dimension of code behavior, building a complete picture your agent can query.

capture_intent

Capture Intent

Record the original prompt, target file, and a content hash the moment code is generated. Every piece of code knows why it exists.

record_runtime

Record Runtime

Instrument functions to log actual inputs, outputs, and side effects. Every trace links back to its originating intent.

log_failure

Log Failures

Capture the exact failure point, error message, and full stack trace. No more vague "something went wrong."

query_memory

Query Memory

Search across intents, traces, and failures with semantic queries. Find related issues and prior fixes in milliseconds.

get_repair_brief

Repair Brief

One call returns intent + runtime trace + failure details + a suggested fix approach. The agent edits informed, not speculative.

Two commands. Instant memory.

Install globally, initialize your project, and Codememory automatically captures intent when your agent writes code.

TERMINAL
# Install globally
npm install -g @opvoid/codememory

# Initialize your project
codememory init
1

Initialize your project

Run codememory init in any project. It creates .mcp.json and CODEMEMORY.md — your agent auto-discovers the MCP server.

2

Add to your agent config

Reference Codememory in your CLAUDE.md or equivalent. Claude Code automatically captures intent when writing code and fetches repair briefs before fixing bugs.

3

For CJS: auto-instrument

Call hook.start() and local require() calls are automatically instrumented. For ESM, use the manual observer API: observer.observe(yourFunction, 'functionName').