Running several AI coding agents at once speeds a team up, until two of them edit the same file, redo the same task, or build on a decision that changed yesterday. Five habits prevent most of it, whether your team uses Claude Code, Codex, Cursor or a mix.
Why agents clash
Most clashes come from three gaps, and none of them is the model’s fault:
- Two agents edit the same files at the same time. Each writes a sensible change, and the second one to finish overwrites or conflicts with the first.
- Agents can’t see each other’s work. A session in Claude Code has no idea what a teammate’s Cursor session started an hour ago, so the same task gets done twice.
- Agents work from stale decisions. What the team decided this morning lives in someone’s chat or someone’s session. Claude Code’s auto memory, for example, is machine-local: a teammate’s Claude Code never sees it.
The habits below close those gaps one at a time.
1 · Give every agent its own working copy
Never run two agents in the same folder. Give each one its own git worktree: a separate checkout on its own branch, sharing one repository.
git worktree add ../app-billing -b billing git worktree add ../app-search -b search
Start one agent in ../app-billing and another in ../app-search. Their edits can’t collide on disk, and each change arrives as its own branch to review. Anthropic’s Claude Code docs recommend worktrees for running parallel sessions. When a task is merged, remove its worktree with git worktree remove ../app-billing.
2 · Split work by area, with one owner at a time
Worktrees stop agents overwriting each other’s files, but not from changing the same code on two branches. Size each task so it touches its own part of the codebase, and give each area one owner at a time.
- Files every change touches, such as lockfiles, database migrations and shared config, belong to one task at a time. Run those tasks one after another.
- Keep tasks small and merge often. A branch that lives for a day conflicts far less than one that lives for a week.
- Review an agent’s branch the way you would a teammate’s pull request, and let CI run the tests before it merges.
3 · Write the rules down where every tool reads them
Build commands, coding standards and “never do this” rules belong in a file in the repository, where every change is reviewed and every agent loads it at the start of a session.
- Codex reads
AGENTS.md, and so do a growing number of other tools listed at agents.md. - Claude Code reads
CLAUDE.md, and can read a repository’sAGENTS.mdin place of it.
Keep one file as the source of truth so the tools on your team follow the same rules, and keep it short: rules, not a diary.
4 · Make decisions visible to every agent
A rules file changes through review, which is right for standards and wrong for what changes from day to day: “deploy on Fridays now”, “use Postgres 16”, “the API stays on v2”. If those decisions only live in one person’s session, every other agent works from the old answer.
Put them somewhere every agent reads before it starts, in every tool your team uses, with the newest decision replacing the old one. That’s the job of a shared team memory.
5 · Check in before starting
Before an agent starts a task, it should say what it’s about to work on, so a teammate’s agent that wants the same work hears about it first. A good check-in names the task, the branch and the files it expects to touch, and it’s visible to everyone’s agents, not just people.
When a second agent checks in on work that’s already taken, it can tell its person before it edits anything, and pick something else or wait.
A checklist
- One worktree and one branch per agent.
- One owner per area of code at a time; shared files one task at a time.
- Small tasks, merged often, reviewed like a teammate’s pull request.
- Rules in
AGENTS.mdorCLAUDE.md, kept short. - Day-to-day decisions in a memory every agent reads.
- A check-in before every task: what, which branch, which files.
Where KoalaFix fits
KoalaFix handles habits 4 and 5 for you. It’s a hosted MCP server that gives every agent on your team one shared memory: each session starts with the team’s brief, decisions saved in one person’s session reach everyone else’s agents, and every agent checks in before it starts, with its project, branch and files, so overlapping work shows up early. It works in Claude Code, Codex, Cursor, Claude, ChatGPT, Gemini CLI, OpenCode, GitHub Copilot and any MCP client.
- KoalaFix for Claude Code: how it compares with CLAUDE.md and auto memory.
- Get started: connecting your first assistant.
KoalaFix opens in November. Join the waitlist to get in on launch day.