paperclipai/paperclip · warning · Error

Refusing to delete without --yes

Error message

Refusing to delete without --yes

What it means

The issue delete subcommand refuses to proceed without --yes, mirroring the goal delete guard. Issues are central control-plane entities, so deletion requires explicit confirmation.

Source

Thrown at cli/src/commands/client/issue.ts:249

        try {
          const ctx = resolveCommandContext(opts);
          const row = await ctx.api.get<Issue>(apiPath`/api/issues/${idOrIdentifier}`);
          printOutput(row, { json: ctx.json });
        } catch (err) {
          handleCommandError(err);
        }
      }),
  );

  addCommonClientOptions(
    issue
      .command("delete")
      .description("Delete an issue")
      .argument("<issueId>", "Issue ID")
      .option("--yes", "Confirm deletion")
      .action(async (issueId: string, opts: IssueDeleteOptions) => {
        try {
          if (!opts.yes) throw new Error("Refusing to delete without --yes");
          const ctx = resolveCommandContext(opts);
          const deleted = await ctx.api.delete<Issue>(apiPath`/api/issues/${issueId}`);
          printOutput(deleted, { json: ctx.json });
        } catch (err) {
          handleCommandError(err);
        }
      }),
  );

  addCommonClientOptions(
    issue
      .command("heartbeat-context")
      .description("Get heartbeat context for an issue")
      .argument("<issueId>", "Issue ID")
      .action(async (issueId: string, opts: BaseClientOptions) => {
        try {
          const ctx = resolveCommandContext(opts);
          const context = await ctx.api.get(apiPath`/api/issues/${issueId}/heartbeat-context`);

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Append --yes: `paperclipai issue delete <issueId> --yes`.
  2. Double-check the issue id before confirming.

Example fix

// before
paperclipai issue delete issue_456
// after
paperclipai issue delete issue_456 --yes
Defensive patterns

Strategy: validation

Validate before calling

if (!opts.yes) throw new Error('Refusing to delete without --yes');

Prevention

When it happens

Trigger: Running `paperclipai issue delete <issueId>` without --yes.

Common situations: Forgot the confirmation flag; running an unfamiliar destructive command.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/ed93eccbb255ef8f. Report an issue: GitHub.