{"record":{"id":"119b2e8e8b84120b","repo":"stablyai/orca","slug":"remote-file-upload-is-unavailable-reconnect-the-s","errorCode":null,"errorMessage":"Remote file upload is unavailable. Reconnect the SSH target and retry.","messagePattern":"Remote file upload is unavailable\\. Reconnect the SSH target and retry\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/filesystem-import-ssh.ts","lineNumber":54,"sourceCode":"    if (state.status === 'reconnecting') {\n      throw new Error('SSH connection is reconnecting — please try again in a moment')\n    }\n    throw new Error('SSH connection is not active — please reconnect and try again')\n  }\n\n  const provider = requireSshFilesystemProvider(connectionId)\n\n  if (options?.ensureDir) {\n    // Why: terminal-drop staging needs `${worktree}/.orca/drops` to exist\n    // before the first upload. .orca/ is reserved as Orca-owned remote state;\n    // see docs/terminal-drop-ssh.md.\n    await ensureDropStagingDir(provider, destDir, options.assertCurrent)\n  }\n\n  const results: ImportItemResult[] = []\n  const reservedNames = new Set<string>()\n  if (!provider.openFileUploadSession) {\n    throw new Error('Remote file upload is unavailable. Reconnect the SSH target and retry.')\n  }\n  options?.assertCurrent?.()\n  const uploadSession = await provider.openFileUploadSession()\n  // Why: filename legality follows the remote filesystem, not the client's OS.\n  const remotePathFlavor: RemotePathFlavor = isWindowsAbsolutePathLike(destDir)\n    ? 'windows'\n    : 'posix'\n  try {\n    for (const sourcePath of sourcePaths) {\n      const result = await importOneSourceSsh(\n        provider,\n        uploadSession,\n        sourcePath,\n        destDir,\n        reservedNames,\n        remotePathFlavor,\n        options?.assertCurrent\n      )","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/filesystem-import-ssh.ts#L36-L72","documentation":"Thrown by importExternalPathsSsh() after a provider is acquired when provider.openFileUploadSession is undefined. Upload sessions are an optional capability on IFilesystemProvider: not every transport can stream file uploads. The message mirrors the download-folder case and points the user at reconnecting, since a fresh full-capability provider normally registers openFileUploadSession.","triggerScenarios":"requireSshFilesystemProvider returns a provider whose openFileUploadSession capability is absent — a limited/relay/system-SSH transport variant, or a provider registered during a degraded reconnect.","commonSituations":"Reconnect negotiated a transport that lacks upload session support; client/host capability version skew; the connection is using a fallback SSH transport (ProxyJump/FIDO2/system-SSH) that did not wire upload sessions.","solutions":["Click Reconnect on the SSH target to rebuild a provider that supports openFileUploadSession.","If reconnect still lacks the capability, the chosen transport cannot accept uploads — use a supported transport or create the files remotely another way.","Confirm the host-side Orca component version supports upload sessions before retrying."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm the provider supports upload sessions before importing\nimport { getSshFilesystemProvider } from '../providers/ssh-filesystem-dispatch'\nfunction providerCanUpload(connectionId: string): boolean {\n  const p = getSshFilesystemProvider(connectionId)\n  return !!p && typeof p.openFileUploadSession === 'function'\n}","typeGuard":"function providerSupportsUpload(p: unknown): p is { openFileUploadSession: () => Promise<unknown> } {\n  return !!p && typeof (p as any).openFileUploadSession === 'function'\n}","tryCatchPattern":"try {\n  await importExternalPathsSsh(sources, dest, connectionId, opts)\n} catch (e) {\n  if (e instanceof Error && /upload is unavailable/i.test(e.message)) {\n    await reconnectSshTarget(connectionId) // rebuild a full-capability provider, then retry\n  } else throw e\n}","preventionTips":["After reconnect, verify openFileUploadSession exists before offering import.","Match client/host Orca versions so upload-session capability is present.","Prefer transports known to support upload sessions for SSH targets that need imports."],"tags":["ssh","capability","upload","provider"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}