# Parallel Claude Code + Git Worktrees: This Setup Will Change How You Ship
<!--
ref: @content/youtube/cole-medin/parallel-claude-code-git-worktrees-this-setup-will-change-how-you-ship
tags: [parallel coding agents, git worktrees, spec-driven development, code review, database branching, self-healing AI layer, token management]
version: 2
updated_at: 2026-11-24T06:05:48.813Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=rFGlJ4oIlhw)**

# Parallel Claude Code + Git Worktrees: This Setup Will Change How You Ship

*Synthesized from Cole Medin, 2026-04-23.*

Cole Medin presents solo, offering a playbook for running many coding-agent sessions in parallel, with Archon as the harness he uses to automate it.

## Core Thesis
Cole Medin argues that running several coding agents at once can multiply output well beyond the roughly 2x a single agent gives, but only if the workflow is built as a system. Each agent needs its own isolated code and database copy, a spec in the form of an issue, a fresh-context reviewer, and a feedback loop that fixes the system after each bug, so that the human does not become the bottleneck.

## Key Insights
- Five pillars: (1) the GitHub issue is the spec; (2) each task gets its own git worktree; (3) planning, building and validating run per worktree; (4) validation happens in a fresh context, where the reviewer never sees the writer's chat; (5) a self-healing layer updates rules, skills, workflows and CLAUDE.md after each defect.
- Claude Code's built-in worktree flag (`--worktree`, or `-w` with a name such as the issue number) creates a worktree under `.claude/worktrees/`. His own script adds dependency installs and Neon database branching, and it works with agents that have no native worktree support.
- Claude Code's Agent Teams feature is described as not reliable enough for true parallel work. Simply starting five instances is not enough, because they overwrite each other's changes.
- Five issues were planned and then implemented to pull requests in parallel. Reviews came back as approve, approve with changes, and request changes (two critical findings in one case).
- A second model reviews the work: the Codex plugin for Claude Code runs an adversarial review of the branch against main, and in his run it flagged attention-needed items on three of the four pull requests he checked.
- Port conflicts are avoided by deriving each worktree's port from its name, starting from base port 4000.
- Each worktree gets its own Neon database branch with copied tables, so one branch's schema changes do not break another. SQLite per worktree is the free local alternative.
- Dependencies are installed up front, so the agent does not spend time on installs during validation.
- Token cost is managed by switching models with `/model` and assigning cheaper models such as Haiku or Sonnet to sub-agents for research or code review.
- The stated goal is to reduce the human's role as reviewer and merger. When review feels slow, that is the signal to add validation to the AI layer.

## Actionable Takeaways
1. Use a GitHub issue as the input to implementation and a pull request as the input to validation.
2. Run each issue in its own worktree with its own dependencies and its own database branch, and assign each a unique port.
3. Review each pull request in a fresh session, optionally with a second model such as Codex, before merging.
4. After each defect, ask the agent what rule, skill, workflow or CLAUDE.md change would have prevented it.
5. Route cheap work such as codebase analysis, web research and some reviews to Haiku or Sonnet.

## Notable Quotes
> "they're going to step on each other's toes constantly, override each other's changes." — Cole Medin

> "Pretty much all of my agentic coding now, my input into any implementation is always a GitHub issue." — Cole Medin

> "it's like asking a kid to grade their own homework." — Cole Medin

---

*Related: `@content/youtube/zazencodes/build-your-own-ai-software-factory-with-claude-code` · `@content/youtube/yifan-bth/how-i-use-ai-git-to-code-3x-faster-real-dev-workflow-with-cursor` · `@content/youtube/yifan-bth/openai-codex-revolutionary-workflow-or-200-mistake` · `@content/youtube/yifan-bth/my-day-to-day-ai-dev-workflow-git-cursor-windsurf-cline-playwright-supabase-replit` · `@content/youtube/cole-medin/the-best-ai-coding-setup-isnt-the-most-autonomous-one-heres-why`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*