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.

Ir para a instalação

Informações da origem

Repositório
cajias/claude-skills
Última atividade na origem
20 de julho de 2026 às 07:29
Idioma detectado do SKILL.md
inglês
Estrelas
0
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.