{"record":{"id":"a2442f7ed9656f3c","repo":"paperclipai/paperclip","slug":"device-login-failed-the-sandbox-login-command-err","errorCode":null,"errorMessage":"device login failed: the sandbox login command errored.","messagePattern":"device login failed: the sandbox login command errored\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/codex-local/src/server/device-login-runner.ts","lineNumber":153,"sourceCode":"      return { outcome: \"cancelled\", exitCode: null, promptSurfaced };\n    }\n\n    const exitCode = raced.exitCode;\n    if (exitCode !== 0) {\n      log(\"[paperclip] Device login command ended with a non-zero exit code.\");\n      return { outcome: \"failure\", exitCode, promptSurfaced };\n    }\n\n    if (onCredential && authPath) {\n      const authBytes = await driver.readFile(authPath);\n      await onCredential(authBytes);\n    }\n    log(\"[paperclip] Device login command ended successfully.\");\n    return { outcome: \"success\", exitCode, promptSurfaced };\n  } catch {\n    // Convert any driver error to a fixed, non-secret error. The original error\n    // may embed streamed bytes, so the runner never propagates its message.\n    throw new Error(\"device login failed: the sandbox login command errored.\");\n  } finally {\n    // Always dispose the driver. A dispose error must not leak or mask the\n    // result, so the runner swallows it and logs a fixed line.\n    try {\n      await driver.dispose();\n    } catch {\n      log(\"[paperclip] Device login: the sandbox dispose step errored.\");\n    }\n  }\n}\n","sourceCodeStart":135,"sourceCodeEnd":164,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/packages/adapters/codex-local/src/server/device-login-runner.ts#L135-L164","documentation":"Fail-closed outcome of the device-login runner: the sandboxed device login command exited with a non-zero exit code before an auth file appeared, so no credential can be read and delivered via onCredential; the run is reported as a failure with the exit code.","triggerScenarios":"Thrown at packages/adapters/codex-local/src/server/device-login-runner.ts:196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the sandbox login command manually to see the error, fix it, and retry device login."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}