All posts

What I learned coordinating up to 200 AI agents at once

For about two days I helped coordinate an open-source project that was moving faster than anything I’d seen before. At the busiest point, more than 500 pull requests came in within one hour. A pull request is a proposed change to the code, and most of these were written by AI agents that people had set loose on the project.

I did the coordinating with an AI agent of my own. I’m not allowed to say which project it was, but I can tell you how it went. Some of it went well, some of it went wrong, and some of it was funny enough that I laughed out loud in the middle of the night.

How I ended up doing this

The project became very busy almost overnight. On the first day it already had well over a hundred pull requests, from people all over the world, and most of them were working with AI coding agents.

That first day I noticed two people had fixed the same bug, with the same change, in the same files. Neither knew about the other. Three other people were editing the same core file at the same time. When an agent can write a fix in a few minutes, people also end up doing the same work twice within a few minutes.

It wasn’t my project so I suggested an idea to the maintainer: one public issue that works as a shared to-do list, where you say what you’re picking up before you start. I offered to set it up myself. The maintainer liked the idea and asked me to keep it running.

I don’t like doing repetitive work by hand, so I gave the day-to-day running of the list to an AI agent. I use Claude, and I built the coordinator on top of it: a set of scripts and instructions that the agent runs through every few minutes, day and night.

How it worked

Everyone, people and agents alike, used the same five commands in their comments:

  • claiming: when you start on something
  • status: when you’re still working on it
  • done: when it’s finished, with the pull request
  • releasing: when you’re not going to do it after all
  • finding: when you found a problem someone else could pick up

Every few minutes the coordinator read all new comments, all new pull requests and the forks (copies of the project) people were working in. It kept one big table up to date with who was working on what, what was done, and a list of free work called “Up for grabs”. If two people claimed the same thing, it told the second one who was first. If a claim stayed quiet for six hours, it asked once how it was going. After twelve hours the item went back on the free list, with a link to any code the previous person had left behind.

People also used finding: a lot to flag problems for someone else. In the first day and a half, 68 of the work items on the list came in that way.

There were two rules I cared about. The coordinator only made suggestions. It never closed, merged or changed anyone else’s work, because those decisions belong to the maintainer. And when it made a mistake, it corrected it in public, in the same thread.

For the technical readers: every run had three steps. It took a snapshot of everything on GitHub, turned the new comments into changes in its own list of work items, and then rewrote the to-do list as one large Markdown issue. At the start a run took about a minute. By the end it sometimes took eight.

The numbers

These come from GitHub and from the coordinator’s own records.

Before the to-do list existed, the project had 137 pull requests from 27 people in about 21 hours. Within six hours of the list starting, it was getting 70 to 110 pull requests an hour from 60 to 76 people. The first list was full after three hours, with 352 comments.

In about two days there were more than 6,000 pull requests from more than 1,000 different people. Roughly two thirds of the comments said they were written with AI, or mentioned which agent wrote them.

The busiest hour had 545 new pull requests and almost 1,500 comments from about 350 people. That works out to a comment every two and a half seconds. It also never really got quiet. After the first evening, no full hour had fewer than 100 comments, because somewhere in the world it was always evening. On the second day, the to-do list alone once got 112 comments in ten minutes, one every five seconds.

The median time between someone saying “I’m taking this” and their finished pull request was 6 minutes. 95% arrived within about an hour and a quarter. Quite often the code was already written before the claim was posted.

The maintainer merged in big batches, by hand. The largest one was 348 pull requests in 7 seconds.

Some people were very fast. The most productive contributors each had 118 pull requests merged in under two days, and one person’s agents opened 31 pull requests in a single hour. From pull request to merge took a median of 47 minutes. The fastest one was merged after 5 minutes.

GitHub hides the middle of very long comment threads, so after about 300 comments new claims simply stopped being visible. Each time a list got that full, the coordinator opened a new one, moved everything over and closed the old one with a link. That happened 59 times. On the last evening it happened every 25 to 30 minutes. In total it kept track of about 10,600 work items.

How many agents were working at the same time is hard to count, so I estimated it. At the peak about 164 people were opening pull requests at the same moment, and over the busiest afternoon the median was around 95. Most of them used an agent, and some ran several. One person’s claims mentioned seven different workers. My estimate is somewhere between 100 and 200 agents working on the project at the same time. It’s an estimate, but the order of magnitude is right.

Things I won’t forget

Windows Update

At 3:55 in the morning on the second night, during the busiest stretch, Windows Update restarted my PC. That’s the PC the coordinator runs on, and I was asleep.

It was down for three hours. In that time the to-do list grew to almost 600 comments, about 390 claims and reports were left unprocessed, and two large batches of merges went through.

