paperclipai/paperclip · error
device-login export: refused a non-subscription auth payload
Error message
device-login export: refused a non-subscription auth payload
What it means
Error "device-login export: refused a non-subscription auth payload" thrown in paperclipai/paperclip.
Source
Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:154
}
/**
* Enforces the bounded-size, subscription-only auth shape. Rejects an empty, an
* oversized, an API-key, and a malformed payload. Never puts token bytes into the
* error. The device-login promotion reuses this exact rule, so the export and the
* promotion validate the same way.
*/
export function assertUsableSubscriptionShape(bytes: Buffer): void {
if (bytes.length === 0) {
throw new Error("device-login export: refused an empty auth payload");
}
if (bytes.length > MAX_AUTH_JSON_BYTES) {
throw new Error("device-login export: refused an oversized auth payload");
}
const accountId = readSubscriptionAccountId(bytes);
if (!accountId) {
// Covers an API-key payload, a malformed payload, and an unusable payload.
throw new Error("device-login export: refused a non-subscription auth payload");
}
}
/**
* Ensures one directory exists and is private (mode 0700). Uses `lstat` (not
* `stat`), so the export never writes through a planted symlink. Fails closed
* when the existing path is a symlink or a non-directory.
*/
async function ensurePrivateDir(dir: string): Promise<void> {
const existing = await lstat(dir).catch((error: NodeJS.ErrnoException) => {
if (error.code === "ENOENT") return null;
throw error;
});
if (existing) {
if (existing.isSymbolicLink() || !existing.isDirectory()) {
throw new Error("device-login export: the proof-home path is a symlink or a non-directory");
}
await chmod(dir, PRIVATE_DIR_MODE);View on GitHub (pinned to 120ae5428f)
Solutions
- Sign in with a ChatGPT subscription account so the auth payload is a subscription payload.
When it happens
Trigger: Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:154 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/00d6100b3a5e9b19.
Report an issue: GitHub.