failure-memory
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 mistakes worth remembering.
It exists because not every correction is a failure. A user may be adding a new requirement, clarifying missing information, or changing a preference. Saving all of those as “lessons” creates noisy memory and makes the agent less reliable.
Failure Memory records only durable lessons from real failures, recalls them before similar work, and learns whether each recall was useful.
Why use it?
Without a deliberate failure-memory system, agents tend to:
repeat mistakes across sessions and tools;
treat requirement changes as failures;
save several copies of the same lesson;
recall loosely related advice without measuring whether it helped.
Failure Memory adds two review gates:
Failure qualification — was there an established expectation, an observable mismatch, meaningful impact or recurrence risk, a controllable cause, and a durable prevention lesson?
Generalization review — should the incident reuse an existing lesson, support a broader version of one, or remain distinct?
Similarity search suggests at most three related lessons. It never merges or promotes a lesson automatically.
Related MCP server: ContextEngine
Supported agents
Agent or harness | Support | Installation |
OpenAI Codex | Plugin, skills, hooks, and MCP tools | Public GitHub marketplace |
Claude Code | Plugin, skills, hooks, and MCP tools | Public GitHub marketplace |
GitHub Copilot CLI | Plugin, skills, hooks, and MCP tools | Public GitHub marketplace |
Cursor | Plugin, skills, hooks, and MCP tools | Local plugin or team marketplace |
Other MCP clients | Core MCP tools | Configure the bundled stdio server manually |
All supported harnesses use the same memory for the current OS user. Installing the plugin in a second agent does not create a second database.
Install
Requirements
Python 3.13 or newer; Python 3.14 is recommended
Git
Check Python before installing:
python3 --versionCodex
codex plugin marketplace add CongBao/failure-memory
codex plugin add failure-memory@failure-memoryStart a new Codex task after installation so the skills, hooks, and MCP server are loaded.
Claude Code
claude plugin marketplace add CongBao/failure-memory
claude plugin install failure-memory@failure-memoryRun /reload-plugins in an active Claude Code session, or start a new session.
GitHub Copilot CLI
copilot plugin install CongBao/failure-memoryThis direct GitHub installation uses the repository's Copilot plugin manifest. The repository can also be added as a Copilot marketplace for browsing and managed updates. Start a new Copilot CLI session after installation.
Cursor
Failure Memory includes a Cursor plugin projection. Until it is listed in the public Cursor Marketplace, install it as a local plugin:
git clone https://github.com/CongBao/failure-memory.git
mkdir -p ~/.cursor/plugins/local
ln -s "$PWD/failure-memory" ~/.cursor/plugins/local/failure-memoryRestart Cursor or run Developer: Reload Window. Teams and Enterprise users can also import this repository from Dashboard → Plugins → Add Marketplace.
How to use it
Failure Memory provides two agent skills:
Recall failure lessons before risky, repeated, or failure-prone work.
Record an agent failure after a real mismatch has been confirmed.
You can ask naturally; you do not need to call database tools yourself.
1. Recall lessons before work
Example prompts:
Before changing this installer, recall any relevant failure lessons.Check Failure Memory for lessons about plugin identity and duplicate installs.Recall is exact-first, then similarity-based. Results come from the global personal store, even when another supported agent recorded the lesson.
2. Evaluate a possible failure
After something goes wrong, ask the agent to evaluate it:
Evaluate whether this was a real failure. Do not record it if I only changed or
clarified the requirement.The evaluation distinguishes:
real failures;
requirement updates;
requirement clarifications;
preference updates;
mixed or uncertain feedback.
Rejected and deferred evaluations remain auditable, but they do not become incidents or lessons.
3. Review and record the lesson
If the evaluation is accepted, ask the agent to complete the second review:
Review this accepted failure against existing lessons. Reuse an exact match, propose a
carefully generalized lesson when justified, or keep it distinct.Then explicitly approve recording:
Record the reviewed failure and proposed prevention lesson.The plugin stores immutable incidents and versioned lessons. Existing history is preserved rather than overwritten.
4. Give feedback on recalled lessons
Recall feedback is important because it tells the memory which lessons actually help:
That recalled lesson was useful and prevented the same failure. Record the outcome.That lesson was a false positive for this task. Record that outcome.Failure Memory stores append-only recall attempts, candidates, selections, outcomes, false positives, and missed-relevant feedback. It does not store raw recall prompts.
5. Check health and learning metrics
Example prompts:
Check Failure Memory health and retrieval status.Show recall feedback coverage, usefulness, false-positive, and missed-relevant metrics.Search modes
Exact signature and SQLite FTS5 lexical search work without third-party dependencies.
Optional semantic search uses local sqlite-vec and FastEmbed, and hybrid search fuses
lexical and vector rankings.
Semantic dependencies and the embedding model are installed only after explicit approval:
uv run failure-memory adapters plan
uv run failure-memory adapters install
uv run failure-memory index buildLocal data and privacy
Failure Memory is local-first. It does not require a hosted database or cloud account. The default global data root is:
macOS:
~/Library/Application Support/failure-memoryLinux:
${XDG_DATA_HOME:-~/.local/share}/failure-memoryWindows:
%LOCALAPPDATA%\FailureMemory
Back up the event-store database; indexes, models, and adapter environments can be rebuilt. Recognized credentials and private keys are redacted, but do not submit secrets, personal data, raw transcripts, or unnecessary private paths.
See CONTRIBUTING.md to contribute and SECURITY.md to report a vulnerability.
License
This server cannot be installed
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.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
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