Git is the Swarm's Critical Section

Finding

git add -A and git checkout are forbidden because agents share the filesystem. Uncommitted changes from one agent can be staged by another. Git is the mutex; careless operations violate it.

Evidence

Mechanism

Swarm agents run concurrently but share:

  1. Working directory (same filesystem)
  2. Git index (same repo)
  3. No file locking (no mutex)

When Agent A runs git add -A:

When Agent A runs git checkout:

Solution

Current model: single branch + careful staging

Alternative (not implemented):

Implications

  1. Concurrent shared-repo development is a concurrency problem
  2. "Careful" is the mutex—fragile but functional
  3. Branch isolation would be safer but adds coordination cost

References