affaan-m/ECC · error · Error
Interactive --json mutations require --yes.
Error message
Interactive --json mutations require --yes.
What it means
Thrown by validateInteractiveJsonOptions when --json is used interactively with all choices supplied, but neither --yes nor --dry-run is set. JSON mutations in non-interactive/interactive JSON mode must be explicitly authorized to avoid silently changing the filesystem.
Source
Thrown at scripts/setup.js:358
}
function needsInteractiveChoices(options) {
return (
options.mode === undefined
|| options.scope === undefined
|| options.hooks === undefined
);
}
function validateInteractiveJsonOptions(options, interactive) {
if (!interactive || !options.json) return;
if (needsInteractiveChoices(options)) {
throw new Error(
'Interactive --json requires explicit --mode, --scope, and --hooks values.'
);
}
if (!options.yes && !options.dryRun) {
throw new Error('Interactive --json mutations require --yes.');
}
}
function reconcileClaudePlugin(options) {
const setupOptions = {
dryRun: options.dryRun,
hooks: options.hooks,
scope: options.scope,
};
if (options.moveScope) {
return migrateClaudePluginScope(setupOptions);
}
try {
return setupClaudePlugin(setupOptions);
} catch (error) {
const canAutoMigrate = (
error instanceof ClaudeSetupErrorView on GitHub (pinned to 01e15490f0)
Solutions
- Add `--yes` to authorize the mutation.
- Or add `--dry-run` to preview the JSON without writing.
- Run in a non-TTY (piped stdin) only if you also pass --yes per the non-interactive guard.
Example fix
# before node scripts/setup.js --json --mode claude-plugin --scope user --hooks standard # after node scripts/setup.js --json --mode claude-plugin --scope user --hooks standard --yes
Defensive patterns
Strategy: validation
Validate before calling
const argv = process.argv.slice(2);
if (argv.includes('--json') && !argv.includes('--dry-run') && !argv.includes('--yes')) {
console.error('Interactive --json mutations require --yes');
process.exit(2);
} Try / catch
try { validateInteractiveJsonOptions(options, interactive); } catch (err) { console.error(err.message); process.exit(2); } Prevention
- Always pair --json with --yes or --dry-run in automation.
- Add a pre-flight check in the wrapper so the mutation guard never surprises you.
When it happens
Trigger: `node scripts/setup.js --json --mode claude-plugin --scope user --hooks standard` without --yes or --dry-run in a context flagged interactive.
Common situations: Setting up the full flag set for JSON output but forgetting the confirmation bypass; running in a TTY where 'interactive' is true by default.
Related errors
- Interactive --json requires explicit --mode, --scope, and --
- Non-interactive setup requires --yes.
- Missing value for ${argument}
- Unknown argument: ${argument}
- Invalid setup mode: ${options.mode}. This command currently
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/1166bdab49d1cb4f.
Report an issue: GitHub.