An orchestrator assigns a refactoring task to two subagents simultaneously: Agent A is tasked with updating function signatures in api_client.py and Agent B is tasked with updating callers of those functions in the same file. Both agents complete their tasks and commit their changes. When the commits are merged, the file contains conflicting edits and broken function calls because both agents modified overlapping sections without knowledge of each other. What coordination mechanism was missing?
Select an answer to reveal the explanation.
Short Explanation
Sending two painters to the same wall with different color instructions at the same time guarantees a mess. When two agents share a file, you don't get to let them edit it at the same time — either use file ownership rules or sequence tasks so the second agent starts only after the first is done and committed.
Full Explanation
The correct coordination mechanism is assigning file ownership so only one agent modifies the shared file at a time, or sequencing the tasks so the caller-updating agent runs only after the signature-updating agent has completed and committed its changes.
File-level conflicts are a predictable failure mode when multiple agents operate on shared files without coordination. The orchestrator's responsibility is to detect these dependencies and handle them through one of two patterns:
1. File ownership: the orchestrator assigns each file to exactly one agent for the duration of the task. No other agent may modify that file while the owning agent has it. This is suitable when agents' work is truly independent.
2. Sequential dependency: when one agent's changes are prerequisites for another (as in this case — the caller-updating agent needs to know the signature-updating agent's new function signatures to update the callers correctly), the orchestrator must sequence the tasks. The caller-updating agent should not start until the signature-updating agent has completed and the new signatures are visible in the repository.
In this specific scenario, both patterns are relevant: sequential ordering is required because the caller-updating agent's changes depend on the signature-updating agent's output, not just file ownership.
The real-time chat channel proposal is not a standard coordination mechanism in agentic systems and introduces complexity without a reliable protocol for conflict resolution.
The separate file copies plus manual merge proposal is operationally expensive, defeats the purpose of automation, and reintroduces human bottlenecks that agents are meant to reduce.
The separate branches plus GitHub auto-merge proposal is a version control approach but does not solve the semantic conflict. Auto-merge handles syntactic conflicts only; if both agents modified the same lines with conflicting logic, auto-merge will fail or produce incorrect code even when it succeeds.