affaan-m/ECC · error · Error
--no-browser is valid only for ecc ito login; auth is…
Error message
--no-browser is valid only for ecc ito login; auth is validation-only.
What it means
parseArgs rejects --no-browser when used with the auth command; the flag is only meaningful for `ecc ito login`, because auth is validation-only and never opens a browser. This enforces mutually exclusive flag/command semantics.
Solutions
- Remove --no-browser from the auth invocation: `ecc ito auth`
- If a non-interactive flow is needed, use `ecc ito login --no-browser` instead (the only command accepting the flag)
- Strip command-inappropriate flags in wrapper scripts before dispatching
Example fix
// before const cmd = ['auth', '--no-browser']; // after const cmd = ['auth']; // or ['login', '--no-browser'] if browser-less login is intended
Defensive patterns
Strategy: validation
Validate before calling
const BROWSERLESS = new Set(['login']);
if (command === 'auth' && args.includes('--no-browser')) {
throw new Error('--no-browser is login-only');
} Try / catch
try {
runIto([command, ...flags]);
} catch (e) {
if (e.message.includes('--no-browser is valid only for')) {
runIto([command, ...flags.filter(f => f !== '--no-browser')]);
} else throw e;
} Prevention
- Keep per-command flag whitelists in wrapper scripts
- Do not blanket-add --no-browser to every subcommand in headless environments
- Remember auth never opens a browser; only login accepts --no-browser
When it happens
Trigger: Running `ecc ito auth --no-browser` — any invocation combining the auth command with the --no-browser flag.
Common situations: Copy-pasting a login invocation and swapping the command to auth while keeping its flags; headless CI scripts adding --no-browser defensively to every subcommand; assuming auth performs the interactive browser flow.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- Agents directory not found
- --all-harnesses and --harness are mutually exclusive.
- all overlays must be readable local files
- all takes must be readable local files
- AMBIGUOUS_PLUGIN_SCOPES
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/46b0c844ab59533f.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/ito.js:171
"Itô compute has no paper or dry-run success mode. No CLI operation was invoked."
);
}
const jsonIndexes = args
.map((value, index) => (value === "--json" ? index : -1))
.filter((index) => index >= 0);
if (jsonIndexes.length > 1) {
throw new Error("--json may only be provided once");
}
const withoutJson = args.filter((value) => value !== "--json");
const command = withoutJson.shift();
if (!SUPPORTED_COMMANDS.includes(command)) {
throw new Error(
`Unsupported Itô command "${command || "(missing)"}"; ECC permits only login, logout, auth, find, status, and evals.`
);
}
if (command === "auth" && withoutJson.includes("--no-browser")) {
throw new Error("--no-browser is valid only for ecc ito login; auth is validation-only.");
}
if (command === "evals") {
validateNodeQualificationArgs(withoutJson, environment);
}
return Object.freeze({
help: false,
invocationArgs: Object.freeze([
...(jsonIndexes.length === 1 ? ["--json"] : []),
command,
...withoutJson,
]),
});
}
function resolveItoExecutable(environment = process.env) {
const configured = environment[EXECUTABLE_OVERRIDE]?.trim();
if (!configured) {View on GitHub (pinned to 8321021c54)