IMO, modules vs monorepo doesn't quite address the problem. Historically, we human developers have been mostly concerned with the size of the project (i.e., the size of each commit) and the difficulties around merging work, especially with the ego side of it (why should I have to spend time changing my code to be compatible with Phil's changes?)
An agent swarm has a very different set of problems. There can be a lot more agents making changes in parallel than you'd see in all but the biggest megacorps, and the pace of those changes can be ridiculously high. The rapid pace simultaneously balloons the total repo size (because of history), and the frequency of collisions. A modifies file 1, B modifies file 1, A commits changes, B runs into conflict. Or worse, C modifies file 1 after A commits their changes and beats B to commit, resulting in B growing staler and staler as they race to get their branch merged.