stablyai/orca · warning · Error

SSH connection is reconnecting — please try again in a momen

Error message

SSH connection is reconnecting — please try again in a moment

What it means

Thrown by importExternalPathsSsh() when the connection for connectionId exists but conn.getState().status === 'reconnecting'. The connection object is present and actively trying to re-establish, so the import is rejected as transient rather than failed. The message asks the caller to retry shortly.

Source

Thrown at src/main/ipc/filesystem-import-ssh.ts:37

  sourcePaths: string[],
  destDir: string,
  connectionId: string,
  options?: { ensureDir?: boolean; assertCurrent?: () => void }
): Promise<{ results: ImportItemResult[] }> {
  if (sourcePaths.length === 0) {
    return { results: [] }
  }

  const connManager = getSshConnectionManager()
  const conn = connManager?.getConnection(connectionId)
  if (!conn) {
    throw new Error(`No SSH connection for "${connectionId}"`)
  }

  const state = conn.getState()
  if (state.status !== 'connected') {
    if (state.status === 'reconnecting') {
      throw new Error('SSH connection is reconnecting — please try again in a moment')
    }
    throw new Error('SSH connection is not active — please reconnect and try again')
  }

  const provider = requireSshFilesystemProvider(connectionId)

  if (options?.ensureDir) {
    // Why: terminal-drop staging needs `${worktree}/.orca/drops` to exist
    // before the first upload. .orca/ is reserved as Orca-owned remote state;
    // see docs/terminal-drop-ssh.md.
    await ensureDropStagingDir(provider, destDir, options.assertCurrent)
  }

  const results: ImportItemResult[] = []
  const reservedNames = new Set<string>()
  if (!provider.openFileUploadSession) {
    throw new Error('Remote file upload is unavailable. Reconnect the SSH target and retry.')
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Wait briefly and retry the import — the reconnect typically completes within seconds.
  2. If it persists, manually click Reconnect on the SSH target, then retry.
  3. Surface the 'reconnecting' status in the UI so the user waits rather than retrying in a tight loop.
Defensive patterns

Strategy: retry

Validate before calling

// Check state before importing; if reconnecting, wait briefly
import { getSshConnectionManager } from './ssh'
function connectionStatus(connectionId: string): string | undefined {
  return getSshConnectionManager()?.getConnection(connectionId)?.getState().status
}

Try / catch

async function importWithReconnectRetry(sources, dest, connId, opts) {
  try {
    return await importExternalPathsSsh(sources, dest, connId, opts)
  } catch (e) {
    if (e instanceof Error && /reconnecting/i.test(e.message)) {
      await new Promise(r => setTimeout(r, 1500))
      return importExternalPathsSsh(sources, dest, connId, opts)
    }
    throw e
  }
}

Prevention

When it happens

Trigger: The SSH transport dropped and the connection manager is mid-reconnect (status 'reconnecting') at the instant importExternalPathsSsh reads conn.getState(). This commonly happens during network blips or SSH server-side keepalive resets.

Common situations: Network interruption on the SSH link; server-side idle timeout triggered a reconnect; a hub/relay handoff is in progress; the user clicked import immediately after a disconnect visible in the UI.

Related errors


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