stablyai/orca · error · Error
Unknown argument: ${arg}
Error message
Unknown argument: ${arg} What it means
Thrown by parseArgs for any command-line token that is not one of the recognized flags (--boundary, --trials, --output). The parser is strict: an unknown token is treated as a user error rather than silently ignored.
Source
Thrown at config/scripts/hang-watchdog-memory-benchmark.mjs:292
} finally {
app.quit()
rmSync(profileDir, { recursive: true, force: true })
}
}
function parseArgs(argv) {
const options = { boundary: '', trials: DEFAULT_TRIALS, output: '' }
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index]
const value = argv[index + 1]
if (arg === '--boundary' || arg === '--trials' || arg === '--output') {
if (!value) {
throw new Error(`Missing value for ${arg}`)
}
options[arg.slice(2)] = arg === '--trials' ? Number(value) : value
index += 1
} else {
throw new Error(`Unknown argument: ${arg}`)
}
}
if (!['child', 'worker'].includes(options.boundary)) {
throw new Error('--boundary must be child or worker')
}
if (!Number.isInteger(options.trials) || options.trials < 1) {
throw new Error('--trials must be a positive integer')
}
return options
}
function electronPath() {
const requirePath = import.meta.resolve('electron')
const electronModulePath = fileURLToPath(requirePath)
return execFileSync(
process.execPath,
['-e', `process.stdout.write(require(${JSON.stringify(electronModulePath)}))`],
{View on GitHub (pinned to 1136503c6a)
Solutions
- Check the script's recognized flags: only --boundary, --trials, and --output are accepted.
- Correct typos and remove stray positional arguments.
- Update the calling workflow/docs to match the current flag set.
Example fix
// before node ... --boundery child --trail 7 // after node ... --boundary child --trials 7
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN_FLAGS = new Set(['--boundary', '--trials', '--output'])
for (const a of argv) {
if (a.startsWith('--') && !KNOWN_FLAGS.has(a)) throw new Error(`Unknown argument: ${a}`)
} Prevention
- Keep docs and CI workflows in sync with the recognized flag set.
- Document the accepted flags in the script header.
When it happens
Trigger: Passing a typo'd or unsupported flag such as `--boundery child`, `--trial 7`, a bare positional argument, or a flag from an older/newer version of the script.
Common situations: Version skew between the script and the invoking docs/workflow, typos, or leftover flags after a refactor renamed an option.
Related errors
- Missing value for ${arg}
- --boundary must be child or worker
- --trials must be a positive integer
- Missing value for ${arg}
- Unknown argument: ${arg}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/ae2ee90c13a22633.
Report an issue: GitHub.