git-rebase-stalls-async-post-commit-hook

git-rebase-stalls-async-post-commit-hook is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 569 tokens per session (3,797 once invoked), scanned C, original, MIT.

A Git troubleshooting guide for a rebase, which reapplies commits onto another starting point, getting stuck because an asynchronous post-commit hook keeps running. It also covers leftover rebase state that `git rebase --abort` does not remove.

In plain words
What is it for?
Use it when rebasing multiple commits stalls with “It has been rescheduled,” leaves you in a detached `HEAD`, or reports an existing `rebase-merge` directory after aborting.
Why use it?
It helps explain why a rebase can pause without a merge conflict and why later rebase commands may claim another rebase is still active. It provides a way to diagnose the hook and stale rebase directory involved.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 105 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/git-rebase-stalls-async-post-commit-hook
Any agent
npx skills add wan-huiyan/agent-traffic-control --skill git-rebase-stalls-async-post-commit-hook
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-rebase-stalls-async-post-commit-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/git-rebase-stalls-async-post-commit-hook.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/git-rebase-stalls-async-post-commit-hook)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/git-rebase-stalls-async-post-commit-hook"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/git-rebase-stalls-async-post-commit-hook.svg" alt="Measured on agentmods" height="20"></a>
Per session 569 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,797 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00569 $0.03797
Opus 5 $0.00284 $0.01899
Sonnet 5 $0.00114 $0.00759
Haiku 4.5 $0.00057 $0.00380

Measured 6d ago against content hash d2d0ae7ae01e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

git-rebase-stalls-async-post-commit-hook scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .git/worktrees/<your-worktree>/rebase-merge
plugins/agent-traffic-control/skills/git-rebase-stalls-async-post-commit-hook/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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. Project has an async post-commit hook — confirm with:
    cat .git/hooks/post-commit 2>/dev/null | head -30
    
    Look for & / nohup / ( ... ) & / "running ... in background" / claude -p / npm run spawned non-interactively. The diagnostic signature in the rebase output is the literal string [post-commit] ... running ... in background printed between Rebasing (N/M) lines.

If only (2) matches but the hook is absent, you have a genuine real-conflict or other rebase failure mode — this skill doesn't apply.

Read the full file on GitHub · 355 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 355 lines · 569 tokens per session scan C d2d0ae7ae01e

Subscribe to this mod's changes

git-rebase-stalls-async-post-commit-hook is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 3d ago), licensed MIT. It adds 569 tokens to every session and 3,797 once invoked, about $0.0028 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ql-housekeep

Detect repo-hygiene issues that accumulate during long-running autonomous development (merge-conflict markers, orphan worktrees, CPC-variant duplicates, stale branches, version-manifest drift). Detection-only by default — reports findings, never deletes or modifies without explicit user confirmation.

andyzengmath/quantum-loop · 57 tokens

nazgul:doctor

Run the Nazgul read-only preflight diagnostic — checks jq/gh presence and auth, git-hooks drift, cache-vs-repo plugin version, the bash-vs-zsh hazard, the NAZGULDIR footgun, config-schema staleness, either install mode's .gitignore Nazgul-block drift (stamp and flush-left region), cross-session messaging and Remote…

OrodruinLabs/nazgul · 151 tokens

hotfix

Emergency fix workflow that bypasses normal sprint processes with a full audit trail. Creates hotfix branch, tracks approvals, and ensures the fix is backported correctly.

IdoCohen560/claude-unity-game-studio · 35 tokens

cloudflare-workers-ci-cd

Complete CI/CD guide for Cloudflare Workers using GitHub Actions and GitLab CI. Use for automated testing, deployment pipelines, preview environments, secrets management, or encountering deployment failures, workflow errors, environment configuration issues.

secondsky/claude-skills · 50 tokens

cloudflare-workers-observability

Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors.

secondsky/claude-skills · 47 tokens

cloudflare-workers-dev-experience

Cloudflare Workers local development with Wrangler, Miniflare, hot reload, debugging. Use for project setup, wrangler.jsonc configuration, or encountering local dev, HMR, binding simulation errors.

secondsky/claude-skills · 47 tokens