paperclipai/paperclip · error · Error
CLI auth challenge was cancelled.
Error message
CLI auth challenge was cancelled.
What it means
Thrown by loginBoardCli() when the polled challenge status is `cancelled`. The CLI created a cli-auth challenge, printed/approval-opened the URL, and while polling /api/cli-auth/{id}/status the server reported status === "cancelled" — meaning a board operator explicitly rejected the CLI login request, or it was cancelled server-side. This is an intentional terminal state, not a bug.
Source
Thrown at cli/src/client/board-auth.ts:278
authorization: `Bearer ${challenge.boardApiToken}`,
},
},
);
setStoredBoardCredential({
apiBase,
token: challenge.boardApiToken,
userId: me.userId ?? me.user?.id ?? null,
storePath: params.storePath,
});
return {
token: challenge.boardApiToken,
approvalUrl,
userId: me.userId ?? me.user?.id ?? null,
};
}
if (status.status === "cancelled") {
throw new Error("CLI auth challenge was cancelled.");
}
if (status.status === "expired") {
throw new Error("CLI auth challenge expired before approval.");
}
await sleep(pollMs);
}
throw new Error("CLI auth challenge expired before approval.");
}
export async function revokeStoredBoardCredential(params: {
apiBase: string;
token: string;
}): Promise<void> {
const apiBase = normalizeApiBase(params.apiBase);
await requestJson<{ revoked: boolean }>(`${apiBase}/api/cli-auth/revoke-current`, {
method: "POST",View on GitHub (pinned to 67001ec6eb)
Solutions
- Re-run `paperclipai login` to start a fresh challenge and approve it this time.
- Confirm the approving board user actually has the permissions to approve CLI access for the requested company/instance.
- If cancellations are unexpected, check server logs for who issued the cancel on the challenge id.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await loginBoardCli(params);
} catch (err) {
if (err instanceof Error && err.message === 'CLI auth challenge was cancelled.') {
console.error('Login denied in the board UI. Re-run and approve to continue.');
return;
}
throw err;
} Prevention
- Tell the user the approval URL is single-use and must be approved, not closed.
- In automation, do not leave loginBoardCli polling unattended — wrap it so a denial surfaces cleanly.
- If multiple operators share the instance, coordinate who will approve each login.
When it happens
Trigger: A board user clicked "Cancel" / "Deny" on the approval page while the CLI was polling. Also possible if another session or an admin force-cancels the challenge by id. Distinguished from expiry ([2]/[3]) by the explicit cancelled status.
Common situations: User started `paperclipai login`, changed their mind, and denied it in the board UI. Multiple CLI sessions racing on the same approval page. A board admin revoking a pending login.
Related errors
- Request failed: ${response.status}
- CLI auth challenge expired before approval.
- Environment variable ${envName} is empty or not set.
- Challenge secret is required. Pass --token or --token-env.
- No companies are accessible with this board credential.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/045fb9c23f7e5f9c.
Report an issue: GitHub.