Skip to main content

parallel-subagent-git-worktree-race

Fix/avoid HEAD+index corruption when running parallel Claude Code subagents (Agent tool) that each mutate git (checkout/rebase/reset) in what you THOUGHT were isolated worktrees. Use when: (1) you spawned 2+ agents with isolation:"worktree" to rebase/merge/commit different branches concurrently; (2) an agent reports "I am NOT in an isolated worktree" — `git rev-parse --git-dir` and `--git-common-dir` both point at the same `.git`, `git worktree list` shows a SINGLE worktree, and `--show-toplevel` is the main checkout; (3) a rebase suddenly appears to be running on the WRONG branch, or the reflog shows a branch reset/checkout you didn't issue during your run; (4) two agents' `git checkout` calls swap HEAD/index underneath each other. Covers detection, the serialize-to-one-owner recovery, and a ref-recheck guard pattern.

Aller à l'installation

Informations de source

Dépôt
cajias/claude-skills
Dernière activité de la source
20 juillet 2026 à 07:29
Langue détectée de SKILL.md
anglais
Étoiles
0
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.