Deadpool Runner mascot

Scripts That Won't Stay Dead.

Deadpool doesn't die. Neither does your command. It fails, it heals, it runs again.

Regeneration factor built in — every red squiggle grows back fixed.

$ npm i -g @arcqdev/deadpool-runner click to copy
1
Run
Your command, unchanged.
2
Bleed
It fails. An AI fixer reads the wound.
3
Heal
Patch, rerun, repeat until green.

Stops on success, retry limit, or when the same wound keeps reopening.

CLI

Wrap anything. Let it heal itself.

# run a command — auto-fixes and reruns on failure
dpr -- vp test

# tune retries and feed the fixer context
dpr --retries 3 --prompt "Vite+ package, fix root causes" -- vp check

# or commit to a config file and just run
dpr

deadpool-runner.config.ts

import { defineDeadpoolRunnerConfig } from "@arcqdev/deadpool-runner";

export default defineDeadpoolRunnerConfig({
  command: ["vp", "test"],
  retries: 5,
  initialPrompt: "Fix the actual regression, not the assertion.",
  acpClient: { name: "codex", model: "gpt-5.4", fullAuto: true },
});
Flag What it does
--retries <n> Max fix attempts (default: 5)
--prompt <text> Context for the AI fixer
--client, --model Pick the ACP backend and model
--sandbox <mode> read-only · workspace-write · danger-full-access
--verbose, -v Stream ACP client logs

SDK

Embed the regeneration loop in your own tooling.

import { runDeadpoolRunner } from "@arcqdev/deadpool-runner";

const result = await runDeadpoolRunner({
  command: ["vp", "test"],
  retries: 2,
  initialPrompt: "TypeScript package. Keep fixes minimal.",
  acpClient: { name: "codex", model: "gpt-5.4" },
});

if (result.code !== 0) throw new Error(`failed: ${result.code}`);

Plug in your own repair backend — the registry is public.

import { registerACPClient, runDeadpoolRunner } from "@arcqdev/deadpool-runner";

registerACPClient("internal-agent", () => ({
  name: "internal-agent",
  async fixFailure(context) {
    return { summary: "Applied internal-agent repair." };
  },
}));

await runDeadpoolRunner({ command: ["vp", "test"], acpClient: { name: "internal-agent" } });