
Give Claude Code Real, Persistent Memory
CognitiveX gives Claude Code persistent, hosted memory that survives every session, machine, and /compact. It installs as an MCP server exposing mcp__icog__remember and mcp__icog__recall, so Claude Code can save a decision once and recall it by meaning later, no 200-line cap, no per-repo silo, no rewriting CLAUDE.md by hand.
What Claude Code remembers natively, and where it breaks
Claude Code ships two memory mechanisms, and both are documented as best-effort, not guarantees:
CLAUDE.md, rules you hand-write. Anthropic's own docs call this "context, not enforced configuration" with "no guarantee of strict compliance."- Auto memory, notes Claude writes for itself, stored at
~/.claude/projects/<project>/memory/.
Three structural limits make this fall short the moment a project gets real:
- It silently stops loading. Per the official docs, only "the first 200 lines of
MEMORY.md, or the first 25KB, whichever comes first, are loaded at the start of every conversation. Content beyond that threshold is not loaded at session start." Your memory file can keep growing, Claude just stops reading the bottom of it, with no warning. - It's machine-local. Auto memory "is machine-local… not shared across machines or cloud environments." Switch laptops, spin up a cloud dev box, or onboard a teammate, and the memory doesn't travel.
- It stores outcomes, not reasoning. Auto memory saves high-level notes, not the debugging steps or the why behind a decision, so the most valuable context, the reasoning, is exactly what gets dropped.
There's also no meaning-based retrieval natively: memory is plain markdown that Claude greps. Reword a question and the relevant note may never surface.
Why an external memory layer wins
The fix isn't a bigger CLAUDE.md. It's moving memory outside Claude Code entirely. Because CognitiveX is a hosted MCP memory server, it sidesteps every native limit at once:
- No ceiling. Memory lives in a database, not a 25KB file that quietly truncates. Recall pulls the handful of relevant memories per query, so context stays small even as your history grows.
- Cross-session and cross-machine. It survives
/compact, a new terminal, a fresh checkout, or a different machine, because it was never tied to the session in the first place. - Semantic recall.
mcp__icog__recallretrieves by meaning, not keyword match, so rewording a question still finds the right memory. - Portable, not locked in. The same memory is reachable from any MCP client, Claude Code today, Cursor or Claude Desktop tomorrow, instead of being trapped in one tool.
How CognitiveX compares to the alternatives
| Claude Code native | OSS memory MCPs | CognitiveX | |
|---|---|---|---|
| Storage | MEMORY.md (200-line / 25KB cap) |
local JSON / SQLite / graph | hosted database |
| Cross-machine | No (machine-local) | Usually no | Yes |
| Semantic recall | No (keyword grep) | Sometimes | Yes |
| Consolidation / learning | No | No | Yes (deterministic) |
| Portable across agents | No (Claude Code only) | Varies | Yes (any MCP client) |
Anthropic's own reference Knowledge Graph Memory Server stores everything in a single local memory.json with no consolidation and no decay, a demo-grade reference, not a product. Most of the field, Memory Keeper, Recall, claude-memory-mcp, memory-bank-mcp, are single-developer GitHub repos backed by SQLite or JSON. They store and retrieve; none of them reorganize memory over time.
The real differentiator: memory that consolidates, not just stores
Every alternative above, including the commercial ones, is a storage layer. CognitiveX is a cognition layer that learns, not just stores.
The difference is consolidation. CognitiveX runs deterministic algorithms over your accumulated memory: episodic notes get promoted into semantic facts, salience-weighted decay lets stale detail fade while important context strengthens, and a dream-consolidation pass extracts recurring patterns and skills. This lineage comes from cognitive science, ACT-R and Generative Agents, not from a prompt. The structure is algorithmic; the LLM only renders the final language. Removing the model would change the wording, not the logic.
That's the one thing no hobbyist repo frames as the core, and even the strongest commercial systems don't: they optimize how few tokens a retrieval costs. CognitiveX reorganizes what's worth keeping over time. For a coding agent, that's the gap between a note-taker and a collaborator that actually compounds what it learns about your codebase.
A note on benchmarks: popular memory leaderboards are contested, and recent work shows plain filesystem operations can score within range of dedicated memory systems, so a single number doesn't cleanly separate trivial recall from intelligent recall. We don't publish an CognitiveX accuracy number, because we won't claim a score a saturated benchmark can't support. The edge here is architectural, and it's verifiable by reading what the system does.
Install CognitiveX in Claude Code
CognitiveX is a hosted MCP server, so there's nothing to run locally. The fastest path is the cogx CLI:
npm install -g @cognitivx/cli
cogx auth login
cogx mcp install claude
Or wire it up by hand. Create a key at developers.cognitivx.io/keys, then point Claude Code at the hosted endpoint:
// .mcp.json
{
"mcpServers": {
"icog": {
"url": "https://api.cognitivx.io/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
Then, in any session:
mcp__icog__remember, save a decision, a bug's root cause, or a fact about the codebase.mcp__icog__recall, retrieve it by meaning, across every session and machine.
That's it. The memory is now hosted, portable, and consolidating, and it works the same way the next time you open Cursor or Claude Desktop.
FAQ
Does Claude Code remember across sessions?
Partially. CLAUDE.md and auto memory persist on disk, but auto memory is machine-local and only the first 200 lines / 25KB of MEMORY.md load per session. An external MCP memory server like CognitiveX removes both limits.
Where does Claude Code store its memory?
Auto memory lives at ~/.claude/projects/<project>/memory/ on your machine. It's per-repo and not shared across machines or cloud environments.
Why does Claude Code forget things after /compact?
Compaction shrinks the working context window, dropping detail that wasn't written to a persistent store. Because CognitiveX memory lives outside the session, /compact doesn't touch it, you recall it back on demand.
How big can Claude Code memory get before it stops loading?
The native cap is 200 lines or 25KB of MEMORY.md, whichever comes first. Anything past that is not loaded at session start. CognitiveX has no such ceiling because recall fetches only the relevant memories per query.
Can I use the same memory across Claude Code, Cursor, and other agents? Yes. CognitiveX is exposed over MCP, so the same hosted memory is reachable from any MCP-compatible client, your context follows you instead of being locked into one tool.
Give Claude Code a memory that compounds
Native Claude Code memory is a markdown file that silently stops loading and never leaves your laptop. CognitiveX replaces it with hosted, semantic, cross-machine memory that consolidates over time, storage that learns, not a note-taker that forgets. Install CognitiveX in Claude Code →