Chad Mathews
Aug 13, 2026Source: RL7 dual-agent setup (Claude + Codex), in use since June 2026

Two AIs, one project, zero collisions

Running two different AI assistants on the same codebase without them clobbering each other's work.

A field note from Chad Mathews, drafted with Claude. Chad directs the work and lived these decisions; Claude does the writing; Chad edits every line and approves it before it publishes. Where an idea or a reference came from Claude, the note says so.

I run two AI assistants on my game. Different tools, different strengths, same repository. One tends to be my heavier reasoner for design and thorny bugs; the other is fast and tireless for implementation passes. Used well, it’s like having two collaborators. Used carelessly, it’s like having two people edit the same document at the same time without telling each other, which is to say, a mess, and a specific kind of mess I hit early.

The failure looks like this. I’d have one assistant refactoring a room’s script while the other, in a separate session, “helpfully” touched the same file to fix something adjacent. Neither knew the other existed. I’d come back to work that half-overwrote itself, or a file where two different sets of changes had to be untangled by hand. Nothing was malicious. Both did good work. They just did it to the same surface with no awareness of each other, and good work plus good work on one file at one time is not twice the work. It’s a collision.

The two things that fixed it

Shared memory, identical for both. Both assistants start every session by reading the same files in the same order: the current state, the canon, the fence of things not to build, the decision log. I wrote about externalizing a project’s memory into files; the payoff here is that the memory is portable. It doesn’t live in one tool’s head. Both of my collaborators read from the same source of truth, so they hold the same picture of the project even though they share nothing else. When I set up the second assistant, giving it the same startup ritual as the first was most of the work. The memory was already on disk.

Assigned scope, stated out loud. The rule that actually prevents the collision is boring: each session gets a lane, and neither touches shared files outside its lane without warning me first. One’s working on the combat script, the other stays out of the combat script. If a task genuinely needs to cross into the other’s territory, the move isn’t to quietly edit it. It’s to stop and flag it. Same instinct as the drift check: surface the conflict instead of building through it.

Those two together are the whole system. Shared memory means they agree on what’s true. Assigned scope means they don’t write to the same place at the same time. One keeps them consistent; the other keeps them from colliding.

Where this turned out to be an old problem

Every software team with more than one person has solved some version of this. Clear code ownership so two engineers don’t rewrite the same module in conflicting directions. Branches so parallel work doesn’t collide until someone deliberately merges it. The whole discipline of not having two people edit one file blind.

And underneath that, it’s the oldest problem in computing wearing a costume: two workers, one shared resource, no coordination: a race condition. The fix is always the same shape. Give each worker a lane, or make them take turns, so their good work doesn’t land on the same spot at the same instant.

I didn’t reach for any of those names when I hit the problem. I just had two AIs stepping on each other and worked out that they needed a shared brief and separate jobs. The names came later, while Claude and I were writing this: what I’d rigged up by hand was code ownership, and one level down, mutual exclusion. The practices are old because the problem is real, and arriving at the fix from a different direction is a decent sign it’s sound.

The honest caveat

This works because I’m the coordinator. I assign the lanes. I decide who owns what this session. The two assistants don’t negotiate scope with each other. They can’t, they don’t share a channel, so the whole thing depends on me holding the map and not handing both of them the same file on the same afternoon. It scales to two because I can keep two lanes in my head. I wouldn’t trust this exact setup to five without something more formal sitting between them. For two, a human holding the map and a shared set of memory files is enough, and it turns two tools that would clobber each other into two collaborators that don’t.

Where this came fromThis note was extracted from RL7 dual-agent setup (Claude + Codex), in use since June 2026, a working document from a live project, written to solve the problem before it was written to explain it.