stablyai/orca · info · Error

Claude sign-in was cancelled.

Error message

Claude sign-in was cancelled.

What it means

Thrown by runClaudeLoginAndCapture() when loginAbortController.signal.aborted is true at the point the flow checks it (after setup, before/after spawning `claude auth login`). It represents a user-initiated cancellation of the interactive sign-in. The abort can also propagate through the spawned CLI process via the signal.

Source

Thrown at src/main/claude-accounts/service.ts:595

      wslLinuxAuthPath: null
    }
  ): Promise<CapturedClaudeAuth> {
    const tempConfig = this.createTemporaryClaudeConfigDir(location)
    const loginAbortController = new AbortController()
    this.cancelPendingClaudeLogin = () => {
      if (loginAbortController.signal.aborted) {
        return false
      }
      loginAbortController.abort()
      return true
    }
    const previousLegacyKeychain = await readActiveClaudeKeychainCredentials()
    let captured: CapturedClaudeAuth | null = null
    let captureError: unknown = null
    let cleanupError: unknown = null
    try {
      if (loginAbortController.signal.aborted) {
        throw new Error('Claude sign-in was cancelled.')
      }
      await this.runClaudeCommand(['auth', 'login', '--claudeai'], tempConfig, LOGIN_TIMEOUT_MS, {
        signal: loginAbortController.signal,
        keepStdinOpen: true
      })
      this.cancelPendingClaudeLogin = null
      const status = await this.runClaudeCommand(
        ['auth', 'status', '--json'],
        tempConfig,
        STATUS_TIMEOUT_MS,
        { allowFailure: true }
      )
      captured = await this.captureAuthFromConfigDir(
        tempConfig.windowsPath,
        status,
        previousLegacyKeychain
      )
    } catch (error) {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Treat this error as an expected cancellation in the caller (catch and surface a 'cancelled' status, not an error).
  2. Avoid retrying automatically — a cancel is intentional.
  3. Ensure cancelPendingClaudeLogin is only called once (it returns false on a second abort).
  4. If the signal appears aborted unexpectedly, check for an errant abort trigger upstream.

Example fix

// before
if (loginAbortController.signal.aborted) {
  throw new Error('Claude sign-in was cancelled.')
}

// after — caller
try {
  await runClaudeLoginAndCapture()
} catch (error) {
  if (error instanceof Error && error.message === 'Claude sign-in was cancelled.') {
    return { cancelled: true }
  }
  throw error
}
Defensive patterns

Strategy: try-catch

Type guard

function isLoginCancelled(error: unknown): boolean {
  return error instanceof Error && error.message === 'Claude sign-in was cancelled.'
}

Try / catch

try {
  await runClaudeLoginAndCapture()
} catch (error) {
  if (isLoginCancelled(error)) {
    return { cancelled: true }
  }
  throw error
}

Prevention

When it happens

Trigger: The user clicks 'Cancel' during the interactive Claude login, which calls cancelPendingClaudeLogin() -> loginAbortController.abort(). The next check of signal.aborted throws this error.

Common situations: User cancels a long-running OAuth login. A timeout or navigation away triggers cancellation. Programmatic cancel from a parent flow.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/b7ead991d07d2e50. Report an issue: GitHub.