stablyai/orca · error · Error

Timed out waiting for ${label}; last value: ${JSON.stringify

Error message

Timed out waiting for ${label}; last value: ${JSON.stringify(lastValue)}

What it means

waitFor loops pollWithTimeout until the read returns a truthy value or terminalWaitTimeoutMs (45000ms) elapses, then throws including JSON.stringify of the last polled value for diagnosis. It is the outer budget for terminal-exercise conditions like 'renderer store exposure', 'workspace session hydration', 'active terminal PTY binding', and echo markers.

Source

Thrown at config/scripts/linux-wayland-terminal-exercise.mjs:61

    delay(pollTimeoutMs).then(() => ({ timedOut: true, value: null }))
  ])
  if (result.timedOut) {
    throw new Error(`Timed out polling ${label} after ${pollTimeoutMs}ms.`)
  }
  return result.value
}

async function waitFor(label, read, timeout = terminalWaitTimeoutMs) {
  const startedAt = Date.now()
  let lastValue
  while (Date.now() - startedAt < timeout) {
    lastValue = await pollWithTimeout(label, read)
    if (lastValue) {
      return lastValue
    }
    await delay(50)
  }
  throw new Error(`Timed out waiting for ${label}; last value: ${JSON.stringify(lastValue)}`)
}

async function getTerminalContent(page, charLimit = 12_000) {
  return page.evaluate((limit) => {
    const store = window.__store
    if (!store || !window.__paneManagers) {
      return ''
    }
    const state = store.getState()
    const worktreeId = state.activeWorktreeId
    const tabId =
      state.activeTabType === 'terminal'
        ? state.activeTabId
        : worktreeId
          ? (state.activeTabIdByWorktree?.[worktreeId] ?? null)
          : null
    const manager = tabId ? window.__paneManagers.get(tabId) : null
    const pane = manager?.getActivePane?.() ?? manager?.getPanes?.()[0] ?? null

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Inspect lastValue in the message — it shows how far setup got (e.g. store present but not hydrated).
  2. Check the phase logs printed before the throw to find the last successful step.
  3. Verify repo registration and worktree hydration succeeded.
  4. Only raise the 45s budget if the cause is transient; a persistent failure usually points to a real setup bug.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  return await waitFor(label, read, timeout)
} catch (err) {
  log.error(`waitFor '${label}' failed; lastValue=${err.message}`)
  throw err
}

Prevention

When it happens

Trigger: The polled condition never becomes truthy within 45s: store never exposed, hydration failed, PTY never bound, terminal never echoed the expected marker, or a GPU stall slowed every poll.

Common situations: Renderer store not exposed in time; workspace session hydration failed; PTY binding broken; terminal echo missing because the shell didn't start; GPU wedge inflating every poll.

Understand the failure class

Related errors


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