AI project · Developer tooling · 2026

Many agents, one memory

Since June 2026, AI coding agents have built most of my websites and my home network: several versions of Claude, and OpenAI's Codex, working from three computers and from the cloud. None of them remembers the previous session, and two of them may be working at the same time.

I built the system that lets them pick up each other's work. It has layered written rules, one repository as the only channel, a rule to read only what changed, a log and a plan for handing work over, and a small claim lock so two agents never deploy the same thing.

Who wrote the log

entries in the project logs, Jun–Nov 2026

Every entry names the agent and the machine. 37 older entries do not name a model version.

Role
Designed the rules and the tools; the agents follow them
Agents
Claude (Opus, Sonnet, Fable) · Codex
Machines
Main Mac · a retired MacBook · a Windows desktop · cloud sessions
Built from
Git · plain Markdown rules · a 340-line Python lock tool
01

Why it was needed

Every rule here started as a failure. These four shaped the system most.

  • Aug 2026Three days of work on one disk

    A desktop was found holding eight unpushed commits, including a full incident write-up. No other machine had any of it.

  • Aug 2026The same bug, reported three times

    An agent copied a panel feature without the code it relied on. The button did nothing, Esc did not close it, a control was missing. Each was a separate report with one root cause.

  • Oct 2026Reading the wrong rules

    An agent opened from a synced folder read an outdated copy of the instructions and did not know its role.

  • Oct 2026Two claims, both "successful"

    In a test, two lock-tool runs on one machine overwrote each other's claim in 3 of 5 tries, and both reported success.

02

One repository, layered rules

All code, documentation and agent memory live in one private repository. It is the only way machines hand work to each other.

CLAUDE.md

Shared floor. Multi-machine workflow, commits and pushes, credentials, how to build a web page. Every agent on every project follows it.

<project>/CLAUDE.md

Project entry document. Only what is specific to that project: how to deploy, where it lives, its traps. It may be stricter than the floor, never looser.

<side>/WORKFLOW.md

Side branches. Optional work keeps its own plan and log, and agents skip it unless the task names it, so unrelated sessions do not spend context on it.

If two layers disagree, the agent follows the stricter one, and if it is still unsure, it asks me. An AGENTS.md mirrors the rules for non-Claude tools. Short pointer files sit in the places agents tend to wander into, such as the synced folder and old course directories, and send them back to the real workspace.

03

Read only what changed

Each machine stores a marker: the last commit it has read for each project. A new session lists the commits since then that touched the files it cares about, and reads only those diffs.

A session starting on each machine

illustrative history

    git fetch -q "$GH" main
    SEEN=$(cat .git/ai-seen-$P 2>/dev/null)         # this machine's marker, never committed
    W=($P CLAUDE.md LOG.md SKILLS.md SECRETS.md)     # files that matter to this project
    git log --oneline ${SEEN:+$SEEN..}FETCH_HEAD -- "${W[@]}"
    git pull -q --ff-only "$GH" main
    # empty list: read nothing.  otherwise: git diff $SEEN..HEAD -- "${W[@]}", then move the marker

    An empty list means nothing changed, so the agent rereads nothing and starts work. That one rule cut most of the reading at the start of each session. The logs are capped at 20 entries. Older ones move to an archive no agent reads by default, which took the main log from about 44,000 tokens to 19,000.

    04

    Hand off through a log and a plan

    The log says what happened. The plan says what is still open. An agent that stops halfway leaves both behind.

    Log entry

    newest first · at most 5 lines
    ## v2026.11.05-1 · Main Mac · Claude Opus 5.5
    - What changed and why (the conclusion,
      not the process)
    - Files touched / what was deployed /
      what was NOT verified

    Plan item

    self-contained
    - [ ] Action, in one line
      - what was already checked, the options
        on the table if a decision is pending
      - exact commands or UI path, IDs
      - do NOT touch: …
      - what to log when done

    Anything an agent thought of but did not do goes into the plan at once: proposals waiting for my decision, problems it noticed and left alone, steps only I can do on another machine. Nothing is left as a "by the way" in a chat that the next agent will never see. When the newest log entry contradicts what I just asked for, the agent checks with me before acting.

    255log entries written by agents since June
    12open plan items on the network project today
    20entries kept in each hot log; the rest are archived
    05

    Claim before you touch

    For the websites, a small tool called zl keeps a registry in the same repository: who holds which domain, hosting project or server slot, from which machine, until when.

    Two agents, one domain

    simulated · same messages and exit codes as the tool
    Agent A
    Agent B
    $ # press a button

    Every write is fetch, change, commit, push. A rejected push means another machine wrote first, so the tool rereads and tries again. Claims expire after a few hours. A claim held by someone else returns exit code 2, and the rule is to stop and tell me, never to pick a different name to get around it. Runs on the same machine share one file lock, which fixed the race in the test above.

    Commits per month

    work vs. lock-tool bookkeeping · Nov to the 20th
    WorkClaims and deploy log (zl)
    Data table
    06

    Rules that came from corrections

    When I had to correct an agent twice for the same kind of thing, the fix went into the rules, so the next agent starts with it.

    1. Push every change, immediately

      Not at the end of the session and not batched. Each change gets its own commit and push, and a failed push has to be reported. Never force-push; a conflict in someone else's folder means stop and ask.

    2. A behaviour gets one implementation

      Before writing a modal, toast or formatter, search for the existing one and import it. Moving a feature means moving what it depends on. A second copy is never correct.

    3. Unverified means not done

      An error stops the work until it is understood. A deployment counts only after it is checked live, and the report lists what was not tested.

    4. A permission error means stop

      If a scoped credential lacks a permission, report what is missing. Do not switch to a stronger credential to get past it.

    5. Secrets are read, never copied

      Credentials are registered in one index and read from their files at the moment of use. They never go into code, logs or replies.

    6. One name per machine

      "The old MacBook" means exactly one computer, the home gateway. Agents mixing up two MacBooks caused real mistakes, so the name is fixed.

    07

    What it does not solve

    The system makes agents dependable colleagues. It does not make them autonomous.

    Anything risky still waits for me: deleting, taking things offline, changing live configuration, spending money. Rules cost tokens every session, so they have to stay short, and pruning them is ongoing work. Conflicts between machines are rare because of claims and constant pushing, but when they happen I resolve them. The same setup built the projects next to this one, including the home network.