stablyai/orca · error · Error

SSH connection is not active — please reconnect and try agai

Error message

SSH connection is not active — please reconnect and try again

What it means

Thrown by importExternalPathsSsh() when the connection exists, is not 'reconnecting', but its state.status is anything other than 'connected' (e.g. 'disconnected', 'error', 'connecting'). Unlike the reconnecting case this is not expected to resolve on its own; the user must actively reconnect. The guard sits before provider acquisition and upload-session creation so no work starts on a dead connection.

Source

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

  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.')
  }
  options?.assertCurrent?.()
  const uploadSession = await provider.openFileUploadSession()

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Click Reconnect on the SSH target and confirm it reaches 'connected', then retry the import.
  2. Resolve the underlying failure (credentials, network, host key) shown in the connection status before reconnecting.
  3. If status was 'connecting', wait for the connection to finish establishing before retrying.
Defensive patterns

Strategy: retry

Validate before calling

// Only import once the connection is fully connected
import { getSshConnectionManager } from './ssh'
function isConnectionActive(connectionId: string): boolean {
  return getSshConnectionManager()?.getConnection(connectionId)?.getState().status === 'connected'
}

Try / catch

try {
  await importExternalPathsSsh(sources, dest, connectionId, opts)
} catch (e) {
  if (e instanceof Error && /not active|reconnect/i.test(e.message)) {
    await reconnectSshTarget(connectionId) // user-driven reconnect, then retry
  } else throw e
}

Prevention

When it happens

Trigger: The SSH connection is in a non-connected, non-reconnecting state (hard disconnect, auth failure, connecting-not-yet-ready) when importExternalPathsSsh runs.

Common situations: The SSH session hard-failed (auth, network down, host unreachable) and the manager moved to 'error'/'disconnected'; the connection is still in initial 'connecting' when the import fired; the host key changed and the connection is stuck.

Related errors


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