2026-10-25 · 7 min read
Are we putting it all back together?
For years we split our systems into smaller and smaller pieces. Now, with agents doing more of the work, I'm noticing the code moving back into one place.
On this page
- When everything lived together
- Then pages stopped reloading
- Splitting things apart
- What splitting cost us
- Then agents joined the team
- A story from a tool I helped build
- Not everything belongs together
- What tends to stay separate
- One repo has costs too
- This swing isn't new
- Questions I'd ask before splitting or combining
- A note on certainty
Not long ago, the default way to build a website was to keep everything in one place. One codebase, one server, one deploy. I'm noticing that we are drifting back toward something like that, and the reason is not the one you might expect.
When everything lived together
In the server-rendered days, the browser asked the server for a page and the server built it. The data, the logic and the HTML all came from the same codebase. Every new piece of content meant another trip to the server and a full page load.
It was simple. One repository held everything, and changing a feature meant changing one project.
Then pages stopped reloading
Single page applications changed how it felt. Instead of fetching a whole new page, the browser loaded the app once and only the part of the screen that changed was updated. To the user, it felt like one continuous application.
Under the hood, something else started: the frontend and the backend began to separate.
Splitting things apart
As applications grew, so did the teams working on them. One big codebase meant everyone stepped on each other: one deploy for everybody, one broken build blocking everybody. So we split.
On the backend, that became microservices. On the frontend, it became micro frontends, where separate teams own and ship separate parts of the product. I wrote about one version of this in Many Next.js apps, one address.
The reason was mostly about people. Splitting the system let teams work and deploy without waiting on each other. That is still a good reason.
What splitting cost us
Splitting didn't remove the connections between the pieces. It moved them out of the code and into agreements between services: what an identity service returns, what a payment provider expects, what shape the data should have. Those agreements now live in people's heads, in docs, and in other repositories.
Then agents joined the team
An agent works with what it can see. When your apps live in separate repos, even if you open them in one workspace, a lot of the picture is missing. Take a shared identity service, a payment provider, or an internal tool. The agent doesn't know what that service returns, what it expects, or what changed last week. So the person driving the agent has to explain all of it, every time.
There is also a quieter problem. The external service may have changed on its own. If that change isn't visible to the agent, it works from the old picture and makes confident decisions based on it.
When the code is in one place, the agent can see both sides. It can read the service, follow the data, and make a better decision without waiting for you to explain.
A story from a tool I helped build
At a previous job, we built an internal tool. The frontend was one repo and the backend was another. It worked well, and nobody had a reason to change that.
Then the business came back with a new request. They wanted a copy of the tool for a different purpose: a white-labelled version for another client. We had already built it, and we had agents now, so it should have been quick.
It wasn't. The pieces we needed were in two places. For the new client, we had to bring the frontend and backend together into one repo and deploy that. And now we had two versions of the same tool in different shapes. In hindsight, the better setup would have been to have it all in one repo from the start, and deploy a single branch for the clients who wanted their own copy.
The agent was not the problem. Our structure decided how easy the reuse could be.
Separate repos
frontend-repo backend-repo
-> the agent sees one piece at a time
One repo
product-repo/
frontend/
backend/
shared/
-> the agent sees everything
Not everything belongs together
This isn't an argument for putting everything in one repo. Some things should stay standalone: a service shared by many products, a provider you don't own, something with its own team and release cycle. Others are better kept together so that anyone, human or agent, can see the whole picture.
Deciding which is which is a trade-off, and often a business decision more than a technical one. What I'm noticing is that agents have changed the weights on that scale. The cost of scattered context used to fall on people who could ask a colleague. Now it also falls on the tools we work with.
What tends to stay separate
It depends on the use case, but these are the things I'd keep apart:
- Things you don't own. A payment provider or an external API will always be separate. What helps is making its contract visible, such as the expected requests and responses, even though the service itself isn't in your repo.
- Things many products share. A shared identity service serves everyone, so it deserves its own life and its own team.
- Things with a different release rhythm. If one part ships daily and another ships quarterly, forcing them together can slow both down.
- Things behind a security or compliance boundary. Sensitive data or strict access rules are good reasons to keep code and permissions apart.
- Things with a different stack. A model-serving service or a data pipeline may not benefit from living next to a web app.
One repo has costs too
Putting everything together isn't free. Builds and tests get slower unless you invest in tooling that only runs what changed. The history gets noisy. Permissions get harder, because everyone who can see the repo can see everything in it. And the "deploy a branch per client" approach from my story has its own risk: the branches can drift apart over time, and fixes have to be carried across by hand. Often the better way is one codebase with configuration for each client.
This swing isn't new
Teams were moving back before agents arrived. In 2018, Segment described moving its destination services out of many separate microservices and into a single service. With every new destination came another repo, and testing and deploying all of them together became too much work. They kept microservices for other parts of the system, so it wasn't a rejection of the idea.
Many other teams have gone to what people call a modular monolith, one deployable application with clear internal boundaries, for similar reasons. Agents add another reason to the pile, but this was already a pattern of splitting, feeling the pain, and pulling back together.
Questions I'd ask before splitting or combining
There's no rule for this, but these are the questions I'd start with:
- Who owns it? If a separate team owns it and ships on its own schedule, it probably deserves its own place. If the same people change both sides every week, keeping them apart mostly adds friction.
- How often does it change? Something that changes together should usually live together. Something stable and rarely touched can stay at a distance.
- Does anyone need to see inside it? If a person or an agent has to understand its behaviour to make good changes elsewhere, being able to read it directly is worth a lot.
- Is it truly shared? A service used by many products has a good reason to stand alone. A service used by one product often doesn't.
Sharing a service and sharing a repository are separate decisions. You can have one without the other.
A note on certainty
This is early, and I might be wrong. I'm describing what I'm noticing in my own work, not a settled trend. Teams that split for good reasons will keep those reasons, and agents may get better at working across boundaries. If that happens, the balance will shift again.
What I'm fairly sure of is this: the cost of scattered context is real, and it's no longer only a cost for people.