paperclipai/paperclip · error

This command requires --yes when not running in an…

Error message

This command requires --yes when not running in an interactive terminal.

What it means

confirmDangerousAction needs a TTY to ask its yes/no confirmation; without --yes in a non-interactive terminal the destructive action is refused outright.

Solutions

  1. Re-run with --yes in non-interactive environments, or run interactively to confirm.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/client/skills.ts:1013 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/9f652ff5c00f26b9. Report an issue: GitHub.

Appendix: 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 120ae5428f)