stablyai/orca · error · Error

Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: $

Error message

Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')}

What it means

live-remote-realistic-freeze-repro drives one of several named freeze scenarios (REALISTIC_SCENARIOS) selected by the ORCA_FREEZE_SCENARIO env var. The guard at main() rejects any value not in the allow-list so an unrecognized scenario cannot silently fall through to default behavior. The valid set is printed in the message.

Source

Thrown at config/scripts/live-remote-realistic-freeze-repro.mjs:138

  }
}

function listLiveTerminalHandles() {
  const listed = orcaJsonSync(['terminal', 'list'])
  const terms = listed.result?.terminals || []
  return terms
    .filter((t) => typeof t.handle === 'string' && t.handle.startsWith('term_'))
    .map((t) => ({
      handle: t.handle,
      title: t.title,
      worktreeId: t.worktreeId,
      connected: t.connected
    }))
}

async function main() {
  if (!REALISTIC_SCENARIOS.includes(scenario)) {
    throw new Error(
      `Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')}`
    )
  }

  mkdirSync(reportDir, { recursive: true })
  const notes = []
  const phases = []
  const openTimings = new BoundedLiveFreezeHistory(100)

  console.log(
    `[realistic-freeze] scenario=${scenario} env=${envName} create=${createCount} idleMs=${idleMs} openCount=${openCount} paceMs=${paceMs}`
  )

  const local = orcaJsonSync(['status'], { local: true })
  const remote = orcaJsonSync(['status'])
  notes.push(
    `local version=${local.result?.runtime?.appVersion} pid=${local.result?.app?.pid}`,
    `remote version=${remote.result?.runtime?.appVersion} state=${remote.result?.runtime?.state}`

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Pick a value from the list printed in the message: ${REALISTIC_SCENARIOS.join(', ')}.
  2. If whitespace or quotes leaked in (e.g. from YAML), strip them when exporting ORCA_FREEZE_SCENARIO.
  3. If you intended a new scenario, add it to REALISTIC_SCENARIOS and implement its branch before referencing it.

Example fix

# before
export ORCA_FREEZE_SCENARIO="bulk-open "

# after
export ORCA_FREEZE_SCENARIO=bulk-open
Defensive patterns

Strategy: validation

Validate before calling

if (!REALISTIC_SCENARIOS.includes(scenario?.trim())) {
  throw new Error(`ORCA_FREEZE_SCENARIO=${scenario} invalid; valid: ${REALISTIC_SCENARIOS.join(', ')}`)
}

Type guard

const isValidScenario = (s) => typeof s === 'string' && REALISTIC_SCENARIOS.includes(s.trim())

Prevention

When it happens

Trigger: Setting ORCA_FREEZE_SCENARIO to a typo, a renamed value, or a scenario that exists in a different orca version. The check is a strict REALISTIC_SCENARIOS.includes(scenario).

Common situations: Copy-pasting a scenario name from outdated docs, a renamed scenario across versions, trailing whitespace/quotes in the env value (the script does not trim), or a CI matrix referencing a scenario that was removed.

Related errors


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