Lab 3.5: AI Peer Review
Module: 3.5 - Multi-Claude Workflows | ← SlidesDuration: 30 minutes Sample Project: hackathon-starter
Learning Objectives
By the end of this lab, you will be able to:
- Run multiple Claude Code sessions simultaneously
- Use one Claude to write code, another to review
- Work on parallel tasks in different terminals
- Leverage multiple perspectives for better code quality
Prerequisites
- Completed previous Day 3 labs
- Ability to open multiple terminal windows
- Familiarity with the hackathon-starter project
Why Multiple Claude Sessions?
Single Claude limitations:
- One context, one perspective
- Can't review its own work objectively
- Sequential task execution
Multi-Claude benefits:
- Fresh perspective for code review
- Parallel task execution
- Specialized roles (writer vs. reviewer)
- Cross-checking for errors
Setup
# Navigate to the sample project
cd sample-projects/hackathon-starter
# You'll need TWO terminal windows for this labTask 1: Writer-Reviewer Pattern
Time: 15 minutes
Use one Claude to write code, another to review it.
Terminal 1 - The Writer:
claudeGive the Writer a task:
Create a new utility function in a file called utils/stringHelpers.js that:
1. Truncates a string to a max length with ellipsis
2. Converts a string to title case
3. Generates a URL-safe slug from a string
Include JSDoc comments for each function.Wait for the Writer to complete.
Terminal 2 - The Reviewer:
claudeGive the Reviewer a task:
Act as a senior developer performing a code review.
Review the file utils/stringHelpers.js and check for:
1. Edge cases that aren't handled
2. Performance issues
3. Naming clarity
4. Missing error handling
5. Test coverage suggestions
Be constructive but thorough. Rate the code 1-10 and explain.Compare perspectives:
- Did the Reviewer catch issues the Writer missed?
- Were the suggestions actionable?
Success criteria:
- [ ] Writer created the utility file
- [ ] Reviewer provided meaningful feedback
- [ ] At least one improvement identified
Task 2: Implement Review Feedback
Time: 10 minutes
Have the Writer fix issues found by the Reviewer.
Terminal 1 - Back to the Writer:
The code review found these issues:
[Paste the Reviewer's feedback here]
Please address each issue and update the file.Terminal 2 - Re-review:
Re-review utils/stringHelpers.js after the fixes.
Did the developer address all the feedback?
What's the new rating?Success criteria:
- [ ] Writer addressed feedback
- [ ] Reviewer confirmed improvements
- [ ] Code quality improved measurably
Task 3: Parallel Task Execution
Time: 5 minutes
Work on two independent tasks simultaneously.
Terminal 1:
Add input validation to the user registration endpoint in controllers/user.js.
Validate email format and password strength.Terminal 2:
Write unit tests for the existing user profile update functionality.
Focus on edge cases.Both tasks run in parallel, saving time.
Success criteria:
- [ ] Both tasks completed
- [ ] No conflicts between changes
- [ ] Time saved vs. sequential execution
Workflow Patterns
Pattern 1: Writer-Reviewer
Claude A (Writer) → Creates code
Claude B (Reviewer) → Reviews code
Claude A (Writer) → Fixes issuesPattern 2: Parallel Workers
Claude A → Task 1 (e.g., frontend)
Claude B → Task 2 (e.g., backend)Pattern 3: Devil's Advocate
Claude A → Proposes solution
Claude B → Challenges assumptions, finds flaws
Claude A → Defends or improvesPattern 4: Specialist Teams
Claude A → Security-focused review
Claude B → Performance-focused review
Claude C → Readability-focused reviewTips for Success
- Name your sessions - Use
/renameto track which Claude is which - Clear context - Each Claude starts fresh, won't know what the other did
- Copy outputs - Manually share relevant info between sessions
- Use git worktrees - For larger parallel tasks, use separate worktrees
Git Worktrees for Parallel Work
For larger parallel efforts:
# Create a worktree for the second Claude
git worktree add ../hackathon-feature-b feature-branch-b
# Terminal 1 works in main directory
# Terminal 2 works in ../hackathon-feature-bTroubleshooting
Sessions conflicting:
- Work on different files
- Or use git worktrees for isolation
Context confusion:
- Each session is independent
- Explicitly share relevant context via copy-paste
Too many sessions:
- Start with 2, add more only if needed
- More isn't always better
When to Use Multi-Claude
| Scenario | Recommendation |
|---|---|
| Quick code review | Yes - fresh perspective helps |
| Large refactoring | Maybe - coordinate carefully |
| Parallel independent features | Yes - saves time |
| Debugging a single issue | No - one focused session better |
| Security audit | Yes - multiple reviewers catch more |
Stretch Goals
If you finish early:
- Try the Devil's Advocate pattern on an architecture decision
- Set up git worktrees and work on two feature branches
- Create a "review checklist" command for the Reviewer Claude
Deliverables
At the end of this lab, you should have:
- Experience running parallel Claude sessions
- Code reviewed and improved by a second Claude
- Understanding of when multi-Claude helps
- Workflow patterns for your team
Next Steps
After completing this lab, move on to Lab 3.6: CI/CD & Headless Mode.