paperclipai/paperclip · error · Error
Pass exactly one of --approve, --reject, or…
Error message
Pass exactly one of --approve, --reject, or --request-changes.
What it means
reviewDecisionFromOptions counted the decision flags and found zero or more than one of --approve/--reject/--request-changes; a review must carry exactly one decision.
Solutions
- Pass exactly one of --approve, --reject, or --request-changes.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/pipelines.ts:741 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/d9402624fc831ee4.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/pipelines.ts:741
}
function looksLikeUuid(value: string): boolean {
return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
}
function exactlyOneFlag(first: boolean | undefined, second: boolean | undefined, firstName: string, secondName: string): string {
if (Boolean(first) === Boolean(second)) throw new Error(`Pass exactly one of ${firstName} or ${secondName}.`);
return first ? firstName : secondName;
}
function reviewDecisionFromOptions(opts: ReviewOptions): "approve" | "reject" | "request_changes" {
const selected = [
opts.approve ? { flag: "--approve", decision: "approve" as const } : null,
opts.reject ? { flag: "--reject", decision: "reject" as const } : null,
opts.requestChanges ? { flag: "--request-changes", decision: "request_changes" as const } : null,
].filter((item): item is NonNullable<typeof item> => item !== null);
if (selected.length !== 1) {
throw new Error("Pass exactly one of --approve, --reject, or --request-changes.");
}
return selected[0]!.decision;
}
function printPipeline(row: PipelineDetail | PipelineSummary | null, ctx: ResolvedClientContext): void {
if (!row) return printOutput(null, { json: ctx.json });
if (ctx.json) return printOutput(row, { json: true });
console.log(formatPipeline(row));
if ("stages" in row && row.stages?.length) {
console.log(pc.bold("Stages"));
row.stages.forEach((stage) => {
console.log(` ${formatInlineRecord({
id: stage.id,
key: stage.key,
name: stage.name,
kind: stage.kind,
position: stage.position,
})}`);View on GitHub (pinned to 120ae5428f)