affaan-m/ECC · error · Error

explicit --consent-to-openai is required

Error message

explicit --consent-to-openai is required

What it means

Thrown by parseArgs() after the loop when options.consent is still false. This is a deliberate consent gate: the script pipes a review packet to OpenAI's Codex CLI, which is an external transfer of prompt data, so the caller must explicitly opt in with --consent-to-openai on every invocation. There is no env-var bypass.

Source

Thrown at skills/council-multi-model/scripts/review-with-codex.js:80

      options.hostProvider = argv[index + 1];
      index += 1;
    } else if (arg === '--timeout-seconds') {
      const seconds = Number(argv[index + 1]);
      if (!Number.isInteger(seconds) || seconds < 10 || seconds > 120) {
        throw new Error('--timeout-seconds must be an integer from 10 to 120');
      }
      options.timeoutMs = seconds * 1000;
      index += 1;
    } else if (arg === '--help' || arg === '-h') {
      options.help = true;
    } else {
      throw new Error(`unknown argument: ${arg}`);
    }
  }

  if (options.help) return options;
  if (!options.consent) {
    throw new Error('explicit --consent-to-openai is required');
  }
  if (!HOST_PROVIDERS.has(options.hostProvider)) {
    throw new Error('--host-provider must be anthropic, openai, or unknown');
  }
  return options;
}

function providerLabel(hostProvider) {
  if (hostProvider === 'anthropic') return 'cross-provider external critique';
  if (hostProvider === 'openai') return 'same-provider external critique';
  return 'provider relationship unverified';
}

function buildCodexArgs(tempDir, outputFile) {
  return [
    '--ask-for-approval', 'never',
    ...REQUIRED_TOOLLESS_FEATURES.flatMap((feature) => ['--disable', feature]),
    'exec',

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Add --consent-to-openai to the invocation: `... review-with-codex.js --consent-to-openai --host-provider anthropic`.
  2. Only add it in contexts where transferring the prompt to OpenAI is acceptable (read the skill docs first).
  3. If you do not want OpenAI transfer, do not use this script; pick a different review path.

Example fix

// before
node skills/council-multi-model/scripts/review-with-codex.js --host-provider anthropic

// after
node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic
Defensive patterns

Strategy: validation

Validate before calling

function ensureConsent(argv) {
  if (!argv.includes('--consent-to-openai')) {
    throw new Error('explicit --consent-to-openai is required to transfer the prompt to OpenAI');
  }
  return true;
}

Type guard

function hasConsentFlag(argv) {
  return Array.isArray(argv) && argv.includes('--consent-to-openai');
}

Prevention

When it happens

Trigger: Running review-with-codex.js without --consent-to-openai. The flag takes no value; its mere presence sets options.consent=true. --help short-circuits before this check, so `--help` alone is allowed.

Common situations: First-time use without reading the consent requirement; CI job that forgot the flag after a refactor; assuming a one-time env consent exists (it does not).

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/e602a5a41650c54a. Report an issue: GitHub.