Comparing PRD Execution: Bash Loop vs. Agent Teams in Claude Code

A developer tested moving a 14-task PRD through Claude Code using two methods: a bash loop and the new Agent Teams feature. The tasks involved developing a CLI tool for trade data analysis in Python. Both methods used the same project and model (Haiku) but differed in orchestration.
Key Details
- Bash Loop (ralph.sh): Each task initiates a fresh Claude CLI session in serial order. It reads the PRD, implements the task using TDD, marks it as complete, writes learnings to a progress file, commits, and exits, continuing with the next task in the subsequent iteration.
- Agent Teams Approach: Uses a team consisting of a Team Lead and three Haiku agents (Alpha, Beta, Gamma). Tasks are distributed in parallel using a Shared TaskList. Dependencies are handled in waves.
- Speed: The Agent Teams method took about 10 minutes, achieving a 3.8x speedup over the bash approach, which took 38 minutes.
- Parallelism: The bash loop is a serial execution method, while the Agent Teams utilized a 2-way parallel execution.
- Code Quality: Both methods delivered identical results with a 100% pass rate on all tests and a 98% code coverage.
- Cost: The bash loop potentially incurs lower costs due to less coordination overhead compared to Agent Teams. The Agent Teams setup faced overheads such as managing messages between the team lead and agents, maintaining separate contexts, and frequent TaskList polling.
Notable issues with the Agent Teams method included unequal task distribution due to polling frequency, lack of push notifications resulting in idle agents, and race conditions leading to about 14% of redundant work in the second run. The bash loop's learning repository spanned 914 lines, while Agent Teams accumulated a sparse 37 lines due to defaults lacking shared progress files.
📖 Read the full source: r/ClaudeAI
👀 See Also

Developer builds simplified AI agent hosting for non-technical users
A developer created a tool that automatically handles AI agent hosting with private cloud instances, allowing non-technical users to connect via Telegram using their own API keys. The solution was built after failed attempts to walk a non-technical user through standard Docker-based setups.

Claude AI Used to Generate Performance Evaluation Document from User History
A developer used Claude AI to complete a 3-4 page performance evaluation document by asking it to 'complete this documentation using information you have about me.' The AI generated a detailed document in 5-6 minutes that included work contributions the user had almost forgotten.

Developer Builds Cloud Certification Quiz App Using Claude AI
A developer built Kwizeo, a cloud certification quiz app for AWS, GCP, and Azure using Claude AI to generate questions, design progression logic, and accelerate development.

AI-generated 3D-printable pegboard from hand-drawn sketch
A developer used Codex to convert a hand-drawn sketch into parametric 3D models for a pegboard toy, specifying only two dimensions: 40mm hole spacing and 8mm peg width. The repository contains Python generators for seven play pieces, four gears, and printable boards.