Skip to main content
agentsSource-backed

Claude Code Worktree Coordinator Agent

Source-backed agent that coordinates parallel Claude Code sessions across git worktrees, planning isolation, base-branch choice, gitignored-file copying, subagent worktrees, and cleanup so parallel edits do not collide, grounded in the official Claude Code worktrees docs.

by JPette1783·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/worktrees, https://github.com/JSONbored/awesome-claude/blob/main/content/agents/claude-code-worktree-coordinator-agent.mdx
Safety notes
This agent plans worktree coordination; it does not delete branches or worktrees without your direction., Removing a worktree with uncommitted changes discards them; recommend committing or stashing before cleanup., Copying gitignored files like .env into worktrees duplicates secrets into more locations; scope .worktreeinclude carefully.
Privacy notes
A .worktreeinclude that copies env or secrets files spreads those secrets to each worktree; keep the list minimal., Worktrees share the repository history and remote; pushing from a worktree publishes commits the same as the main checkout., Add the worktrees directory to .gitignore so worktree contents do not appear as untracked files.
Author
JPette1783
Submitted by
JPette1783
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

3 prerequisites to line up before setup. Have accounts and credentials ready first.

0/3 ready
Account & credentials1Configuration1General1

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 4 risk areas. Review closely: credentials & tokens, network access.

4 areas
  • SafetyGeneralThis agent plans worktree coordination; it does not delete branches or worktrees without your direction.
  • SafetyGeneralRemoving a worktree with uncommitted changes discards them; recommend committing or stashing before cleanup.
  • SafetyCredentials & tokensCopying gitignored files like .env into worktrees duplicates secrets into more locations; scope .worktreeinclude carefully.
  • PrivacyCredentials & tokensA .worktreeinclude that copies env or secrets files spreads those secrets to each worktree; keep the list minimal.
  • PrivacyNetwork accessWorktrees share the repository history and remote; pushing from a worktree publishes commits the same as the main checkout.
  • PrivacyLocal filesAdd the worktrees directory to .gitignore so worktree contents do not appear as untracked files.

Safety notes

  • This agent plans worktree coordination; it does not delete branches or worktrees without your direction.
  • Removing a worktree with uncommitted changes discards them; recommend committing or stashing before cleanup.
  • Copying gitignored files like .env into worktrees duplicates secrets into more locations; scope .worktreeinclude carefully.

Privacy notes

  • A .worktreeinclude that copies env or secrets files spreads those secrets to each worktree; keep the list minimal.
  • Worktrees share the repository history and remote; pushing from a worktree publishes commits the same as the main checkout.
  • Add the worktrees directory to .gitignore so worktree contents do not appear as untracked files.

Prerequisites

  • A git repository where you want to run multiple Claude Code sessions in parallel.
  • Workspace trust accepted by running Claude Code once in the directory before using the worktree flag.
  • Knowledge of which gitignored files (such as .env) each worktree needs.

Schema details

Install type
copy
Troubleshooting
No
Full copyable content
## Content

Claude Code Worktree Coordinator Agent is a reusable agent prompt for running
multiple Claude Code sessions in parallel without their edits colliding. It plans
worktree isolation, base-branch choice, gitignored-file copying, subagent
worktrees, and cleanup, based on how Claude Code's worktree support actually
works.

Use it when you want one session building a feature and another fixing a bug at
the same time, or when coordinating subagents that edit files in parallel.

## Agent Prompt

You are a git worktree coordinator for parallel Claude Code sessions. Plan
isolation so parallel work does not collide, and keep cleanup safe. Use the
official Claude Code worktrees documentation as your reference.

Coordination workflow:

1. Plan sessions. Decide which tasks run in their own worktree. Each worktree is a
   separate working directory on its own branch sharing the same repository.
2. Base branch. Choose whether worktrees branch from the default remote branch
   (fresh) or from local HEAD, depending on whether sessions need in-progress
   work.
3. Local files. Identify gitignored files each worktree needs (like .env) and plan
   a minimal `.worktreeinclude`, knowing only gitignored matches are copied.
4. Subagent isolation. For subagents that edit files in parallel, plan worktree
   isolation so their edits do not conflict, and expect empty ones to be cleaned
   up automatically.
5. Cleanup. Plan cleanup: clean worktrees are removed automatically, but ones with
   uncommitted changes prompt to keep or remove. Recommend committing first.
6. Hygiene. Ensure the worktrees directory is gitignored.

Output contract:

- Session/worktree plan with base-branch choices.
- `.worktreeinclude` recommendation (minimal, secrets-aware).
- Subagent isolation plan.
- Cleanup plan that avoids losing uncommitted work.

## Features

- Plans isolated parallel sessions using git worktrees.
- Chooses fresh vs HEAD base branches per task.
- Designs a minimal, secrets-aware .worktreeinclude.
- Coordinates subagent worktrees and safe cleanup.

## Use Cases

- Run feature and bugfix sessions in parallel without collisions.
- Isolate parallel subagents so their edits do not conflict.
- Copy only the needed gitignored files into each worktree.
- Clean up worktrees without losing uncommitted changes.

## Source Notes

- Claude Code creates worktrees under the repository (by default on a new branch),
  branching from the default remote branch unless configured to use local HEAD.
- A `.worktreeinclude` copies only gitignored matches into new worktrees,
  subagents can be isolated with worktrees, and clean worktrees are auto-removed
  while ones with changes prompt before removal.

## Duplicate Check

The content tree and open PRs were checked for worktree, parallel session, and
coordination agents. No worktree coordinator exists. This entry is distinct: it is
an `agents` prompt focused on coordinating parallel Claude Code sessions across
git worktrees.

## Editorial Disclosure

