Skip to content

How Do You Run Multiple Claude Agents in Parallel with Ruflo?

Problem

I was stuck in a sequential AI workflow. Every time I needed to build a feature, I’d ask Claude to do one thing, wait for it to finish, then ask for the next thing. My development process looked like this:

Sequential Workflow
Time →
Task 1 (API) ████████████░░░░░░░░░░░░░░░░░░░░
Task 2 (Tests) ░░░░░░░░░░░░░░████████████░░░░░░░░
Task 3 (Docs) ░░░░░░░░░░░░░░░░░░░░░░░░░████████
Total: ~30 minutes of waiting

I’d spend 30 minutes just waiting for tasks to complete one after another. The bottleneck wasn’t Claude’s capability - it was my workflow. I was using Claude like a single assistant when I needed a team.

What happened?

I found a Reddit thread about Ruflo that mentioned the “delegate like a manager” workflow. One comment stood out:

Reddit Comment
"Ruflo runs swarms of Claude agents on your project in parallel.
This is the closest I've found to the 'delegate like a manager'
workflow actually working."

I realized I’d been thinking about AI wrong. Instead of treating Claude as one assistant, I should treat it as multiple specialists I can delegate to simultaneously.

The difference is fundamental:

Assistant vs Manager Mindset
ASSISTANT MINDSET:
"I need help with X" → Claude does X → "Now help with Y" → Claude does Y
MANAGER MINDSET:
"I need X, Y, and Z done" → Delegate to Agent 1 (X), Agent 2 (Y), Agent 3 (Z)
→ Review all results together

What is Ruflo?

Ruflo is a Claude Code plugin that spawns multiple Claude instances to work on your project simultaneously. Instead of one Claude doing one task at a time, you get multiple agents working in parallel.

I installed it and tried my first parallel workflow:

Terminal
# Install Ruflo
pip install ruflo
# Run multiple agents on a task
ruflo run --agents 3 "Build user authentication with tests and docs"

The output showed three agents working:

Ruflo Output
Agent 1 [API]: Creating /auth/login endpoint...
Agent 2 [Tests]: Writing test cases for auth module...
Agent 3 [Docs]: Generating API documentation...
All agents completed in 12 minutes

What would have taken 30+ minutes sequentially took 12 minutes with parallel execution.

How Parallel Execution Works

The key insight is that many development tasks are independent. When I’m building a feature, the backend API, frontend components, tests, and documentation don’t necessarily depend on each other during the initial creation phase.

Here’s how I now structure parallel workflows:

Feature Development Parallel Flow
┌─────────────────┐
│ Developer │
│ (Single Task) │
└────────┬────────┘
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Agent 1 │ │ Agent 2 │ │ Agent 3 │
│ API │ │ Tests │ │ Docs │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└──────────────┼──────────────┘
┌─────────────────┐
│ Integration │
│ Review │
└─────────────────┘

The wall-clock time becomes max(task times) + integration overhead instead of sum(all task times).

Use Cases I Tested

I tried several parallel execution patterns:

1. Feature Development

Feature Development Agents
Agent 1: Backend API endpoints
Agent 2: Frontend components
Agent 3: Test suite
Agent 4: Documentation

I ran this for a user profile feature. Each agent worked independently on its part. The only coordination needed was agreeing on the API contract upfront.

2. Code Review

Multi-Perspective Review
Agent 1: Security review
Agent 2: Performance analysis
Agent 3: Code style consistency

This pattern replaced my usual “one comprehensive review” with specialized perspectives. I caught a security issue and a performance problem that a single agent might have missed.

3. Research Tasks

Parallel Research
Agent 1: Technology A evaluation
Agent 2: Technology B evaluation
Agent 3: Technology C evaluation

I used this to compare three database options. Each agent researched one option deeply, then I synthesized the results.

The “Delegate Like a Manager” Workflow

This is the core pattern that changed how I work with Claude.

Traditional Sequential Workflow:

Sequential: 3 Iterations
Iteration 1:
Me: "Write API endpoint"
Claude: [writes API]
Me: [reviews]
Iteration 2:
Me: "Write tests"
Claude: [writes tests]
Me: [reviews]
Iteration 3:
Me: "Write docs"
Claude: [writes docs]
Me: [reviews]
Total: 3 × (task time + review time)

Parallel Manager Workflow:

