paperclipai/paperclip · error

device login failed: the sandbox login command errored.

Error message

device login failed: the sandbox login command errored.

What it means

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.

Solutions

  1. Run the sandbox login command manually to see the error, fix it, and retry device login.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/adapters/codex-local/src/server/device-login-runner.ts:196 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18). Data as JSON: /api/errors/a2442f7ed9656f3c. Report an issue: GitHub.

Appendix: source

Thrown at packages/adapters/codex-local/src/server/device-login-runner.ts:153

      return { outcome: "cancelled", exitCode: null, promptSurfaced };
    }

    const exitCode = raced.exitCode;
    if (exitCode !== 0) {
      log("[paperclip] Device login command ended with a non-zero exit code.");
      return { outcome: "failure", exitCode, promptSurfaced };
    }

    if (onCredential && authPath) {
      const authBytes = await driver.readFile(authPath);
      await onCredential(authBytes);
    }
    log("[paperclip] Device login command ended successfully.");
    return { outcome: "success", exitCode, promptSurfaced };
  } catch {
    // Convert any driver error to a fixed, non-secret error. The original error
    // may embed streamed bytes, so the runner never propagates its message.
    throw new Error("device login failed: the sandbox login command errored.");
  } finally {
    // Always dispose the driver. A dispose error must not leak or mask the
    // result, so the runner swallows it and logs a fixed line.
    try {
      await driver.dispose();
    } catch {
      log("[paperclip] Device login: the sandbox dispose step errored.");
    }
  }
}

View on GitHub (pinned to a7e689b3c3)