My AI coding agents kept forgetting why they did things — so I built them a shared memory
If you code with AI agents — Claude Code, Cursor, Codex, Copilot — you've probably hit these two walls: 1. **Every session starts from zero.** The agent has no idea what happened yesterday, what you already decided,
If you code with AI agents — Claude Code, Cursor, Codex, Copilot — you've
probably hit these two walls:
1. **Every session starts from zero.** The agent has no idea what happened
yesterday, what you already decided, or what it was in the middle of.
2. **The *why* evaporates.** Three months later you stare at a function and have
no clue why it's built that way. The reasoning lived in a chat that's gone.
We solved "where does the code live" with git decades ago. We never solved
"where does the *reasoning* live" — and now that agents generate the code, that
gap hurts more than ever.
So I built **rational-agnostic**: a small, vendor-neutral layer that lives inside
your repo as plain markdown files. No SaaS, no account, no database.
## What it actually does
- **Decisions.** Every non-trivial choice is recorded ADR-style
(context / decision / why / consequences). One file per decision, git-diffable.
- **Traceability.** Functions get a `// @why: D-ab12cd` tag. You can take any
function, hash its body, and jump straight to the decision behind it — and
detect drift when the body later changes.
- **Shared memory + task state.** Agents of *any* vendor read and write the same
context, so Cursor picks up where Claude Code left off instead of starting cold.
- **Token-aware retrieval.** `get_context` hands the agent only the relevant
slice within a token budget, instead of dumping the whole history.
Everything is persisted in English and in markdown, so it stays portable,
searchable, reviewable in PRs, and diffable in git.
## Zero-config for every agent
Each AI client reads a *different* file for MCP config and project instructions.
So `init` writes (and safely merges into) the right file for each one:
| Agent | MCP config | Instructions |
|---|---|---|
| Claude Code | `.mcp.json` | `CLAUDE.md` |
| Cursor | `.cursor/mcp.json` | `AGENTS.md` |
| Codex | `.codex/config.toml` | `AGENTS.md` |
| Gemini CLI | `.gemini/settings.json` | `GEMINI.md` |
| Copilot | `.vscode/mcp.json` | `.github/copilot-instructions.md` |
📰 Read the original article on Dev.to AI
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.