← ClaudeAtlas

git-rebase-stalls-async-post-commit-hooklisted

Fix `git rebase origin/main` (or any multi-commit rebase) silently stalling mid-replay with `hint: pick <SHA> ... It has been rescheduled; To edit the command before continuing, please edit the todo list first` output, leaving a stuck `.git/worktrees/<name>/rebase-merge/` directory that `git rebase --abort` does NOT clear. Use when: (1) you ran `git rebase origin/main` on a branch with N commits to replay, (2) the rebase output shows partial progress (`Rebasing (1/N)... Rebasing (2/N)...`) then hangs or returns with `It has been rescheduled` hint for a specific commit SHA, (3) `git status` reports `## HEAD (no branch)` (detached), (4) `git rebase --abort` returns silently but the next `git rebase` reports `fatal: It seems that there is already a rebase-merge directory`, (5) the project has an async `post-commit` hook that spawns a long-running subprocess in background (the canonical signature is `[post-commit] ... running ... in background` printed during the rebase output, OR a `.git/hooks/post-commit` that
wan-huiyan/agent-traffic-control · ★ 2 · Code & Development · score 79
Install: claude install-skill wan-huiyan/agent-traffic-control
# `git rebase` stalls mid-replay because async post-commit hook holds resources ## Problem You run `git rebase origin/main` on a branch with several commits ahead. The rebase begins applying commits one by one and partway through prints output like: ``` Rebasing (1/10)Rebasing (2/10)...Rebasing (5/10) [post-commit] Python files changed — running doc update in background... hint: hint: pick 8b625b6b8b... fix(runbook): split verification probe ... hint: hint: It has been rescheduled; To edit the command before continuing, please hint: edit the todo list first: hint: hint: git rebase --edit-todo hint: git rebase --continue ``` `git status` reports `## HEAD (no branch)` (detached HEAD), the rebase is not complete, but no merge conflict was raised. `git rebase --abort` appears to succeed silently, but the next `git rebase` reports: ``` fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase. ``` You're stuck. The branch can't move forward and the rebase machinery won't reset cleanly. ## Trigger conditions All of these together: 1. Multi-commit rebase (`origin/main` is several commits ahead). 2. Output contains "rescheduled" hint for a specific commit SHA, NOT a `CONFLICT (content):` line. 3. `git status` reports detached HEAD post-stall. 4. `git rebase --abort` runs silently but does NOT clear `.git/worktrees/<name>/rebase-merge/` (or `.git/rebase-merge/` for non-worktree repos). 5. Proje