Shared Memory for AI Coding Agents

Every new Claude Code, Codex or OpenCode session starts close to blank. You explain the project again, it rediscovers the same files, and yesterday's decision gets undone. A small shared memory in the repo fixes most of this, for every agent at once.

Published: October 2026 Reading time: 6 min Topic: Agent Memory

Why agents forget

  • Chat history is per session. When a session ends or is compacted, the reasoning behind its changes is gone.
  • Memory is per vendor. Where an agent keeps notes of its own, other agents cannot read them, so Codex never sees what Claude learned.
  • Instruction files are static. AGENTS.md and CLAUDE.md are good for rules, but they are the wrong place for "what we decided on Tuesday".

What to store

  1. Decisions with reasons. "Payments go through the webhook, not the client, because the client can be closed mid-checkout." The reason is what stops the next agent from undoing it.
  2. Open threads. Work that is half done, with the next step.
  3. A short file map. The handful of files that matter for each area, so agents stop searching the whole repo.
  4. Pitfalls. Things that broke before and how you found out.

Leave out what the code and Git history already say. Memory that repeats the code goes stale and starts to mislead.

A structure that stays small

memory/
  decisions/payments-webhook.md
  threads/search-rewrite.md
  map.md
  pitfalls.md

One fact per note, a one-line summary at the top, and links between related notes. Add one line to AGENTS.md telling every agent to read memory/map.md first and to update the notes it touched before finishing.

Tip: Review memory changes in your diffs like code. A wrong note is worse than no note, because every future session trusts it.

How Foxpit does it

Foxpit is a desktop app that runs Claude Code, Codex, OpenCode and Antigravity as one team, with one shared memory built in:

  • Plain markdown in your repo. Notes live in .foxpit/memory with [[links]]; they work without Foxpit and go through Git like any file.
  • Every agent, every vendor. A new session on any agent starts knowing yesterday's decisions, files and open threads.
  • Notes view and graph. Read and edit the memory in the app and see how notes connect.
  • Stays on your machine. Memory, code and terminal output never leave your computer.
Foxpit
Foxpit memory view listing records, decisions and notes, with a graph linking them to files and agents

Frequently asked questions

Do AI coding agents remember previous sessions?

Mostly no. Each new session starts from the instruction files in the repo and whatever you paste in. Some agents keep their own notes, but those notes are not shared with other agents.

Where should shared memory for coding agents live?

In plain markdown files inside the repository. Every agent can read files, the notes are versioned with Git, and you can read and edit them yourself.

What should go into agent memory?

Decisions and their reasons, open threads, a short map of important files, and known pitfalls. Leave out anything the code or Git history already records.

How does Foxpit's shared memory work?

Foxpit keeps one project memory in .foxpit/memory as plain markdown with [[links]]. Every agent in the team, on any provider, reads it at the start of a session, and the app shows it as notes and a graph.

Give every agent the same memory.

Download Foxpit Usage Limit Guide