paperclipai/paperclip · warning · Error
Deletion requires --yes.
Error message
Deletion requires --yes.
What it means
The goal delete subcommand refuses to proceed unless --yes is passed. This is a deliberate guard against accidental destructive action.
Source
Thrown at cli/src/commands/client/goal.ts:163
ownerAgentId: parseNullableString(opts.ownerAgentId),
});
const updated = await ctx.api.patch<Goal>(apiPath`/api/goals/${goalId}`, payload);
printOutput(updated, { json: ctx.json });
} catch (err) {
handleCommandError(err);
}
}),
);
addCommonClientOptions(
goal
.command("delete")
.description("Delete a goal")
.argument("<goalId>", "Goal ID")
.option("--yes", "Confirm deletion")
.action(async (goalId: string, opts: GoalDeleteOptions) => {
try {
if (!opts.yes) throw new Error("Deletion requires --yes.");
const ctx = resolveCommandContext(opts);
const deleted = await ctx.api.delete<Goal>(apiPath`/api/goals/${goalId}`);
printOutput(deleted, { json: ctx.json });
} catch (err) {
handleCommandError(err);
}
}),
);
}
function parseNullableString(value: string | undefined): string | null | undefined {
if (value === undefined) return undefined;
return value.trim().toLowerCase() === "null" ? null : value;
}
View on GitHub (pinned to 67001ec6eb)
Solutions
- Append --yes: `paperclipai goal delete <goalId> --yes`.
- If scripting, set --yes explicitly after confirming the id.
Example fix
// before paperclipai goal delete goal_123 // after paperclipai goal delete goal_123 --yes
Defensive patterns
Strategy: validation
Validate before calling
if (!opts.yes) throw new Error('Deletion requires --yes.'); Prevention
- Always pass --yes when scripting goal deletion.
- Confirm the goal id immediately before the destructive call.
When it happens
Trigger: Running `paperclipai goal delete <goalId>` without --yes.
Common situations: Forgot the confirmation flag; running the command for the first time.
Related errors
- Refusing to delete without --yes
- Deletion requires --confirm <secretId> matching the secret I
- This command requires --yes when not running in an interacti
- Aborted.
- Deletion requires --yes.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/b79f4b444786fdfa.
Report an issue: GitHub.