stablyai/orca · warning · Error

Waiting for desktop...

Error message

Waiting for desktop...

What it means

Guard at the top of the `runActionSheetRebase` workflow body. Before resolving a base ref it requires a non-null `client`; if the RPC client is not bound it throws 'Waiting for desktop...' inside `runGitWorkflow`, which records the action as failed. This mirrors the `sendGitRequest` connection guard but is checked explicitly because `resolveMobileBranchCompareBaseRef` needs the raw client.

Source

Thrown at mobile/src/source-control/use-mobile-source-control-action-sheet-runners.ts:72

  }, [runCommitSyncSequence, setShowActionSheet])

  const runActionSheetGitSequence = useCallback(
    async (actionId: string, steps: GitStep[]) => {
      await runGitSequence(actionId, steps)
      setShowActionSheet(false)
    },
    [runGitSequence, setShowActionSheet]
  )

  const runActionSheetGitSync = useCallback(async () => {
    await runGitSync('sync')
    setShowActionSheet(false)
  }, [runGitSync, setShowActionSheet])

  const runActionSheetRebase = useCallback(async () => {
    await runGitWorkflow('rebase', async () => {
      if (!client) {
        throw new Error('Waiting for desktop...')
      }
      const baseRef = await resolveMobileBranchCompareBaseRef(client, worktreeId)
      if (!baseRef) {
        throw new Error('No base branch to rebase onto')
      }
      await sendGitRequest<unknown>('git.rebaseFromBase', { baseRef })
    })
    setShowActionSheet(false)
  }, [client, runGitWorkflow, sendGitRequest, setShowActionSheet, worktreeId])

  return {
    runActionSheetCommit,
    runActionSheetCommitSequence,
    runActionSheetCommitSync,
    runActionSheetGitSequence,
    runActionSheetGitSync,
    runActionSheetRebase
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Disable the Rebase action until `client` is bound and `connState === 'connected'`.
  2. Retry after the connection stabilises.
  3. Re-pair if the connection stays down.
Defensive patterns

Strategy: validation

Validate before calling

// Disable Rebase until the client is bound.
const canRebase = client !== null && connState === 'connected'

Try / catch

try {
  await runActionSheetRebase()
} catch (err) {
  if (err instanceof Error && err.message === 'Waiting for desktop...') {
    setShowActionSheet(true) // keep the sheet open for retry
  } else throw err
}

Prevention

When it happens

Trigger: User taps Rebase in the action sheet while `client` is null (not yet paired, or pairing dropped). Distinct from connState checks because this runner receives `client` directly rather than going through `sendGitRequest`.

Common situations: Tapping Rebase immediately on screen open before the relay handshake completes; connection dropped mid-session and the action sheet is still open.

Related errors


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