stablyai/orca · warning · Error

That Claude account belongs to a different runtime.

Error message

That Claude account belongs to a different runtime.

What it means

Thrown by doSelectAccount() when the requested selection target (runtime/wslDistro) does not match the account's own target. An account created on the host runtime cannot be selected for a WSL target and vice versa; even if wslDistro is provided in the request, it must equal the account's recorded distro. This prevents cross-runtime credential misuse.

Source

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

    }
  }

  private async doSelectAccount(
    accountId: string | null,
    target?: ClaudeAccountSelectionTarget
  ): Promise<ClaudeRateLimitAccountsState> {
    let effectiveTarget = target
    if (accountId !== null) {
      const account = this.requireAccount(accountId)
      const accountTarget = getClaudeSelectionTargetForAccount(account)
      const requestedTarget = normalizeClaudeAccountSelectionTarget(target ?? accountTarget)
      const normalizedAccountTarget = normalizeClaudeAccountSelectionTarget(accountTarget)
      if (
        requestedTarget.runtime !== normalizedAccountTarget.runtime ||
        (requestedTarget.wslDistro !== null &&
          requestedTarget.wslDistro !== normalizedAccountTarget.wslDistro)
      ) {
        throw new Error('That Claude account belongs to a different runtime.')
      }
      effectiveTarget = accountTarget
    }
    const previousSettings = this.store.getSettings()
    const selection = normalizeClaudeRuntimeSelection(previousSettings)
    const outgoingAccountId = getSelectedClaudeAccountIdForTarget(previousSettings, effectiveTarget)
    const nextSelection = setSelectedClaudeAccountIdForTarget(selection, accountId, effectiveTarget)
    this.store.updateSettings({
      activeClaudeManagedAccountId:
        effectiveTarget?.runtime === 'wsl' ? nextSelection.host : accountId,
      activeClaudeManagedAccountIdsByRuntime: nextSelection
    })
    try {
      await this.syncRuntimeAuthWithLivePtyGate(effectiveTarget)
      await this.rateLimits.refreshForClaudeAccountChange(outgoingAccountId, effectiveTarget)
      return this.getSnapshot()
    } catch (error) {
      this.restoreClaudeSettings(previousSettings)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Do not pass an explicit target; let the account's own target be used (effectiveTarget = accountTarget).
  2. Ensure the requested target.runtime and target.wslDistro match the account's stored runtime/distro.
  3. Filter the account picker so only accounts matching the desired target are selectable.
  4. If you need the account under a different runtime, re-add it in that runtime.
Defensive patterns

Strategy: validation

Validate before calling

const accountTarget = getClaudeSelectionTargetForAccount(account)
if (target && (target.runtime !== accountTarget.runtime || (target.wslDistro && target.wslDistro !== accountTarget.wslDistro))) {
  throw new Error('Account/runtime mismatch')
}

Prevention

When it happens

Trigger: Calling selectAccount with a target whose runtime differs from getClaudeSelectionTargetForAccount(account), or supplying a wslDistro that differs from the account's recorded distro.

Common situations: UI passes a stale target from the previous selection. An account was created on host but the UI offers it under a WSL filter. Multiple WSL distros and the wrong one is targeted.

Related errors


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