paperclipai/paperclip · error · Error
This command requires --yes when not running in an interacti
Error message
This command requires --yes when not running in an interactive terminal.
What it means
Thrown by confirmDangerousAction() when a destructive operation (skills reset/remove, skills agent clear) is invoked without --yes and either stdin or stdout is not a TTY. The function cannot prompt for confirmation in a non-interactive context, so it aborts rather than silently proceeding. This protects CI/agent runs from accidental destructive actions.
Source
Thrown at cli/src/commands/client/skills.ts:1013
async function readBodyFile(filePath: string): Promise<string> {
if (filePath === "-") {
return readStdin();
}
return readFile(filePath, "utf8");
}
async function readStdin(): Promise<string> {
const chunks: Buffer[] = [];
for await (const chunk of process.stdin) {
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));
}
return Buffer.concat(chunks).toString("utf8");
}
async function confirmDangerousAction(yes: boolean | undefined, message: string): Promise<void> {
if (yes) return;
if (!process.stdin.isTTY || !process.stdout.isTTY) {
throw new Error("This command requires --yes when not running in an interactive terminal.");
}
const rl = createInterface({ input, output });
try {
const answer = (await rl.question(`${message} Type yes to continue: `)).trim().toLowerCase();
if (answer !== "yes") {
throw new Error("Aborted.");
}
} finally {
rl.close();
}
}
View on GitHub (pinned to 67001ec6eb)
Solutions
- Add --yes to pre-confirm the destructive action in non-interactive runs.
- If you genuinely need the prompt, run inside an allocated PTY (e.g. `script -qec`).
- For agent automation, set --yes explicitly rather than relying on TTY detection.
Example fix
# before paperclipai skills remove my-skill # after paperclipai skills remove my-skill --yes
Defensive patterns
Strategy: validation
Validate before calling
const isInteractive = Boolean(process.stdin.isTTY && process.stdout.isTTY);
const args = ["skills", "remove", ref];
if (!isInteractive) args.push("--yes");
await run(args); Type guard
function isInteractiveTty(): boolean {
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
} Prevention
- Always pass --yes for destructive commands in CI/agent contexts.
- Detect TTY up front and inject --yes automatically.
- Never assume an interactive prompt in automated runs.
When it happens
Trigger: Running `skills reset`, `skills remove`, or `skills agent clear` in CI, a pipe, a detached agent run, or any context where stdin/stdout is redirected — without passing --yes.
Common situations: Paperclip task/agent runs (PAPERCLIP_TASK_ID set), cron jobs, shell pipelines, Docker exec without a tty, or `nohup`/`&` invocations.
Related errors
- `paperclipai connect` is interactive. For scripts, pass --ap
- Deletion requires --yes.
- Refusing to delete without --yes
- Deletion requires --confirm <secretId> matching the secret I
- Aborted.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/9f652ff5c00f26b9.
Report an issue: GitHub.