{"record":{"id":"0569664f8966609a","repo":"stablyai/orca","slug":"managed-claude-auth-storage-is-not-owned-by-orca-056966","errorCode":null,"errorMessage":"Managed Claude auth storage is not owned by Orca.","messagePattern":"Managed Claude auth storage is not owned by Orca\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/claude-accounts/service.ts","lineNumber":1007,"sourceCode":"              )\n            ],\n            { encoding: 'utf-8', timeout: 5000 }\n          ).trim()\n          if (!canonicalLinuxPath) {\n            throw new Error('Managed Claude auth directory does not exist on disk.')\n          }\n          return toWindowsWslPath(canonicalLinuxPath, wslInfo.distro)\n        } catch (error) {\n          throw new Error('Managed WSL Claude auth storage is outside Orca account storage.', {\n            cause: error\n          })\n        }\n      }\n      if (\n        !existsSync(candidatePath) ||\n        !existsSync(join(candidatePath, '.orca-managed-claude-auth'))\n      ) {\n        throw new Error('Managed Claude auth storage is not owned by Orca.')\n      }\n      return candidatePath\n    }\n\n    this.getManagedAccountsRoot()\n    const accountId = expectedAccountId ?? this.readManagedAuthAccountIdFromPath(candidatePath)\n    if (!accountId || (expectedAccountId && accountId !== expectedAccountId)) {\n      throw new Error('Managed Claude auth directory does not exist on disk.')\n    }\n    const trustedPath = resolveOwnedClaudeManagedAuthPath(accountId, candidatePath, {\n      adoptLegacyMarker: true\n    })\n    if (!trustedPath) {\n      throw new Error('Managed Claude auth storage is not owned by Orca.')\n    }\n    return trustedPath\n  }\n","sourceCodeStart":989,"sourceCodeEnd":1025,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/claude-accounts/service.ts#L989-L1025","documentation":"Thrown in the non-Win32 fallback of assertManagedAuthPath (for UNC paths on non-Windows, or macOS/Linux host-managed auth). It checks that both the candidate directory and its .orca-managed-claude-auth marker file exist on disk via existsSync. If either is missing, the storage is not recognized as Orca-owned.","triggerScenarios":"On a non-win32 host (macOS/Linux), assertManagedAuthPath is called with a path that is a WSL UNC path (parseWslUncPath returned non-null) but process.platform is not 'win32'. The existsSync checks for the directory or marker file fail.","commonSituations":"Running Orca on macOS/Linux with a WSL UNC path in config (cross-platform config copy). The managed auth directory was deleted out-of-band. The marker file was removed by a cleanup tool.","solutions":["Confirm the candidatePath actually exists on the host filesystem.","If on macOS/Linux, ensure the path is a local path, not a WSL UNC path — re-add the account to generate the correct host path.","Restore the .orca-managed-claude-auth marker file with the correct accountId content, or re-add the account."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nimport { join } from 'node:path'\n\nfunction isManagedAuthPresentOnHost(path: string): boolean {\n  return existsSync(path) && existsSync(join(path, '.orca-managed-claude-auth'))\n}","typeGuard":null,"tryCatchPattern":"try {\n  assertManagedAuthPath(candidatePath)\n} catch (error) {\n  if (error instanceof Error && error.message === 'Managed Claude auth storage is not owned by Orca.') {\n    // Recreate marker or re-add account\n  } else { throw error }\n}","preventionTips":["Do not run Orca with WSL UNC paths on non-Windows hosts.","Avoid manually deleting the .orca-managed-claude-auth marker file."],"tags":["claude-accounts","path-validation","filesystem","ownership"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}