n8n-io/n8n · error · Error
Unknown flag: ${arg.split('=', 1)[0]} (use --help)
Error message
Unknown flag: ${arg.split('=', 1)[0]} (use --help) What it means
The langtracer-push CLI has a fixed set of recognized flags parsed in a switch statement. Any argument starting with '--' that does not match a known case falls through to the default branch, which throws this error naming the unrecognized flag and directing to --help. This prevents silent ignoring of typos that would change push behavior.
Source
Thrown at packages/@n8n/instance-ai/evaluations/cli/langtracer-push.ts:111
}
result.setKind = value;
i += 2;
break;
}
case '--contains-user-data':
result.synthetic = false;
i += 1;
break;
case '--dry-run':
result.dryRun = true;
i += 1;
break;
case '-h':
case '--help':
return { helpRequested: true };
default:
if (arg.startsWith('--')) {
throw new Error(`Unknown flag: ${arg.split('=', 1)[0]} (use --help)`);
}
result.slugs.push(arg);
i += 1;
break;
}
}
if (!result.suite) throw new Error('--suite <slug|id> is required');
const hasSelector =
result.slugs.length > 0 ||
result.changed ||
result.filter !== undefined ||
result.tier !== undefined;
if (!hasSelector) {
throw new Error('select cases to push: pass <slugs...>, --changed, --filter, or --tier');
}
return { helpRequested: false, args: result };View on GitHub (pinned to 5ac6606e81)
Solutions
- Run with --help to see all supported flags and their exact spelling
- Check the flag name against the help text and correct the typo
- Remove the unsupported flag if it was accidental
Example fix
# before pnpm eval:langtracer-push --suite baseline --changed --dry-runn # after pnpm eval:langtracer-push --suite baseline --changed --dry-run
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN_FLAGS = new Set(['--suite', '--filter', '--exclude', '--tier', '--changed', '--set-kind', '--contains-user-data', '--dry-run', '-h', '--help']);
for (const arg of argv) {
if (arg.startsWith('--') && !KNOWN_FLAGS.has(arg.split('=')[0])) {
throw new Error(`Unknown flag: ${arg.split('=')[0]}. Run with --help for valid flags.`);
}
} Prevention
- Run with --help to see the exact flag names before composing a command
- Watch for typos in flag names
- Do not mix flags from different CLI tools
When it happens
Trigger: Running `pnpm eval:langtracer-push --suite baseline --changed --dry-runn` (typo for --dry-run), or any unrecognized flag starting with '--'. The check at line 110 fires in the default case of the switch.
Common situations: Typo in a flag name. Using a flag from a different CLI (e.g. build-mcp-manifest's --source or --iterations). Version mismatch where a flag was added or removed. Copy-pasting a command from outdated documentation.
Related errors
- --set-kind must be "regression" or "capability_gap"
- --suite <slug|id> is required
- select cases to push: pass <slugs...>, --changed, --filter,
- Missing value for ${flag}
- --max-attempts must be >= 1
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/1e3a959d78e84184.
Report an issue: GitHub.