# Credit stall mid orchestration revive collision

> Credit stall mid orchestration revive collision is an open-source agent skill for developer tools. Recovers parallel agent runs stalled by an outage without duplicate work on resume. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision
- **Repository:** https://github.com/wan-huiyan/agent-traffic-control
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** credit-stall-mid-orchestration-revive-collision
- **Collection:** https://github.com/wan-huiyan/agent-traffic-control
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through restarting orchestrated parallel subagents after a billing, credit, MCP or other transient harness failure froze them mid-task. It warns that the original subagents may resume on their own once service returns, which can cause two agents to race on the same branch, pull request or files.

The workflow has the agent check each stalled worker before relaunching anything. It looks at transcript modification times and file sizes, the worktree's commits, uncommitted changes and remote branch, and the pull request state through the GitHub CLI. Based on what it finds, it chooses between restarting, resuming with a work-in-progress brief, pushing and opening a pull request, or leaving the job alone. Resume briefs are written to verify current state on entry and to pivot to follow-up work if the original already finished.

It also covers cleanup after a duplicate pull request is filed against a merged branch, with example GitHub CLI commands for closing it and deleting the remote branch. Use of the skill assumes a git repository with worktrees and the gh command-line tool available.

## When your agent uses it

> Recover gracefully when an Anthropic credit/billing failure stalls multiple in-flight parallel subagents mid-orchestration, then later resolves. Use when: (1) you've dispatched 2+ parallel subagents (Task tool with `run_in_background: true`) and a credit/billing issue, MCP outage, or other transient harness failure has frozen them, (2) the user reports the issue is now resolved and asks you to continue, (3) you're about to relaunch "resume" agents to pick up where stalled originals left off. Defends against the silent-revive trap: when API access is restored, ORIGINAL stalled subagents can auto-resume from where they froze and continue working IN PARALLEL with any "resume" agents you dispatch — leading to two agents racing on the same branch / PR / files, duplicate review comments, or one agent overwriting the other's work. Captures the diagnostic recipe (JSONL mtime + worktree-state inspection, NOT just agent status) and the safe resume pattern (state-aware briefs that detect current state and pivot to value

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/wan-huiyan/agent-traffic-control/tree/HEAD/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision)
- [License: MIT](https://github.com/wan-huiyan/agent-traffic-control/tree/HEAD/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision)

## Features

- **Stall state diagnosis:** Checks transcript activity, worktree commits and remote branch state before relaunching any subagent.
- **State-aware resume briefs:** Explains how to write resume instructions that verify current state and pivot to value-add work if already done.
- **Revive collision prevention:** Guards against an original subagent and a resume agent racing on the same branch or pull request.
- **Duplicate pull request cleanup:** Shows how to close superseded duplicate pull requests and delete their recreated remote branches.
- **Post-merge verification checks:** Provides commands to spot force-push storms, duplicate review comments and late-filed duplicate pull requests.

## Good for

- Resume three parallel coding agents after an API credit outage without duplicating their pull requests
- Check whether stalled background agents already merged their branches before relaunching them
- Close a duplicate pull request that a revived subagent filed after its branch was merged
- Verify that only one agent is pushing to each feature branch after a restart

## Install

### Claude Code

This skill ships in the `agent-traffic-control` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add wan-huiyan/agent-traffic-control
/plugin install agent-traffic-control@wan-huiyan-agent-traffic-control
```

Or copy only this skill to `~/.claude/skills/credit-stall-mid-orchestration-revive-collision`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/credit-stall-mid-orchestration-revive-collision &&
cp -R "$tmp/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision" ~/.claude/skills/credit-stall-mid-orchestration-revive-collision &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/credit-stall-mid-orchestration-revive-collision` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/credit-stall-mid-orchestration-revive-collision` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/credit-stall-mid-orchestration-revive-collision &&
cp -R "$tmp/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision" ~/.agents/skills/credit-stall-mid-orchestration-revive-collision &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/credit-stall-mid-orchestration-revive-collision` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/credit-stall-mid-orchestration-revive-collision` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/credit-stall-mid-orchestration-revive-collision &&
cp -R "$tmp/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision" ~/.cursor/skills/credit-stall-mid-orchestration-revive-collision &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/credit-stall-mid-orchestration-revive-collision` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/wan-huiyan/agent-traffic-control.git --path plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision
```

Or copy the folder to `~/.gemini/skills/credit-stall-mid-orchestration-revive-collision` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/credit-stall-mid-orchestration-revive-collision`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/credit-stall-mid-orchestration-revive-collision &&
cp -R "$tmp/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision" ~/.copilot/skills/credit-stall-mid-orchestration-revive-collision &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/credit-stall-mid-orchestration-revive-collision` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git
```

Then copy `agent-traffic-control/plugins/agent-traffic-control/skills/credit-stall-mid-orchestration-revive-collision` into your agent's skills folder as `credit-stall-mid-orchestration-revive-collision`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Credit stall mid orchestration revive collision trigger?

It applies when two or more parallel subagents were dispatched in background mode and a billing, credit, MCP or other transient failure froze them, after the user reports the issue is resolved and before relaunching resume agents.

### What tools does Credit stall mid orchestration revive collision need?

It relies on git for worktree and branch inspection, the GitHub CLI (gh) for pull request state and cleanup, and standard shell tools such as stat for checking file modification times.

### Does Credit stall mid orchestration revive collision include scripts?

No. The skill is a single SKILL.md file with shell command examples to run manually.

### How do I install Credit stall mid orchestration revive collision in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/credit-stall-mid-orchestration-revive-collision to use it in all your projects, or to .claude/skills/credit-stall-mid-orchestration-revive-collision in one project. Or install the agent-traffic-control plugin, which includes it: /plugin marketplace add wan-huiyan/agent-traffic-control, then /plugin install agent-traffic-control@wan-huiyan-agent-traffic-control.

### Does Credit stall mid orchestration revive collision run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Credit stall mid orchestration revive collision?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Credit stall mid orchestration revive collision?

The closest alternatives to Credit stall mid orchestration revive collision are Take over resume, Dispatched bash agent git checkout clobbers uncommitted edit, Concurrent session checkout clobbers shared worktree, Principle make operations idempotent and Orchestration.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Take over resume](https://ai-powered.com/skills/take-over-resume): Take over resume is an open-source agent skill for developer tools.
- [Dispatched bash agent git checkout clobbers uncommitted edit](https://ai-powered.com/skills/dispatched-bash-agent-git-checkout-clobbers-uncommitted-edit): Dispatched bash agent git checkout clobbers uncommitted edit is an open-source agent skill for developer tools.
- [Concurrent session checkout clobbers shared worktree](https://ai-powered.com/skills/concurrent-session-checkout-clobbers-shared-worktree): Concurrent session checkout clobbers shared worktree is an open-source agent skill for developer tools.
- [Principle make operations idempotent](https://ai-powered.com/skills/principle-make-operations-idempotent): Principle make operations idempotent is an open-source agent skill for developer tools.
- [Orchestration](https://ai-powered.com/skills/orchestration-xiaolai): Orchestration is an open-source agent skill for developer tools.
- [Dispatching parallel agents](https://ai-powered.com/skills/dispatching-parallel-agents): Dispatching parallel agents is an open-source agent skill for developer tools.
- [Control tower](https://ai-powered.com/skills/control-tower): Control tower is an open-source agent skill for developer tools.
- [Claude teams behavior](https://ai-powered.com/skills/claude-teams-behavior): Claude teams behavior is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/credit-stall-mid-orchestration-revive-collision
