paperclipai/paperclip · error
device-login export: refused a symlink or a non-regular auth
Error message
device-login export: refused a symlink or a non-regular auth.json
What it means
Error "device-login export: refused a symlink or a non-regular auth.json" thrown in paperclipai/paperclip.
Source
Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:189
}
await chmod(dir, PRIVATE_DIR_MODE);
return;
}
await mkdir(dir, { mode: PRIVATE_DIR_MODE });
await chmod(dir, PRIVATE_DIR_MODE);
}
/**
* Rejects an existing `auth.json` that is a symlink or a non-regular file. An
* absent file is the normal first-install case.
*/
async function assertAuthPathIsRegularOrAbsent(authPath: string): Promise<void> {
const existing = await lstat(authPath).catch((error: NodeJS.ErrnoException) => {
if (error.code === "ENOENT") return null;
throw error;
});
if (existing && (existing.isSymbolicLink() || !existing.isFile())) {
throw new Error("device-login export: refused a symlink or a non-regular auth.json");
}
}
export interface InstallDeviceLoginCredentialInput {
/** The sandbox `auth.json` bytes read back from the login sandbox. */
sandboxAuthBytes: Buffer;
/** The run-scoped proof home from {@link deriveProofHome}. */
proofHome: string;
/** A non-leaking progress sink. It receives only fixed status lines. */
log: (line: string) => void | Promise<void>;
env?: NodeJS.ProcessEnv;
companyId?: string;
}
/**
* Installs the sandbox credential into the run-scoped proof home. Seeds an empty
* home. Applies a strictly-newer, same-identity update to a non-empty home.
* Keeps the home otherwise. Enforces Control 2 before any write: the targetView on GitHub (pinned to 120ae5428f)
Solutions
- Ensure auth.json is a regular file (not a symlink) and retry the export.
When it happens
Trigger: Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:189 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/d83988c93ab4614e.
Report an issue: GitHub.