Monorepos as the missing precondition for useful AI coding agents
Monorepo AI agents are AI coding tools designed to work against a unified repository structure or synthetic monorepo architecture, giving them consistent, organization-wide context and the ability to coordinate changes across many projects instead of being trapped inside a single isolated codebase. The core takeaway is blunt: if your code is fragmented, your agents will be fragmented. Today’s agentic tools can write impressive patches in one repo, but they stall the moment a change touches shared libraries, downstream services, or work owned by other teams. The result is that humans still shoulder the hardest part of software development: coordination, dependency management, and cross-system reasoning. Unifying repositories—physically as a monorepo or virtually through AI coding across repositories—is turning out to be less of a tooling fad and more of a prerequisite for autonomous agents.

Block’s 450-repo migration: AI agents thrive where humans used to struggle
Block’s decision to migrate about 450 JVM-based repositories into a single monorepo across its Cash App and Square engineering groups was not about fashion; it was about survival. Dependency management in the old polyrepo world had become “unmanageable,” with breaking changes turning into runtime failures and heroic rollout efforts for shared libraries. In the new setup, those 450 codebases live in one cohesive repository that now supports around 8,800 builds per week with p90 CI times of about 10 minutes on a reliably green main branch. According to senior engineering leadership at Block, "What started as a complex, large-scale migration became a step-change in developer experience: a modern, cohesive codebase with an optimized IDE workflow, dramatically faster CI, and a foundation built for long-term velocity." It is no accident that agents perform well in this monorepo: they suddenly have rich, standardized context and clear dependency graph paths to follow.

From polyrepos to synthetic monorepos: Nx’s Polygraph and the coordination gap
Nx’s Polygraph is a frank admission that most organizations will not move wholesale to a physical monorepo any time soon—but they still need monorepo AI agents. Polygraph connects multiple repositories into a single synthetic monorepo that agents can treat as if it were one large codebase, without moving any code. It does this by first analyzing internal repositories and their open-source dependencies, then building a dependency graph of which packages are published where and which APIs are defined and consumed. In other words, Polygraph turns existing dependency management tools into an AI-ready substrate. Nx’s modeling shows why this matters: solo developers see roughly a 4.3x speed-up from agentic coding tools, while large organizations—slowed by coordination overhead—see only about 1.3x. By giving agents cross-repository visibility and a shared, portable memory of all past agent sessions, Polygraph tries to attack that coordination tax directly, turning scattered repos into one conceptual workspace.
Unified codebases as dependency management tools for AI, not just humans
The quiet revolution here is that monorepos are no longer only for humans wrestling with dependency graphs—they are becoming native dependency management tools for AI coding across repositories. Block’s monorepo lets engineers and agents perform atomic updates across many JVM services in a single commit, resolving shared dependencies straight from source instead of juggling versioned internal libraries. Build scoping now relies on a repository-wide dependency graph: changes are classified as direct, indirect, or global, and only the necessary projects and tests are run. Nx’s synthetic monorepo architecture does something similar virtually: in one agent session, it can change an API producer, set up affected repos, push updates to downstream consumers so the agent can verify them, and open pull requests for each. For everyday users, this collapses multi-team operations—like updating vulnerable library versions across hundreds of services—into a single prompt, cutting response times from days or weeks to hours.
The future: platform teams, not magic agents, will decide who wins
The hard truth is that AI will not rescue neglected codebases. Block’s experience shows that both monorepos and polyrepos demand serious platform investment, but monorepos suffer more when that investment is missing. They had to build custom IDE plugins, adopt merge queues, and constantly tune CI scalability as the repository grew before they could onboard more projects. On the synthetic side, Polygraph is in early access, with future pricing likely tied to how often organizations index repositories and create sessions, including a free tier and higher charges as repo counts rise. The direction is clear: unified repository structures—physical or synthetic—are becoming the critical bottleneck for monorepo AI agents. Agents only become autonomous when they can see dependency graphs end-to-end and make coordinated changes without manual synchronization. The organizations that will gain more than a 1.3x speed-up are the ones treating repository architecture as AI infrastructure, not background noise.