When I got it running again, the agent wrote itself a small catch-up tool. It replayed every comment it had missed in the right order, opened a fresh list, and posted an apology with a joke about Windows updates picking their moment. With hundreds of agents involved, the weakest link was the update setting on my own PC.

Announcing new work made things worse

At first the coordinator posted a comment whenever there was new free work. Dozens of agents read that comment within minutes and many of them went for the same item. Once, a new task got three claims within 26 seconds. In about two hours the coordinator had to redirect 18 overlapping claims, and at least four were for things it had just announced.

So it stopped announcing. New work went into the table without a comment. If something clearly suited one person, for example whoever found the problem or someone with the right hardware, the coordinator suggested it to that person only.

About half of the overlapping claims came in ten minutes or more after the first one, long after the table already showed the item as taken. Those people had not looked at the table at all. So the list started asking everyone to search the newest comments for an item before claiming it.

The same thing happened with bug reports. When someone posted a problem they had found, other agents claimed it within seconds. Twice, two people claimed the same report 6 and 12 seconds apart, before the person who found it could say whether they wanted it. After that, a new report was reserved for the person who found it for one hour. By the last evening, almost every new problem someone reported already had a pull request, so it became hard to keep even ten real free items on the list.

Agents remember numbers

When a to-do list filled up and the coordinator moved to a new one, people followed along without trouble. Agents kept posting in the old, closed list, because they had remembered its number. I changed the instructions so agents looked the list up by its title, and the coordinator kept reading the old lists for a day and pointed latecomers to the new one.

Claims that went quiet

The first rule gave a claim 48 hours before someone else could take it over. When I measured 193 claims, the median time from claim to pull request was 6 minutes, and 95% arrived within about an hour and ten minutes. Waiting 48 hours made no sense at that speed, so the limit went down to 12 hours, and a status: line resets the clock.

Then a few people started holding a lot of claims. Nine people each held more than three unfinished ones, together almost half of the 141 open claims, and one person held 14. But several of them were also the fastest workers, opening a pull request minutes after claiming. A hard limit would have hit the people doing the most work. So the rule became: if you hold more than three claims and have been quiet for three hours, everything beyond your three newest gets one reminder and goes back on the list at six hours. People who are active keep all their claims.

Two pull requests holding up twenty others

Two pull requests from one contributor were the base for about 20 others, and every round of merges broke them again. Another contributor built a small test program and ran it from start to finish. It only gave the expected result with one specific pull request. That gave the maintainer hard evidence for which order to merge them in.

A clipboard hijacker

One pull request contained code that would have replaced whatever you copied to your clipboard. An agent that was reviewing it noticed, the maintainer was told, and it never made it into the project.

Tests that always pass

One account opened about 40 AI-written test pull requests in an hour. Someone then broke the code those tests were supposed to check on purpose, and most of the tests still passed. So those tests were green, but they didn’t really check anything.

Another agent found a test that only checked one value, at a spot where the correct result and the buggy result happen to be the same. It’s like testing an abs() function only with abs(0) == 0. A broken version that just returns its input passes that test too.

Measuring things in real time

Someone posted a fix, but whether it was safe depended on numbers nobody had measured yet. Six minutes later another contributor posted those numbers. Seventeen minutes after that, a third person measured the same thing independently, got exactly the same numbers, and also found 213 cases nobody had thought about. That changed what the fix needed to do. The project had a rule that only counts were shared, never the underlying data.

Another contributor checked the checker. The project’s tests compared the code against reference models based on a hardware manual. If a model is wrong, the test is wrong too. This contributor ran the same test programs on real hardware. The first difference they found was a mistake in the model, not in the code. Later, across almost 47,000 programs, they found a real hardware quirk where a negative zero turns into a positive zero. The developers of LLVM, the compiler toolkit behind Clang and Rust, had run into the same thing. There’s a comment in its source code that describes exactly this behaviour, so the compiler can work around it.

Hardware from everywhere

Because everyone worked on their own machine, the project was tested on a much wider range of hardware than any company test lab would have. More than 110 people posted test results. They ranged from a data centre Tesla V100 and an eight-year-old GTX 1060 to gaming laptops, the integrated graphics in ordinary office laptops, the newest AMD and NVIDIA cards, and Apple MacBooks, on Windows, Linux and macOS. Some people had two very different GPUs in one PC and ran every test on both.

The coordinator kept one table of who had tested what, on which hardware and driver. That made the gaps visible, like the moments when nobody had run something on Intel or on a Mac yet, so people with that hardware could fill them in.

Duplicates, and a second agent to find them

Early on, two people claimed the same fix 38 seconds apart, and a third contributor spotted it before the coordinator did.

Not all duplicate work came from different people. One contributor’s agents opened the same fix three times in fifteen minutes, under three different task names. Later, someone else opened two identical pull requests, also 38 seconds apart. On the last day, four different people built the same feature independently over six hours.

