deadpool-runner
v0.1.0
Published
Retry failing commands with an ACP-powered fixer while preserving normal script output.
Maintainers
Readme
deadpool-runner
deadpool-runner is a small Node utility that wraps any script, streams its output through unchanged, and when the script fails it asks an ACP-backed fixer to repair the repo before retrying.
Today it ships with a built-in Codex client. The runner is structured around a client interface so additional ACP clients can be added without changing the retry engine.
Pull requests are welcome.
What It Does
- Runs any command from the current repo, or from explicit CLI arguments
- Mirrors
stdoutandstderrto your terminal while also capturing them for failure analysis - On non-zero exit, sends the failure context to an ACP client
- Retries the command after the fixer runs, up to a configurable maximum
- Accepts repo-specific context via
deadpool-runner.config.tsand/or CLI flags
Install
From npm:
npm install -g deadpool-runnerOr run it without installing globally:
npx deadpool-runner --helpFor local development in this repo:
vp install
vp run build
vp link . -- --globalThat exposes the default binary as dp-run.
Quick Start
Create a deadpool-runner.config.ts in the repo you want to protect:
import type { DeadpoolRunnerConfig } from "deadpool-runner";
const config: DeadpoolRunnerConfig = {
command: "vp test",
retries: 3,
initialPrompt: `
This repo uses Vite+.
Use vp commands instead of npm, pnpm, or yarn directly.
Fix the root cause instead of suppressing errors.
`.trim(),
acpClient: {
name: "codex",
model: "gpt-5.4",
fullAuto: true,
},
};
export default config;Then run:
dp-runOr skip the config file and pass the command directly:
dp-run --retries 2 --prompt "This is a Node CLI package. Keep fixes minimal." -- vp testCLI
dp-run [options] -- <command> [args...]Options:
--config <path>: explicit config file path--cwd <path>: working directory for the wrapped command and ACP client--client <name>: ACP client name, currentlycodex--retries <n>: maximum fixer attempts after the initial failure--prompt <text>: seed prompt with repo context for the fixer--model <name>: model override for the built-in Codex client--color <mode>:auto,always, orneverforcodex exec
Config
The runner looks for deadpool-runner.config.ts, deadpool-runner.config.mts, deadpool-runner.config.js, or deadpool-runner.config.mjs in the working directory unless --config is passed.
import type { DeadpoolRunnerConfig } from "deadpool-runner";
export default {
command: ["vp", "test"],
retries: 3,
initialPrompt: "The repo uses strict TypeScript and Vite+ commands.",
maxOutputChars: 20000,
env: {
CI: "1",
},
acpClient: {
name: "codex",
model: "gpt-5.4",
fullAuto: true,
color: "never",
extraArgs: ["--skip-git-repo-check"],
},
} satisfies DeadpoolRunnerConfig;Built-In Codex Client
When a command fails, the built-in Codex client runs codex exec in the target repo and gives it:
- The failing command
- The attempt number and retry budget
- The seed prompt from config or CLI
- Captured stdout/stderr, truncated to the configured limit
By default the client runs with --full-auto. You can switch to a custom argument set through acpClient.extraArgs.
Development
vp install
vp check
vp test
vp run build