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

Accidental Dashboard Built with Claude Created a Product Commitment Nightmare
A developer built a dashboard with Claude in 2 days, forgot to feature-flag it, 40 customers found it and love it. Now customers want customization, requiring a 3-week refactor to make the hardcoded code extensible.

OpenClaw Grocery Order Mistake: Unit Confusion with MCP Server
A user gave OpenClaw their credit card to handle weekly grocery runs via an MCP server. After three months of flawless orders, it recently ordered 2 kg of garlic instead of 2 heads, because the product page defaulted to kilograms.

Developer uses Claude to build AI audio ad generator with Go backend and ElevenLabs integration
A developer built Prompt Audio Ads, a tool that generates finished audio ads from text scripts in about 30 seconds using AI voice and background music. The Go backend integrates ElevenLabs API, ffmpeg audio processing, and 18 music genre presets.

Self-hosted OpenClaw AI agent creates passive accountability system for developers
A developer running OpenClaw on a Mac mini 24/7 reports the AI agent's persistent memory of tasks and projects creates an effective accountability system, helping complete projects that previously stalled.