{"record":{"id":"d83988c93ab4614e","repo":"paperclipai/paperclip","slug":"device-login-export-refused-a-symlink-or-a-non-re","errorCode":null,"errorMessage":"device-login export: refused a symlink or a non-regular auth.json","messagePattern":"device-login export: refused a symlink or a non-regular auth\\.json","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/codex-local/src/server/device-login-export.ts","lineNumber":189,"sourceCode":"    }\n    await chmod(dir, PRIVATE_DIR_MODE);\n    return;\n  }\n  await mkdir(dir, { mode: PRIVATE_DIR_MODE });\n  await chmod(dir, PRIVATE_DIR_MODE);\n}\n\n/**\n * Rejects an existing `auth.json` that is a symlink or a non-regular file. An\n * absent file is the normal first-install case.\n */\nasync function assertAuthPathIsRegularOrAbsent(authPath: string): Promise<void> {\n  const existing = await lstat(authPath).catch((error: NodeJS.ErrnoException) => {\n    if (error.code === \"ENOENT\") return null;\n    throw error;\n  });\n  if (existing && (existing.isSymbolicLink() || !existing.isFile())) {\n    throw new Error(\"device-login export: refused a symlink or a non-regular auth.json\");\n  }\n}\n\nexport interface InstallDeviceLoginCredentialInput {\n  /** The sandbox `auth.json` bytes read back from the login sandbox. */\n  sandboxAuthBytes: Buffer;\n  /** The run-scoped proof home from {@link deriveProofHome}. */\n  proofHome: string;\n  /** A non-leaking progress sink. It receives only fixed status lines. */\n  log: (line: string) => void | Promise<void>;\n  env?: NodeJS.ProcessEnv;\n  companyId?: string;\n}\n\n/**\n * Installs the sandbox credential into the run-scoped proof home. Seeds an empty\n * home. Applies a strictly-newer, same-identity update to a non-empty home.\n * Keeps the home otherwise. Enforces Control 2 before any write: the target","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapters/codex-local/src/server/device-login-export.ts#L171-L207","documentation":"Error \"device-login export: refused a symlink or a non-regular auth.json\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure auth.json is a regular file (not a symlink) and retry the export."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}