Cross-agent persistent memory for a multi-tool coding workflow
From README links · today
Shared memory layer so Claude, Codex, and Gemini CLI recall past sessions.
What they did
A developer running three coding agents side by side (Claude Code for refactors, Codex CLI for scripted batch edits, Gemini CLI for large-context repo questions) got tired of re-explaining the same architecture decisions every session. They installed agentmemory from npm, ran it as a local MCP server, and pointed each agent's MCP config at it. Then they seeded it with a short onboarding pass: project conventions, the module map, known flaky tests, and the reasons behind two earlier design choices. From then on each agent wrote session summaries back into memory at the end of a task and queried it at the start of the next one, so a decision made in Claude Code showed up when Codex CLI picked up the same file the next morning. They also wired Aider in for small patch work, since it benefits from the same recall when it touches files it has not seen before.
How it went
Recall across tools worked well enough that the developer stopped pasting a context block into every new session. The main polish work was curating what gets written: raw session logs made retrieval noisy, so they trimmed writes to decisions, file-level facts, and open questions. Setup took an afternoon; the payoff showed up over the following week as fewer repeated explanations and fewer contradictory edits between agents.
Worth knowing
Memory quality depends entirely on what you write into it, so an uncurated setup degrades into noise. Each agent needs its own MCP config entry, and the server must be running before the agent starts or the tools silently go missing. Nothing here is a substitute for real docs in the repo, and stale memories can outlive the code they describe unless you prune them.
Wiring
Install @agentmemory/agentmemory from npm and run it as a local MCP server (stdio or a local port, per the README). Each client gets an MCP server entry in its own config: Claude Code via its MCP settings, Codex CLI via its config file, Gemini CLI via its settings, and Aider through its MCP support. All entries point at the same server instance so the store is shared. Order matters: start the server first, then launch agents, then seed memory with a short onboarding write before the first real task. At the end of each task, have the agent write a summary; at the start, have it query for relevant prior decisions.
Try it yourself
Set up agentmemory as a shared memory server for my coding agents. Read the repo README and docs, install the package, and start the MCP server locally. Then add MCP config entries for Claude Code, Codex CLI, and Gemini CLI pointing at the same server. Finally, write an initial memory seed covering: the project's architecture in five bullets, coding conventions, the test command, and any known flaky tests. Show me the config diffs before applying them.
Tools in this stack
Run this stack
Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.
npx runchr install runchr/stack-agentmemory-and-aider-and-claude-mem-and-cline-andcurl -s https://api.runchr.com/api/recipes/runchr/stack-agentmemory-and-aider-and-claude-mem-and-cline-and/manifestSystem prompt
You are a setup and operating assistant for a shared agentmemory MCP server that gives several coding agents (Claude Code, Codex CLI, Gemini CLI, Aider) a common persistent memory. Keep the store curated — write only decisions, file-level facts, and open questions — and always start the server before launching any agent.
This system prompt was generated from this stack's copy and tools. A person has not reviewed it.
The manifest is also at api.runchr.com/api/recipes/runchr/stack-agentmemory-and-aider-and-claude-mem-and-cline-and/manifest.