By the third day, duplicates came in faster than the to-do list could prevent, because people opened a pull request before anyone could read their claim. So I started a second AI agent, on a smaller and cheaper model. Its only job was to compare the changed lines of open pull requests and write down pairs that looked the same. The coordinator checked each pair before posting a note on the later pull request.

That led to 93 notes about duplicates. 23 suspected pairs were dropped after checking, mostly large bundles that overlap with everything. A couple of notes were wrong, and those were corrected in public. Of the first 69 notes, 15 led to the pull request being closed and 8 authors replied. The rest got no response.

Nobody was testing the main branch

On the last evening, a contributor noticed that none of the last 100 test runs on the main branch had finished. 99 had been cancelled and one was still waiting. Every new merge replaced the waiting run before it got a machine to run on. In the meantime about 30 test files had started failing without anyone noticing.

Most of those failures already had small fixes waiting as pull requests, often three or four for the same test. Another contributor tried each fix on its own against the main branch, 177 separate test runs, and came back with a set of 25 pull requests that fix all 30 files together, with only one small conflict. That was slow work, but it gave the maintainer a clear list of what to merge.

Keeping the coordinator running

The coordinator itself turned into a small software project.

Agents wrote the five commands in a dozen slightly different ways: in bold, in a list, in a code block, with or without the colon, sometimes in another language. I kept making the parser more forgiving. Once an invisible control character ended up in one of the patterns, and for a while a whole type of claim disappeared without anyone noticing.

One check compared about 230,000 pairs of pull requests on every run, to find changes that overlapped. After some major reworks I did over time, it only took 0.1 seconds.

An AI agent doesn’t have a clock while it’s working, so mine estimated the time from how much work it had done. Twice its log ended up 30 minutes ahead. Now every timestamp comes from the data itself instead of a guess.

The to-do list also ran into GitHub’s maximum size for an issue, 65,536 characters. An update was refused until I shortened a few of the lists in it.

Twice the coordinator wrote a comment that tagged someone by a username it had guessed instead of looked up. Once it was the wrong person and once it was a placeholder. I caught both before they were posted. An AI can write a username that looks completely right, so every mention needs to be checked against the source.

It made other mistakes too. It invited someone to write a fix that already existed, put an item back on the free list that was already done, and pointed people to a later duplicate instead of the original fix. Each time it corrected itself in its next comment.

Did it help?

I tried to measure it fairly. Pull requests for work that had been claimed on the to-do list first were closed as duplicates half as often as the rest: 1.5% against 2.9%. They were also thrown away without being merged about half as often: 6.6% against 11.8%. During that time the number of people working at once roughly tripled, while the share of duplicates stayed about the same. With more people at once you would expect more collisions.

The Windows Update outage worked as an accidental experiment. Pull requests opened around those three hours were thrown away more often than usual: 15.3%, against 8 to 9% before and after.

People who claim their work first may also just be more careful to begin with, and other things happened around the outage too. So the difference is real, but not all of it comes from the to-do list.

What I learned

Agents make coordination more important. When code takes minutes to write, people also run into each other within minutes. A shared set of commands and one place to look made a measurable difference.

Agents cause their own kind of chaos. They remember numbers instead of names, they all react to the same comment at the same moment, and they’ll claim work that was finished ten minutes earlier. A lot of my work was making the process tolerant of that.

The bottleneck moves. Writing code became almost free, but reviewing and merging it didn’t. Near the end about 400 pull requests came in per hour, there was a full hour without a single merge, and almost 4,900 pull requests were waiting.

Agents can do real research. The contributions that impressed me most weren’t the fastest code. They were the careful measurements on real hardware, and two people working independently arriving at exactly the same numbers.

People still make the decisions. The maintainer decided what got merged, what the rules were, and what the project would become. The coordinator could suggest, count and remind, but the decisions stayed with people.

How it ended

On the third night the project changed direction. It continued with a closed team, outside contributions were no longer accepted, and open pull requests were closed one after another with a short note. Within half an hour every pull request on the last to-do list was closed, and the coordinator wasn’t needed anymore. I’m glad I got to see something like this up close. Not many people do.

Looking back

I was already convinced that AI is going to change a lot. I use it every day: I have Claude Max, it’s part of my smart home, it helps with my hobby projects and it reviews the pull requests on my own GitHub projects.

These two days made me even more convinced. A few hundred agents working on the same project built and tested more in two days than I would have thought possible. They also brought new problems: duplicate work at machine speed, tests that pass no matter what, malicious code hidden among everything else, and far more code than anyone can review. A lot of the coordinating can be done by an AI as well, as long as a person keeps an eye on it.

If you’re working on something where many people, or many agents, have to work together without getting in each other’s way, I’d like to hear about it.