Parallel: 1 Iteration
Single Iteration:
Me: "Build user API with tests and docs"
Ruflo orchestrates:
API Agent + Tests Agent + Docs Agent (simultaneous)
Me: [reviews integrated result]
Total: 1 × (max task time + review time)

The mental shift is significant. Instead of micromanaging each step, I define the outcome and let the agents coordinate.

Common Pitfalls I Hit

I made several mistakes when starting with parallel agents.

Pitfall 1: Over-Parallelization

I tried running 10 agents at once for a complex feature. The result was chaos:

Failed Over-Parallelization
Agent 1: Created User model
Agent 2: Created UserProfile model (conflicting with Agent 1)
Agent 3: Wrote tests for non-existent endpoints
Agent 4: Created docs for wrong API version
...
Integration: 45 minutes of fixing conflicts

I learned that 3-4 agents is the sweet spot. Beyond that, coordination overhead outweighs speed gains.

Pitfall 2: Ignoring Dependencies

I tried parallel execution for a feature where the frontend depended on the backend API:

Dependency Error
Agent 1 [Backend]: Created /api/users endpoint
Agent 2 [Frontend]: Failed - endpoint doesn't exist yet
Result: Frontend agent wasted time waiting

Now I identify dependencies upfront. If Task B depends on Task A, they run sequentially. Independent tasks run in parallel.

Pitfall 3: Context Fragmentation

Each agent only sees part of the project context. I had this issue:

Context Problem
Agent 1 [API]: Used PostgreSQL-specific syntax
Agent 2 [Tests]: Wrote tests assuming MySQL
Result: Tests failed on CI which uses MySQL

I now include project-wide context in each agent’s instructions:

Context Injection
Project uses:
- PostgreSQL in development
- MySQL in production
- All SQL must be database-agnostic

Pitfall 4: Rate Limit Exhaustion

Running 5 agents in parallel means 5x API calls. I hit rate limits:

Rate Limit Error
Error: Rate limit exceeded (429)
Current usage: 95,000 tokens/minute
Limit: 100,000 tokens/minute

I reduced parallel agents to 3 and added retry logic. I also spread work across different time windows when possible.

Pitfall 5: Integration Chaos

Merging outputs from 4 agents into one codebase created conflicts:

Merge Conflicts
CONFLICT: Both Agent 1 and Agent 3 modified routes/index.js
CONFLICT: Agent 2 and Agent 4 both created tests/setup.js

I learned to assign agents to distinct files or modules. No two agents should modify the same file.

Sequential vs Parallel: When to Use Each

After testing both approaches, I made a decision guide:

Task TypeBest ApproachReason
Independent featuresParallelNo dependencies between agents
Bug fixes (single file)SequentialOne agent, one file
Large refactorsSequentialChanges are highly coupled
DocumentationParallelDifferent docs can be written simultaneously
TestingParallelTests for different features are independent
ResearchParallelMultiple perspectives simultaneously
Code reviewParallelDifferent review aspects are independent

The key question I ask: “Can these tasks be done without knowing each other’s results?”

If yes, parallel. If no, sequential.

My Current Workflow

I now use this decision tree:

Workflow Decision Tree
Start
Is the task complex (3+ subtasks)?
├─ No → Sequential (single agent)
└─ Yes → Are subtasks independent?
├─ No → Sequential (dependencies)
└─ Yes → Can I define clear boundaries?
├─ No → Sequential (risk of conflicts)
└─ Yes → Parallel with Ruflo
Limit to 3-4 agents
Assign distinct files/modules
Include shared context

This flow prevents most of the pitfalls I encountered.

Summary

In this post, I showed how to run multiple Claude agents in parallel using Ruflo. The key point is the “delegate like a manager” workflow: instead of giving Claude one task at a time, you orchestrate multiple agents working simultaneously on independent tasks.

The main takeaways:

  • Parallel execution reduces total time from sum(task times) to max(task time) + overhead
  • 3-4 agents is optimal; more creates coordination chaos
  • Identify dependencies upfront; independent tasks only for parallel execution
  • Each agent needs project-wide context to avoid conflicts
  • Assign agents to distinct files/modules to prevent merge conflicts

Ruflo transformed my AI workflow from “waiting for an assistant” to “managing a team.” The bottleneck shifted from execution time to my ability to define clear, independent tasks.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments