Skip to content

One agent or a team of agents? How do we coordinate development without conflicts

Two isolated coding-agent workspaces converge on a shared integration and review point.

Series II: From infrastructure to agentic projects in production. Episode 09 of 20.

In the previous episode, we chose where the programming agent works: IDE, terminal, or cloud. Now it’s time to decide how many agents work on the same change and who integrates the results. Spinning up multiple sessions simultaneously might seem like a shortcut, but two changes that are each correct in isolation can be incompatible together. For a small or medium business, the practical decision is to start with one agent and only add parallelism when tasks have clear boundaries and a defined integration point.

We start with a verifiable change

We'll use a hypothetical scenario from the B2B requests and documents portal we've been following. After validating PDF uploads, the team wants a workflow where an employee approves the document and the client sees the status. The change involves the API contract, status logic, interface, tests, and error messages. This is not a real client project or deliverable.

A single agent can implement an initial version on a separate branch. They receive acceptance criteria, repository rules, and the test commands described in the episode on code preparation. The team evaluates the code diff, the tests, and any open questions. If the task fits a context that’s easy to track, there’s no need for an automatic coordinator or for parallel sessions.

When it's worth splitting up the work

Splitting the work becomes useful when a part can be described and verified without constantly waiting for another. In our example, the team first sets the contract between the API and the interface: status values, error responses, and transition rules. Only then can agent A implement the server logic, while agent B builds the interface using that same contract. Integration tests confirm if both parties’ assumptions align.

This is sequential execution followed by parallelism. A shared step resolves dependencies, then relatively independent parts move forward at the same time. A coordinator—human or software—assigns tasks and synthesizes results; this is called orchestration. The coordinator isn’t the same as the final code approver. If a change affects the same functions, data models, or business rules as another change, it’s safer to apply them sequentially or to re-scope them.

Research on multiple agents shows that isolation and structured integration can help with certain software engineering assessments, but published results don’t guarantee gains for our portal. Even an industry research example warns that in programming, there are often fewer genuinely parallel tasks than there are in research. The useful measure is the accepted outcome, not the number of agents running.

Separate workspaces, shared contract

In Git, a branch is a line of changes stemming from a base version. A worktree is an extra working directory linked to the same repository, allowing multiple branches to be used at once without agents writing to the same set of files. An isolated cloud environment can provide similar separation, depending on the platform.

In our example, each agent starts from the same known commit, gets their own branch and workspace. A temporarily owns the state logic files, B the interface components. “Owns” here means being responsible for coordination, not a technical restriction enforced by Git: an agent can modify other files if permitted. The instructions should require agents to pause and report if they discover a need to change something in the other’s area.

Physical isolation prevents accidental overwriting of files in a shared directory, but doesn’t solve semantic conflicts. Two branches can merge with no textual conflict, while one changes the meaning of a field used by the other. Don’t copy credentials into worktrees just to run the tests; use mock data and the minimal access needed, as required by project rules.

Handoffs: more than “I’m done”

A handoff is the delivery of a result from one agent to another or to the integrator. For each task, ask for the same short handover checklist:

  1. The goal and base commit, branch, and files changed.
  2. What behavior has been implemented and which acceptance criteria are covered.
  3. Commands run and their results, including any failed or unverified tests.
  4. Assumptions about the shared contract, out-of-scope changes, and observed risks.
  5. Open questions and steps needed for integration or rollback.

The checklist alone isn’t enough proof. The integrator reviews the actual diff, runs checks on the combined code, and compares the behavior with requirements. If agent B assumed the status is “approved” but the API provides “accepted”, that mismatch needs resolving before merging, not hidden by tweaking a test.

Who integrates and who approves

Assign a single person to manage the technical integration of the change—typically a developer or a supervised coordinating agent. They decide the branch order, handle conflicts, and re-run tests after each relevant merge. A successful check on branch A and on branch B doesn’t automatically mean the A+B version will work.

A pull request—a reviewed merge proposal—keeps the diff and discussion in one place. Branch protection rules can require reviews and automated checks before merging. The person designated by the team accepts the final behavior and the remaining risk. Agents can propose code, tests, and comments, but that doesn’t make them the decision-maker for release.

Always keep a way to stop: if two tasks start editing the same contract or integrated tests fail, pause parallelism, update the spec, and resume from a common base. Avoid resolving conflicts automatically just to get to a mergeable commit.

A selection rule you can use tomorrow

For every change, note the dependencies and the person who accepts the result. Use a single agent when the problem has a unique outcome and tightly related changes. Add a second agent for a part with a stable interface, a separate workspace, and its own tests. Introduce explicit coordination when there are multiple deliverables that need to be combined—not just because the tool allows simultaneous launches.

Compare the duration until an accepted change, integration interventions, regressions, and resource consumption with the single-agent variant on similar tasks. The outcome of this episode is the handover contract and the integration rule, which the team can add to the repository. The next episode will cover what information can be retained and shared between sessions, along with provenance and access limits.

Here we are talking about the agents developing the portal. An agent integrated into the portal for client document processing has a different identity, different data, and different approvals; it does not automatically receive access to the repository or to the development team's tools.

Sources

Coordinate agents and code integration

Do you want to delineate agent tasks and maintain control over code integration? Discuss with the i8 team.