{"record":{"id":"70e55a4bfb0a908d","repo":"stablyai/orca","slug":"unable-to-load-workspace-metadata","errorCode":null,"errorMessage":"Unable to load workspace metadata.","messagePattern":"Unable to load workspace metadata\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mobile/src/agent-history/MobileAgentSessionHistoryPanel.tsx","lineNumber":393,"sourceCode":"    settingsResponse,\n    worktreeResponse\n  ] = await Promise.all([\n    client.sendRequest('repo.list', undefined, { timeoutMs: RESUME_RPC_TIMEOUT_MS }),\n    client\n      .sendRequest('folderWorkspace.list', undefined, { timeoutMs: RESUME_RPC_TIMEOUT_MS })\n      .catch(() => null),\n    client\n      .sendRequest('projectGroup.list', undefined, { timeoutMs: RESUME_RPC_TIMEOUT_MS })\n      .catch(() => null),\n    client\n      .sendRequest('settings.get', undefined, { timeoutMs: RESUME_RPC_TIMEOUT_MS })\n      .catch(() => null),\n    client\n      .sendRequest('worktree.ps', { limit: 10000 }, { timeoutMs: RESUME_RPC_TIMEOUT_MS })\n      .catch(() => null)\n  ])\n  if (!repoResponse.ok) {\n    throw new Error(repoResponse.error?.message || 'Unable to load workspace metadata.')\n  }\n  const repoResult = repoResponse.result as { repos?: MobileAiVaultResumeRepo[] }\n  const folderWorkspaceResult =\n    folderWorkspaceResponse?.ok === true\n      ? (folderWorkspaceResponse.result as {\n          folderWorkspaces?: MobileAiVaultResumeFolderWorkspace[]\n        })\n      : null\n  const projectGroupResult =\n    projectGroupResponse?.ok === true\n      ? (projectGroupResponse.result as { groups?: MobileAiVaultResumeProjectGroup[] })\n      : null\n  const settingsResult =\n    settingsResponse?.ok === true\n      ? (settingsResponse.result as { settings?: MobileAiVaultResumeSettings })\n      : null\n  const worktreeResult =\n    worktreeResponse?.ok === true ? (worktreeResponse.result as { worktrees?: Worktree[] }) : null","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/mobile/src/agent-history/MobileAgentSessionHistoryPanel.tsx#L375-L411","documentation":"Thrown when the mobile AI-vault resume screen's parallel RPC fan-out (`Promise.all` of repo.list, folderWorkspace.list, projectGroup.list, settings.get, worktree.ps) gets a failure on the repo.list call specifically. The other four calls use `.catch(() => null)` so they degrade silently, but repo.list is mandatory — its failure aborts loading with the host's message or this generic fallback.","triggerScenarios":"The `repo.list` RPC returns ok=false (host error, capability missing on older host, network/RPC timeout at RESUME_RPC_TIMEOUT_MS), or the response's error.message is empty so the fallback string is used.","commonSituations":"Connecting to an older Orca host that lacks repo.list, an SSH relay drop mid-request, the host still indexing repos on startup, or an empty error message from the host making the fallback kick in.","solutions":["Upgrade the Orca host to a version that implements repo.list.","Check the SSH/host connection (the resume screen needs a live RPC channel).","Retry after the host finishes initial repo indexing.","If authoring the host method, ensure it always returns a non-empty error.message on failure."],"exampleFix":"// before\nif (!repoResponse.ok) {\n  throw new Error(repoResponse.error?.message || 'Unable to load workspace metadata.')\n}\n\n// after — degrade gracefully on missing capability vs hard error\nif (!repoResponse.ok) {\n  if (repoResponse.error?.code === 'METHOD_NOT_FOUND') {\n    setScreenState({ kind: 'unsupported' })\n    return\n  }\n  throw new Error(repoResponse.error?.message || 'Unable to load workspace metadata.')\n}","handlingStrategy":"try-catch","validationCode":"// Capability pre-check before the fan-out\nconst status = await client.sendRequest('status.get', undefined, { timeoutMs: RESUME_RPC_TIMEOUT_MS })\nif (!status.ok || !((status as RpcSuccess).result as any).capabilities?.includes('repo.list')) {\n  setScreenState({ kind: 'unsupported' }); return\n}","typeGuard":"function isRepoListSuccess(r: RpcSuccess | RpcFailure): r is RpcSuccess & { result: { repos?: MobileAiVaultResumeRepo[] } } {\n  return r.ok\n}","tryCatchPattern":"try {\n  const [repoResponse] = await Promise.all([...])\n  if (!repoResponse.ok) throw new Error(repoResponse.error?.message || 'Unable to load workspace metadata.')\n} catch (err) {\n  setScreenState({ kind: 'error', message: (err as Error).message })\n}","preventionTips":["Gate the resume screen on a status.get capability check first.","Let the four optional RPCs degrade silently (already done via .catch(()=>null)).","Ensure the host always returns a non-empty error.message on repo.list failures."],"tags":["mobile","rpc","resume-screen","filesystem","fallback-message"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}