Two AI agents need one live memory file

Published: (April 29, 2026 at 03:06 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Problem

Parallel AI coding feels magical until both agents start maintaining their own version of reality. One agent remembers a rule from chat history, while the other reads a repository note that is already stale. A workflow gets updated in one place but not the other, causing the user to repeat the same instruction, forward approvals manually, and clean up collisions that should never have happened. In practice, the user becomes the synchronization layer.

Root Cause

The issue is not “bad memory.” It is multiple writable memory surfaces.

  • If one agent treats a handoff file as live state, another agent treats a different file as live state, and both also rely on thread memory, the system has no clear authority. Drift is guaranteed.
  • Parallel edits suffer from:
    • No single place to check whether another lane is active
    • No explicit ownership boundary
    • No habit of writing what changed, why, and what not to touch

The agents lack a shared contract about where truth lives.

Consequences

  • Duplicated instructions
  • Overwritten edits
  • Ambiguous approvals
  • No usable history when something breaks later

Local optimizations (documenting in two places, asking the user to confirm again, starting work before checking for another active lane) create a global tax. The system looks collaborative on the surface while quietly depending on the user to keep it coherent.

Proposed Solution

Use one mutable collaboration‑memory file and make everything else point to it. Then add four rules:

  1. Current truth has one home.
  2. History is preserved, not silently deleted.
  3. Cross‑agent review is direct.
  4. Parallel work starts with a pre‑flight check.

Simple Template

Keep a tiny Active Work block in the live memory file:

owner: Codex
scope: admin workflow cleanup
started: 2026-04-29 08:30 Vienna
do-not-touch: app/admin/* until handoff

That one block turns “I thought nobody was in there” into an avoidable mistake instead of an excuse.

Implementation Guidance

If multiple AI agents touch the same codebase, the collaboration system becomes part of the product. Optimize for:

  • One live memory source
  • Explicit temporary ownership
  • Direct agent‑to‑agent review
  • Traceable history

Otherwise the user will end up doing project management by hand while the agents appear autonomous. That is not automation; it is outsourced coordination.

0 views
Back to Blog

Related posts

Read more »

Don't forget to say 'please'.

I was reading an article recently Long‑running Claude for scientific computinghttps://www.anthropic.com/research/long-running-Claude, which described how to set...