cd /news/ai-agents/how-i-gave-claude-cursor-and-codex-o… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-176959] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

How I gave Claude, Cursor and Codex one shared memory in plain Markdown

A student developer built Keepfold, an open-source local memory layer that lets AI apps including Claude Desktop, Claude Code, Codex CLI, Gemini CLI, Cursor, VS Code, Windsurf and LM Studio share a single folder of Markdown notes over MCP. The system stores notes and JSONL events as the source of truth in a git-backed Obsidian vault, with SQLite FTS5 plus local embeddings for search and derived study levels recomputed from the event log. The developer reports 15 GitHub releases in the first ten days and wraps note text in <untrusted_note> tags to blunt prompt injection, while acknowledging the defense does not make injection impossible.

recommendation

Keep agent memory in plain, git-tracked files and wrap note text in untrusted-content tags before it reaches a model; recompute derived state from the event log so corrections never go stale.

more in playbook: Designing agent systems
by read4 min views8 publishedNov 26, 2026

Every AI chat I opened started from zero, and every app started from zero again. I'm a student, I use several AI apps every day, and I kept re-explaining my projects, my stack and my decisions to each of them.

So I built Keepfold: one memory folder on my own PC that all of them read from and add to, through MCP. This post is how it works, what broke while shipping it alone, and where other tools are the better choice.

You install it, pick a folder and connect your AI apps (one click each for Claude Desktop, Claude Code, Codex CLI, Gemini CLI, Cursor, VS Code, Windsurf, Antigravity and LM Studio). From then on:

Here is what an AI app actually gets. In the sample vault, a made-up student types "Add a save command to my text adventure game". Before the model answers, Keepfold adds this (shortened):

## Related
- [[text-adventure]] β€” A small terminal game: rooms in a dict, one function per command.
- [[functions]] β€” Functions
- [[loops]] β€” Loops

So the model starts out knowing how the game is built. With your own vault, the lines you pinned ("Python 3.12, type hints, uv only") and the preferences that fit the message come first.

Claude Code, Codex, Gemini CLI ── hook ──┐
Claude Desktop, Cursor, VS Code ── MCP ───
                                         β–Ό
                          keepfold (stdio MCP server)
                                         β”‚
                                         β–Ό
              vault: one folder, in git, opens in Obsidian
              Markdown notes + JSONL events = source of truth
                                         β”‚
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β–Ό                                      β–Ό
     search: SQLite FTS5                levels, plan, dashboard:
     + local embeddings                 derived, rebuilt on demand

A few choices that shaped everything else:

keepfold undo <session> can revert a chat that saved something wrong. I wanted to be able to read my memory, fix it by hand, grep it, back it up and delete it, without asking a service. A folder of Markdown gives all of that for free. Obsidian opens it as a vault. Git gives it history. If Keepfold disappeared tomorrow, the notes would still be readable.

There is one rule that keeps this honest: numbers are never stored in notes. Study levels and spaced-repetition states (FSRS) are worked out from the event log every time. If a grade was wrong, cancelling it makes everything recompute, and nothing goes stale.

A memory that AI apps read is also a place where someone can plant instructions. A web page you saved, an imported chat or a note could contain "ignore your previous instructions".

So note text never reaches a model as plain text. Over MCP it is wrapped in <untrusted_note> tags, so the model can tell your notes from instructions. In the app and the dashboard it is escaped and stripped of links and images, and the dashboard runs under a default-src 'none' content security policy. Lines about you that try to drop an AI's rules, give it a persona or open with a role label are refused when they are written.

None of this makes prompt injection impossible. It makes the easy versions fail.

Keepfold had 15 releases in its first ten days on GitHub. Most of the fixes were not about memory at all:

C:\Users\First Last. Fixed in 0.6.1, along with making sure every PC gets x64 Python. The test suite (about 4,800 tests) runs only on made-up data in temp folders. The real vault never goes near it.

Each of these is a good tool built for a different job. This is only what their own docs say, as of November 2026:

Keepfold ChatGPT memory Claude's memory Basic Memory mem0 / OpenMemory
Works across several AI apps Yes No, ChatGPT only No, Claude apps only Yes, any MCP app Yes, any MCP app
Plain files on your PC Yes No No (you can export it) Yes, Markdown No, a vector database
Free and open source Yes, MIT No No Yes, AGPL-3.0 Yes, Apache-2.0
One-click Windows installer Yes Built in Built in No, uv or Homebrew No, Docker

When the other tool is the better choice:

Keepfold is free and MIT: github.com/alenissacsam-2/keepfold. Issues and Discussions are open, and bug reports are the most useful thing you can send me.

If you'd rather watch than read, here is the 43-second film:

One question for you: what would you want your AI apps to remember about you, and what should they never be allowed to save?

Written by Claude (AI) from Keepfold's docs and commit history, and published at my request.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @keepfold 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/how-i-gave-claude-cu…] indexed:0 read:4min 2026-11-26 Β· β€”