stablyai/orca · error · Error

Unsupported --expect=${value}. Use none, repro, or pass.

Error message

Unsupported --expect=${value}. Use none, repro, or pass.

What it means

Thrown by the apphang repro harness CLI parser when --expect is given a value other than 'none', 'repro', or 'pass'. These modes control exit-code semantics: none prints measurements, repro exits 0 only when hang evidence is observed, pass exits 1 if hang evidence is found.

Source

Thrown at config/scripts/repro-windows-apphang-terminal-activation.mjs:58

      args.sourceControl = false
      continue
    }
    if (arg === '--no-dead-pty-reactivate') {
      args.deadPtyReactivate = false
      continue
    }
    const [name, value] = arg.split('=', 2)
    if (name === '--cycles') {
      args.cycles = parsePositiveInt(name, value)
      continue
    }
    if (name === '--distro') {
      args.distro = value?.trim() || null
      continue
    }
    if (name === '--expect') {
      if (!['none', 'repro', 'pass'].includes(value)) {
        throw new Error(`Unsupported --expect=${value}. Use none, repro, or pass.`)
      }
      args.expect = value
      continue
    }
    if (name === '--gpu') {
      const modes = (value ?? '')
        .split(',')
        .map((entry) => entry.trim())
        .filter(Boolean)
      if (modes.length === 0 || modes.some((mode) => !['on', 'off', 'auto'].includes(mode))) {
        throw new Error(`Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.`)
      }
      args.gpuModes = modes
      continue
    }
    if (name === '--output-lines') {
      args.outputLines = parsePositiveInt(name, value)
      continue

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Use one of the three documented modes: --expect=none, --expect=repro, or --expect=pass.
  2. Run with --help to see all valid options.

Example fix

// before
node config/scripts/repro-windows-apphang-terminal-activation.mjs --expect=warn
// after
node config/scripts/repro-windows-apphang-terminal-activation.mjs --expect=repro
Defensive patterns

Strategy: validation

Validate before calling

const EXPECT_MODES = ['none', 'repro', 'pass']
if (!EXPECT_MODES.includes(value)) {
  throw new Error(`Unsupported --expect=${value}. Use ${EXPECT_MODES.join(', ')}.`)
}

Type guard

function isExpectMode(value) {
  return typeof value === 'string' && ['none', 'repro', 'pass'].includes(value)
}

Prevention

When it happens

Trigger: Passing --expect=warn, --expect=true, or --expect= (empty). The parser splits on '=' and checks membership in the allowed list.

Common situations: A developer guesses a mode name, or copy-pastes a flag from a different harness.

Related errors


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