Stop spawning agent armies — the swarm trap that kills productivity
I watched a team go from shipping daily to shipping nothing in two weeks. The culprit? They kept adding more agents to solve problems the first agent created.
It started innocently. One coding agent was "too slow" on reviews, so they added a second agent for testing. The testing agent missed edge cases, so they added a third for QA. The QA agent couldn't understand business context, so they added a fourth for requirements.
Within days, they had seven agents passing work in circles. The original task — a simple API endpoint — never shipped.
This is the swarm trap. More agents feels like more productivity, but it's actually coordination overhead disguised as progress.
Every agent you add creates N² communication paths. Three agents have 6 potential interactions. Five agents have 20. Your "productivity multiplier" becomes a coordination nightmare.
The pattern that works: one agent with graduated capabilities, not multiple agents with narrow skills.
Instead of this:
# Swarm approach - DON'T DO THIS
code_agent = Agent("Write code")
test_agent = Agent("Write tests")
review_agent = Agent("Review code")
deploy_agent = Agent("Handle deployment")
# Now you need orchestration hell
result = code_agent.run(task)
tests = test_agent.run(result)
review = review_agent.run(result, tests)
if review.approved:
deploy_agent.run(result)Do this:
# Single agent with phases
dev_agent = Agent("""
You handle the complete development lifecycle:
1. Write code with tests
2. Self-review for obvious issues
3. Run tests and fix failures
4. Only escalate if tests pass but behavior seems wrong
Work in this order. Don't move to next phase until current phase is solid.
""")The magic is in the phases, not the agents. One agent that thinks through the problem sequentially beats five agents that think in parallel.
When you actually need multiple agents:
- Different security contexts — customer-facing vs internal operations
- Different time horizons — real-time monitoring vs daily reports
- Different human owners — marketing agent reports to marketing, not engineering
But not for artificial task splitting. Don't create a "research agent" and a "writing agent" for the same content piece. Create one agent that researches, then writes.
The litmus test: If two agents need to share context to do their job, they should probably be one agent with two phases.
Your productivity comes from agent quality, not agent quantity. One well-prompted agent with clear phases will outship a committee of specialists every time.
Before you spin up agent #2, ask: "Could agent #1 just do this next step?" The answer is usually yes.