Part 5: Shared Memory — Why Your Agents Keep Repeating Each Other's Mistakes
60-second video version of this part.

In Part 4 every specialist got its own memory. That fixes one problem and creates another: each specialist now has amnesia about the others. The researcher learns a source is unreliable; the writer and dev never find out and repeat the mistake. One agent forgetting is a nuisance. A fleet where each agent only knows its own head is a liability.
The fix is a shared memory layer: durable files that every agent reads and writes, so one agent's lesson becomes everyone's lesson. Here is what that looks like on a real fleet.
Four shared pieces
1. A shared lessons file. One markdown file, ~/fleet-shared-lessons.md, that every profile's SOUL.md points to. One entry per real lesson, root cause plus fix, appended at the bottom:
cat >> ~/fleet-shared-lessons.md << 'EOF'
## <date> - <lesson title>
Root cause + fix, not a narration. One entry per real lesson.
EOF
2. Per-agent output folders. Each specialist files long deliverables into its own folder, for example ~/agent-mission-control/content/<agent>/, so results outlive the session that produced them.
3. A shared task-log script. Every agent runs one script after finishing work. It writes a row to a shared SQLite database, a machine-readable trail of who did what:
bash ~/.hermes/agents/_shared/log-task-local.sh "<agent>" "<description>" "<completed|failed>" "<model>"
4. Named continuing sessions. A one-shot call has no memory between calls. A named session does:
hermes -p researcher chat --continue researcher-session --create-if-missing
Each profile's own memories/MEMORY.md holds short declarative facts separated by §. The shared files hold what the whole fleet agreed it learned. Both are read at the start of a session, so nobody starts blank.
Three rules that keep it useful
- Declarative, not narration. Write "root cause + fix", not a diary of your debugging. A diary is useless in three days.
- One entry per real lesson. Dense and specific beats long and vague.
- Shared facts, private details. Anything true for every agent goes in the shared file. Anything true for one agent (writing style, dev architecture) stays in that agent's own memory.
The prompt-based path
You can ask an assistant to build all of this in one go:
My Hermes specialists each have their own memory, but they can't see each
other's lessons: one agent learns something and the others repeat the
mistake. Set up a shared layer: a single markdown file every agent's SOUL.md
points to for cross-agent lessons (root cause + fix, one entry per lesson,
not a diary), a per-agent output folder for deliverables, and a shared
logging convention each agent runs before replying so there is a
machine-readable trail of who did what. Keep each agent's own memory file
private to that agent. Only genuinely shared facts go in the common file.
Why this prompt works: "a single markdown file every agent's SOUL.md points to" describes the lessons file by its wiring rather than its path. "Root cause + fix, one entry per lesson, not a diary" bakes the three rules in as constraints, so the assistant has no room to invent a worse format. "A shared logging convention before replying" maps to the task-log script. Same four pieces, whether you build them by hand or by prompt.
What changed for us
Once the fleet wrote lessons to one file and filed deliverables into per-agent folders, the "stranger every session" feeling went away at the fleet level. The writer inherited the researcher's source lesson. Not because the model grew a better memory, but because we stopped expecting sessions to remember and made files remember for them.
Next: five agents, and you can't see what any of them is doing.