paperclipai/paperclip · error · Error

Refusing to delete without --yes

Error message

Refusing to delete without --yes

What it means

Issue delete's action handler refuses to run without the --yes safety flag; a pre-flight guard before the DELETE request.

Solutions

  1. Re-run the issue deletion with --yes to confirm.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


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

Appendix: source

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

        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 3f1d897a7c)