Submitted as an independent community agent entry by `JPette1783`, based on
public Claude Code documentation. No paid placement, referral, or affiliate
relationship.

## Sources

- Claude Code worktrees documentation: https://code.claude.com/docs/en/worktrees
- Claude Code skills documentation: https://code.claude.com/docs/en/skills
- Claude Code features overview: https://code.claude.com/docs/en/features-overview

About this resource

Content

Claude Code Worktree Coordinator Agent is a reusable agent prompt for running multiple Claude Code sessions in parallel without their edits colliding. It plans worktree isolation, base-branch choice, gitignored-file copying, subagent worktrees, and cleanup, based on how Claude Code's worktree support actually works.

Use it when you want one session building a feature and another fixing a bug at the same time, or when coordinating subagents that edit files in parallel.

Agent Prompt

You are a git worktree coordinator for parallel Claude Code sessions. Plan isolation so parallel work does not collide, and keep cleanup safe. Use the official Claude Code worktrees documentation as your reference.

Coordination workflow:

  1. Plan sessions. Decide which tasks run in their own worktree. Each worktree is a separate working directory on its own branch sharing the same repository.
  2. Base branch. Choose whether worktrees branch from the default remote branch (fresh) or from local HEAD, depending on whether sessions need in-progress work.
  3. Local files. Identify gitignored files each worktree needs (like .env) and plan a minimal .worktreeinclude, knowing only gitignored matches are copied.
  4. Subagent isolation. For subagents that edit files in parallel, plan worktree isolation so their edits do not conflict, and expect empty ones to be cleaned up automatically.
  5. Cleanup. Plan cleanup: clean worktrees are removed automatically, but ones with uncommitted changes prompt to keep or remove. Recommend committing first.
  6. Hygiene. Ensure the worktrees directory is gitignored.

Output contract:

  • Session/worktree plan with base-branch choices.
  • .worktreeinclude recommendation (minimal, secrets-aware).
  • Subagent isolation plan.
  • Cleanup plan that avoids losing uncommitted work.

Features

  • Plans isolated parallel sessions using git worktrees.
  • Chooses fresh vs HEAD base branches per task.
  • Designs a minimal, secrets-aware .worktreeinclude.
  • Coordinates subagent worktrees and safe cleanup.

Use Cases

  • Run feature and bugfix sessions in parallel without collisions.
  • Isolate parallel subagents so their edits do not conflict.
  • Copy only the needed gitignored files into each worktree.
  • Clean up worktrees without losing uncommitted changes.

Source Notes

  • Claude Code creates worktrees under the repository (by default on a new branch), branching from the default remote branch unless configured to use local HEAD.
  • A .worktreeinclude copies only gitignored matches into new worktrees, subagents can be isolated with worktrees, and clean worktrees are auto-removed while ones with changes prompt before removal.

Duplicate Check

The content tree and open PRs were checked for worktree, parallel session, and coordination agents. No worktree coordinator exists. This entry is distinct: it is an agents prompt focused on coordinating parallel Claude Code sessions across git worktrees.

Editorial Disclosure

Submitted as an independent community agent entry by JPette1783, based on public Claude Code documentation. No paid placement, referral, or affiliate relationship.

Sources

Source citations

Add this badge to your README

Show that Claude Code Worktree Coordinator Agent is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/agents/claude-code-worktree-coordinator-agent.svg)](https://heyclau.de/entry/agents/claude-code-worktree-coordinator-agent)

How it compares

Claude Code Worktree Coordinator Agent side by side with its closest alternative on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

Source-backed agent that coordinates parallel Claude Code sessions across git worktrees, planning isolation, base-branch choice, gitignored-file copying, subagent worktrees, and cleanup so parallel edits do not collide, grounded in the official Claude Code worktrees docs.

Open dossier

A reusable agent prompt for running a fleet of Claude Code background sessions from agent view (opened with the agents command). It triages which sessions need input, which are still working, and which have finished, then decides what to dispatch next, which to answer, and which to stop.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backed
SubmitterJPette1783JPette1783
Install riskReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryagentsagents
SourceSource-backedSource-backed
AuthorJPette1783JPette1783
Added2026-06-052026-06-05
Platforms
Harness
Source repo
Safety notesThis agent plans worktree coordination; it does not delete branches or worktrees without your direction. Removing a worktree with uncommitted changes discards them; recommend committing or stashing before cleanup. Copying gitignored files like .env into worktrees duplicates secrets into more locations; scope .worktreeinclude carefully.This agent prioritizes and routes attention across sessions; it does not bypass each session's own permissions. Background sessions keep running without a terminal attached; ensure each was dispatched with appropriate scope and permissions. Prefer answering or stopping a stuck session over force actions, and review completed sessions before merging their work.
Privacy notesA .worktreeinclude that copies env or secrets files spreads those secrets to each worktree; keep the list minimal. Worktrees share the repository history and remote; pushing from a worktree publishes commits the same as the main checkout. Add the worktrees directory to .gitignore so worktree contents do not appear as untracked files.Agent view shows live session activity and working directories; restrict who can view and dispatch sessions. Each session sends its own context to the model provider; dispatch only tasks whose context is acceptable to share. Background sessions may isolate file edits in worktrees; review their diffs before integrating.
Prerequisites
  • A git repository where you want to run multiple Claude Code sessions in parallel.
  • Workspace trust accepted by running Claude Code once in the directory before using the worktree flag.
  • Knowledge of which gitignored files (such as .env) each worktree needs.
  • Claude Code with agent view available (opened with the agents command) and one or more background sessions.
  • A queue of tasks suitable for background dispatch.
  • Knowledge of which tasks are safe to run in parallel and which need close attention.
Install
Config
Citations
ClaimUnclaimedUnclaimed
Open in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.