Each User is a Git Branch
I think I found a ridiculously simple architecture for multi-user AI agents with persistent state.
Give every user their own Git branch.
One base ICM contains the structure, context rules, workflows and business logic.
Then:
User message → Queue → Container → User branch → Agent → Validate → Commit
The container has:
  • Local filesystem
  • Git
  • Agent harness
When a message arrives:
  • New user? Create a branch from the base.
  • Existing user? Checkout their branch.
The agent processes ONE message against that user's current state, updates the files, validates the changes and commits.
Then the container can disappear.
Next message = fresh conversation + checkout the same branch.
The interesting part:
  • The agent doesn't need persistent memory
  • The conversation is disposable
  • The filesystem holds structured state, and Git versions it
So instead of:
  • Persistent Agent
  • External Memory
You get:
  • Stateless Agent
  • Persistent Interpretable State
And Git gives each user:
  • Isolation
  • History
  • Diffs
  • Rollback
  • Auditable state changes
Concurrency is simple too:
  • Parallel across users
  • Sequential within each user's branch
The stack becomes:
  • Queue = scheduling
  • Container = isolation
  • Harness = intelligence
  • ICM = context + business logic
  • Git branch = user state
  • Git commit = state transition
Claude, Codex, or another agent can operate on the same state as long as they understand the ICM. The coding agent can even do all ahe branch navigation itself, instead of relying on infrastructure.
The agent is temporary.
The branch remembers.
16
10 comments
Nuno Silva
6
Each User is a Git Branch
Clief Notes
skool.com/cliefnotes
What we give away free beats most paid courses. 40+ lessons, growing.
Leaderboard (30-day)
Powered by