stablyai/orca · error · Error

Remote filesystem unavailable. Reconnect the SSH target…

Error message

Remote filesystem unavailable. Reconnect the SSH target before retrying.

What it means

Thrown by 'hooks:writeIssueCommand' for an SSH repo (repo.connectionId set) when getSshFilesystemProvider(repo.connectionId) returns nothing. The remote filesystem provider is the bridge that writes .orca/issue-command over SSH; its absence means the SSH connection is gone, so writing is refused rather than silently dropping the command.

Solutions

  1. Reconnect the SSH target, then retry the write.
  2. Guard the UI: if getSshFilesystemProvider(repo.connectionId) is falsy, disable Save and show a reconnect prompt.
  3. For local repos this path is not taken; ensure repo.connectionId is not stale.

Example fix

// before
await ipc.invoke('hooks:writeIssueCommand', { repoId, content, hostId })
// after
if (repo.connectionId && !getSshFilesystemProvider(repo.connectionId)) {
  await promptReconnect(repo.connectionId)
}
await ipc.invoke('hooks:writeIssueCommand', { repoId, content, hostId })
Defensive patterns

Strategy: validation

Validate before calling

if (repo.connectionId && !getSshFilesystemProvider(repo.connectionId)) { await promptReconnect(repo.connectionId); return }

Type guard

function hasRemoteFilesystem(connectionId: string | undefined): boolean {
  return !connectionId || Boolean(getSshFilesystemProvider(connectionId))
}

Try / catch

try { await ipc.invoke('hooks:writeIssueCommand', { repoId, content, hostId }) }
catch (e) {
  if (/Remote filesystem unavailable/.test(String((e as Error).message))) await reconnectSsh(repo.connectionId)
  else throw e
}

Prevention

When it happens

Trigger: The SSH target dropped or was disconnected after the repo was opened, then the user edits the issue-command. Also when the SSH provider module is torn down during quit while a write is in flight.

Common situations: Network interruption to the SSH host, SSH agent/keys removed, host rebooted, or the connection was closed from another pane. Reconnecting usually restores the provider.

Related errors


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

Appendix: source

Thrown at src/main/ipc/worktrees.ts:3446

              : ('none' as const)
        }
      }
      return readIssueCommand(repo.path)
    }
  )

  ipcMain.handle(
    'hooks:writeIssueCommand',
    async (_event, args: { repoId: string; content: string; hostId?: ExecutionHostId }) => {
      const repo = getRepoForWorktreeRemoval(store, args.repoId, args.hostId)
      if (!repo || isFolderRepo(repo)) {
        return
      }
      if (repo.connectionId) {
        const issueCommandPath = joinWorktreeRelativePath(repo.path, '.orca/issue-command')
        const fsProvider = getSshFilesystemProvider(repo.connectionId)
        if (!fsProvider) {
          throw new Error(
            'Remote filesystem unavailable. Reconnect the SSH target before retrying.'
          )
        }
        const trimmed = args.content.trim()
        if (!trimmed) {
          await fsProvider.deletePath(issueCommandPath, false).catch((error: unknown) => {
            if (!isENOENT(error)) {
              throw error
            }
          })
          return
        }
        await fsProvider.createDir(joinWorktreeRelativePath(repo.path, '.orca'))
        const gitignorePath = joinWorktreeRelativePath(repo.path, '.gitignore')
        try {
          const result = await fsProvider.readFile(gitignorePath)
          if (!result.isBinary && !/^\.orca\/?$/m.test(result.content)) {
            const separator = result.content.endsWith('\n') ? '' : '\n'

View on GitHub (pinned to 1136503c6a)