Skip to content

Parallel Sessions

Shopify theme sections are independent files, which means you can run multiple Claude Code sessions simultaneously — each working on a different section. This dramatically reduces total build time.

Git worktrees let you check out multiple branches from the same repo into separate directories. Each worktree runs its own Claude Code session and Shopify dev server without file conflicts.

Terminal window
cd ~/Sites/<project-name>
git add -A && git commit -m "baseline before parallel work"
git worktree add -b feature/hero-section ../theme-hero
git worktree add -b feature/product-grid ../theme-products
git worktree add -b feature/footer ../theme-footer

The -b flag creates the branch and worktree in one step. If the branch already exists (e.g., resuming work), omit -b and swap the argument order: git worktree add ../theme-hero feature/hero-section.

Each worktree needs its own dev server on a different port:

Terminal window
# Terminal 1 — Hero section
cd ../theme-hero
shopify theme dev --port 9292 --store your-store.myshopify.com
# In another tab:
cd ../theme-hero && claude
# Terminal 2 — Product grid
cd ../theme-products
shopify theme dev --port 9293 --store your-store.myshopify.com
# In another tab:
cd ../theme-products && claude
Terminal window
cd ~/Sites/<project-name>
git merge feature/hero-section
git merge feature/product-grid
git worktree remove ../theme-hero
git worktree remove ../theme-products

Each worktree shares git history but has its own files. Update the Playwright preview URL in each session to match the correct port. Start with 2–3 worktrees — the real bottleneck is your bandwidth to review the output.

Enable it by adding to ~/.claude/settings.json:

{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}

For most Shopify theme work, Git Worktrees is the safer and more predictable choice.