failure-memory
The Failure Memory server provides AI coding agents with a local, private memory of verified failures, enabling them to record lessons from real mistakes and recall them before similar work. Key capabilities include:
Record failures (
remember_failure): Qualifies and stores a failure with full context: classifies feedback (real failure, requirement update, clarification, etc.), captures the violated expectation and its source, observed outcome and impact, root cause (architectural layer, failure mode, component, evidence, recommended change, verification), and proposes a lesson (rule, prevention, verification). Deduplicates against existing lessons.Recall failure lessons (
recall_failure_lessons): Retrieves up to three relevant lessons using multiple modes (auto, exact, lexical via FTS5, semantic via vectors, hybrid). Supports filtering by free-text, expected invariant, cause, prevention, component, layer, mode, etc. Appends a privacy-preserving trace.Distinguish failure types to avoid polluting memory with non-failures.
Advanced search with exact, full-text (SQLite FTS5), vector, and hybrid ranking.
Optional model-based semantic search for multilingual support.
Local and private storage of all data and indices.
Maintenance commands for health checks (
doctor), metrics, store status, and feedback management.
Provides failure memory capabilities for GitHub Copilot CLI, allowing agents to store and retrieve failure lessons to avoid repeating mistakes.
Provides failure memory capabilities for OpenAI Codex, allowing agents to record and recall failure lessons to improve reliability across tasks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@failure-memoryRecall relevant failure lessons before refactoring."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Failure Memory
Failure Memory gives AI coding agents a shared, local memory of verified failures. It helps agents avoid repeating a mistake without treating every correction, preference, or newly supplied requirement as a failure.
It can:
distinguish real failures from requirement changes, clarifications, and preferences;
record the root cause, recommended repair location, and durable prevention lesson;
reuse an exact existing lesson instead of creating duplicates;
surface related lessons for review without silently merging or deleting history;
recall up to three relevant lessons before similar work;
retain recall and outcome history for metrics and future improvement.
Supported agents
Agent | Integration |
OpenAI Codex | Plugin, record/recall skills, and prompt hooks |
Claude Code | Plugin, record/recall skills, and prompt hooks |
GitHub Copilot CLI | Plugin, record/recall skills, and prompt hooks |
GitHub Copilot Chat in VS Code | Record/recall skills |
Cursor | Plugin, record/recall skills, and session hook |
Other agents | The two skills plus the local |
All integrations use the same store for the current OS user. Installing Failure Memory in another supported agent does not create another memory database.
Related MCP server: ContextEngine
Install
Failure Memory is a native executable. It does not require Python, Node.js, or a local database server.
1. Install the runtime
macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/CongBao/failure-memory/main/scripts/install.sh | shWindows PowerShell:
irm https://raw.githubusercontent.com/CongBao/failure-memory/main/scripts/install.ps1 | iexThe installer downloads the correct release for your platform, verifies its checksum,
and installs the failure-memory executable in your local binary directory.
2. Install the plugin
Codex:
codex plugin marketplace add CongBao/failure-memory
codex plugin add failure-memory@failure-memoryClaude Code:
claude plugin marketplace add CongBao/failure-memory
claude plugin install failure-memory@failure-memoryGitHub Copilot CLI:
copilot plugin install CongBao/failure-memoryCursor:
/add-plugin CongBao/failure-memoryFor another agent, copy skills/record-agent-failure and
skills/recall-failure-lessons into its skills directory. Applications that accept an
MCP server command can register:
failure-memory mcp --stdioRestart an agent that was already open, then verify the installation:
failure-memory install status
failure-memory doctorUse
Use Failure Memory through natural prompts. The skills perform one bounded operation and do not interrupt ordinary work when no useful memory action is needed.
Recall lessons before risky or recurring work
Before changing this migration workflow, recall relevant failure lessons.A recall needs a short task description plus something concrete, such as the component, expected invariant, suspected cause, or prevention action. It returns at most three lessons. Treat recalled lessons as cautions to validate against the current task, not as instructions that override current requirements.
Record a real failure
The migration changed persisted data without the required compatibility check. Find the
root cause and remember a lesson that prevents this from recurring.Failure Memory first checks whether the feedback describes a genuine failure:
Did an expectation or invariant exist before the outcome?
Is there an inspectable mismatch and meaningful impact or recurrence risk?
Is there an evidenced, controllable cause?
Can a concrete prevention and verification step be stated?
If the evidence is insufficient, the case is stored only as a qualification attempt and does not become a lesson. This makes false-positive rates measurable without polluting future recall.
If feedback mixes an old failure with a new requirement, only the old-invariant mismatch can enter memory. The new requirement remains normal work.
Match against existing lessons
Before adding a lesson, Failure Memory checks the existing store:
an exact match reuses the existing lesson;
a related case remains separate and may produce a generalization proposal for review;
history is not silently merged or deleted.
Run a recall from the command line
printf '%s' '{"text":"schema migration","component":"migration workflow"}' \
| failure-memory recallThe command reads one JSON object from standard input and returns one JSON object. Run
failure-memory without arguments to see all available commands.
Search
Failure Memory supports:
exact lookup;
SQLite FTS5 full-text search, including CJK bigrams;
local sqlite-vec vector search;
hybrid ranking across exact, full-text, and vector results.
Exact and full-text recall work immediately. A deterministic local vector index supports hybrid ranking without a model download. To enable model-based multilingual semantic search, install the pinned model once and rebuild the derived index:
failure-memory adapters install
failure-memory index buildModels are never downloaded during a record or recall operation.
Maintenance
Useful commands:
failure-memory doctor
failure-memory metrics
failure-memory store-status
failure-memory cluster propose
failure-memory feedback recall
failure-memory feedback repairClustering and feedback commands append proposals or observations. They do not delete, silently merge, or automatically promote lessons.
Local data and privacy
The append-only event store, retrieval index, optional model, and installation receipt live in one owner-private directory:
macOS:
~/Library/Application Support/failure-memoryLinux:
${XDG_DATA_HOME:-~/.local/share}/failure-memoryWindows:
%LOCALAPPDATA%\FailureMemory
Back up the event-store database; derived indexes can be rebuilt. Submit only compact evidence. Do not store raw prompts, full transcripts, credentials, or unnecessary personal information.
Development
See CONTRIBUTING.md. Report security issues according to SECURITY.md.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenancePersistent Memory for AI Coding Agents #1 Ranked on LongMemEvalLast updated192Apache 2.0

ContextEngineofficial
AlicenseAqualityAmaintenancePersistent memory and mechanical enforcement for AI coding agents — so they stop repeating your mistakes.Last updated21373Business Source 1.1- Alicense-qualityAmaintenanceA persistent, local memory layer for AI coding agents that remembers decisions, bugs, and rules across sessions with three core MCP verbs (recall, remember, search).Last updatedApache 2.0
- Alicense-qualityDmaintenanceShared team memory for AI coding agents with Bayesian confidence scoring and temporal decay, enabling persistent storage and retrieval of engineering patterns across sessions.Last updated1111MIT
Related MCP Connectors
Shared debugging memory for AI coding agents
Collective memory for AI agents. One agent solves a bug — every agent gets the fix instantly.
Experience memory for coding agents: validated traps, fixes and dead-ends at decision time.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CongBao/failure-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server