n8n-io/n8n · error · Error
Unknown flag: ${arg}
Error message
Unknown flag: ${arg} What it means
Thrown by `parseCliArgs()` in export-latest-verifier-request.ts when an argv token starts with `--` but matches no case in the switch. This exporter CLI accepts a smaller flag set than the computer-use CLI: `--test-case`/`--slug`, `--test-case-path`, and `--scenario`. Any other `--token` is rejected. Distinct from error 420 which is the equivalent guard in a different CLI with a different accepted-flag set.
Source
Thrown at packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts:111
'data',
'workflows',
`${slug}.json`,
);
break;
}
case '--test-case-path': {
const rawPath = argv[++i];
if (!rawPath) throw new Error('Missing value for --test-case-path');
testCasePath = path.resolve(process.cwd(), rawPath);
break;
}
case '--scenario': {
scenarioName = argv[++i];
if (!scenarioName) throw new Error('Missing value for --scenario');
break;
}
default:
if (arg.startsWith('--')) throw new Error(`Unknown flag: ${arg}`);
if (!scenarioName) {
scenarioName = arg;
} else if (!testCasePath) {
testCasePath = path.join(
instanceAiRoot,
'evaluations',
'data',
'workflows',
`${arg}.json`,
);
} else {
throw new Error(`Unexpected positional argument: ${arg}`);
}
}
}
return {
testCasePath:View on GitHub (pinned to 5ac6606e81)
Solutions
- Inspect the accepted flag set (parseCliArgs switch at export-latest-verifier-request.ts:85-109) and remove or correct the offending token.
- If you meant to select a test case by slug, use `--slug <slug>` or `--test-case <slug>` or the first positional.
- If you meant to point at a path, use `--test-case-path <path>`.
- If you meant to select a scenario, use `--scenario <name>` or the second positional.
Example fix
// before $ node export-latest-verifier-request.ts --filter slack // after $ node export-latest-verifier-request.ts --slug slack
Defensive patterns
Strategy: validation
Validate before calling
const ACCEPTED = new Set(['--test-case','--slug','--test-case-path','--scenario']);
function findUnknownFlags(argv: string[]): string[] {
return argv.filter((a) => a.startsWith('--') && !ACCEPTED.has(a));
}
const unknown = findUnknownFlags(process.argv.slice(2));
if (unknown.length) throw new Error(`Unknown flags: ${unknown.join(', ')}`); Prevention
- Don't share wrapper scripts verbatim across the three eval CLIs — each has its own accepted flag set.
- Document the accepted flag set per CLI at the top of each script and in the README.
- Centralize the accepted-flag set per CLI and derive `--help` and any pre-flight validator from it.
When it happens
Trigger: Pass a computer-use CLI flag here by mistake (e.g. `--base-url`, `--filter`, `--verbose` — none are accepted). Typo a flag (`--scneario`). Carry over a flag from docs for a different eval tool. Pass `--help` (not implemented).
Common situations: Developers confuse the three eval CLIs and reuse flags across them. Copy-paste from a README for the wrong tool. A wrapper script shared across tools that injects a flag not understood by this one.
Related errors
- Missing value for ${arg}
- Missing value for --test-case-path
- Missing value for --scenario
- Unknown flag: ${arg.split('=', 1)[0]}
- Unexpected positional argument
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/b39f3ac602d83104.
Report an issue: GitHub.