stablyai/orca · error · Error

Unknown argument: ${arg}

Error message

Unknown argument: ${arg}

What it means

Thrown by the Codex validation harness CLI parser when an argument does not match any known flag. Known flags: --scenario, --report, --primary-home, --config-template, --temp-parent, --dry-run, --close-after-launch, --skip-build, --keep, --lane-aware-containment, --help.

Source

Thrown at config/scripts/run-codex-real-account-validation.mjs:308

      options.closeAfterLaunch = true
    } else if (arg === '--skip-build') {
      options.skipBuild = true
    } else if (arg === '--keep') {
      options.keep = true
    } else if (arg === '--lane-aware-containment') {
      // Why: on Windows the system-default real-home lane cannot be env-sandboxed
      // (native codex ignores USERPROFILE), so strict zero-event containment is
      // structurally unreachable there. This mode records codex's designed
      // volatile churn without aborting while every other real-home write stays
      // a hard failure. The absolute zero-event claim is carried by macOS runs.
      options.laneAwareContainment = true
    } else if (arg === '--help') {
      console.log(
        'Usage: node config/scripts/run-codex-real-account-validation.mjs [--scenario mixed|managed-only|codex-lb] [--config-template <path>] [--temp-parent <dir>] [--skip-build] [--dry-run] [--close-after-launch] [--keep] [--lane-aware-containment] [--report <path>]'
      )
      process.exit(0)
    } else {
      throw new Error(`Unknown argument: ${arg}`)
    }
  }
  if (!VALID_SCENARIOS.has(options.scenario)) {
    throw new Error(`Invalid scenario: ${options.scenario}`)
  }
  if (options.scenario === 'codex-lb' && !options.configTemplate) {
    throw new Error('The codex-lb scenario requires --config-template outside primary ~/.codex')
  }
  return options
}

// Why: `npx` resolves to a .cmd shim on Windows that execFileSync cannot launch
// (ENOENT), so the harness could not build its own app there. Run the
// repository-local electron-vite JS entry with the current Node binary instead;
// process.execPath + a resolved .js path behaves identically on macOS, Linux,
// and Windows without a shell.
export function resolveElectronViteBuildCommand(repoRoot) {
  const electronViteEntry = path.join(

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run with --help to see the accepted flags and usage.
  2. Remove or correct the unrecognized argument.

Example fix

// before
node config/scripts/run-codex-real-account-validation.mjs --scneario mixed
// after
node config/scripts/run-codex-real-account-validation.mjs --scenario mixed
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN = new Set(['--scenario','--report','--primary-home','--config-template','--temp-parent','--dry-run','--close-after-launch','--skip-build','--keep','--lane-aware-containment','--help'])
if (!KNOWN.has(arg) && !KNOWN.has(arg.split('=',1)[0])) {
  throw new Error(`Unknown argument: ${arg}. Run with --help.`)
}

Type guard

function isKnownCodexValidationFlag(arg) {
  const name = arg.split('=', 1)[0]
  return new Set(['--scenario','--report','--primary-home','--config-template','--temp-parent','--dry-run','--close-after-launch','--skip-build','--keep','--lane-aware-containment','--help']).has(name)
}

Prevention

When it happens

Trigger: Passing any unrecognized flag like --verbose or a typo like --scneario. The parser's final else branch catches all unrecognized tokens.

Common situations: A developer passes a flag from a different script, or misspells a flag name.

Related errors


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