How I keep a handful of AI agents from stepping on each other
One repo per thing, chezmoi for everything global, git worktrees and a PR for every change. How I keep track when five agents are running at once.
Right now I have four terminal tabs open with an AI agent in each (or was it five? I've lost count). One is building a feature for the marathon map, another is researching which DaVinci Resolve version I should install and a third is checking if something another agent told me is actually true. The last one has been waiting 20 minutes for me to answer a question I never saw. The agents do most of my coding these days, and not only coding. On 20 October I started 13 sessions. What takes my time now is keeping track of them.
Over the last few months I put together a setup for this. Nothing fancy, mostly git and terminal tabs with some scripts on top.
I tried a few other ways before this, the agent apps and the ones that run in the browser, and I ended up back in the terminal. I started my career on Linux so I'm probably biased. I don't know if it's actually better than the apps and they're getting better quickly.

Every self-contained piece of work gets its own repo. The website is one and the finances app is another, the marathon map got its own too. I have 54 on GitHub now and most are tiny. An agent works much better when the whole folder is about one thing and there's less for it to read. Inside each repo the to-do list is GitHub issues, so when I think of something I cut an issue and later I hand it to an agent as it is. The finances app has 36 open right now.
Anything global lives in one dotfiles repo managed by chezmoi. That's the skills and scripts for OpenCode, which is what I run the agents in, plus a global AGENTS.md with rules like never commit to main and never merge a PR, and every agent in every tab reads it. A small script commits whatever changed every 6 hours because I never remember to, and it made 45 of the 58 commits in there.
When two agents need the same repo I use git worktrees. It's the same repo checked out in a second folder on its own branch, so one switching branch doesn't pull the rug from the other. My helper wt new fix/thing creates one, opens a new tab and starts the agent there.
A session goes roughly like this. The coloured lines are what the tab shows at that point, blue while the agent works, yellow when it's waiting for me and green when it's done.
tab 2 · daft-map-search
the districts reset when I press back. can you fix it
working
The selection only lives in memory so going back loses it. I'll put it in the URL. Should back undo one district or go to the previous search?
waiting for me
previous search
oh and the map is really slow on my phone. don't touch it now, make it an issue
Opened an issue for the slow map on mobile with what I found so far. Back to the fix.
working
Back is fixed and tested. Pushed fix/back-button and opened a PR. The review bot asked for a test with an empty search so I added it. The preview is up.
done
I click around the preview, merge it on GitHub and run wt rm
new tab · wt new perf/mobile-map
pick up the issue about the slow map
In the bigger repos another AI reviews the PR and the agent fixes the blocking comments before I look, so by the time the tab goes green the obvious stuff is sorted. The web apps are on Vercel so every PR gets a preview link and that's where I actually check things.

I still do the merge myself. I don't read every line all the time but that's when I decide something goes out.
Some things are still annoying, I lose track of which tab was doing what and old worktrees pile up because I forget to remove them. The other one is forking. Halfway through a session I want to go off somewhere else, but the new thing needs the context from this one. Asking the agent to write it up as an issue is the best I have so far because it puts what it knows in there, but it's not the same.
This is what works for me right now and I doubt it stays like this for long. That's part of why I write these. If you run a few agents at once I'm curious how you handle it.
AI helped write this post, of course. It was in one of the tabs.