affaan-m/ECC · error · Error
--timeout-seconds must be an integer from 10 to 120
Error message
--timeout-seconds must be an integer from 10 to 120
What it means
Thrown by parseArgs() in review-with-codex.js when the value of --timeout-seconds is not an integer in [10,120]. The value is coerced with Number(), then checked with Number.isInteger and range bounds. The clamp exists because the timeout is forwarded to spawnSync as the kill timer for the codex subprocess, and the council-review design needs a bounded safety window.
Source
Thrown at skills/council-multi-model/scripts/review-with-codex.js:67
function parseArgs(argv) {
const options = {
consent: false,
hostProvider: null,
timeoutMs: DEFAULT_TIMEOUT_MS,
};
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index];
if (arg === '--consent-to-openai') {
options.consent = true;
} else if (arg === '--host-provider') {
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;View on GitHub (pinned to 01e15490f0)
Solutions
- Use an integer in range: `--timeout-seconds 60` (the default is 60s, so you can also just omit the flag).
- If you need shorter, the minimum is 10; if longer, the maximum is 120.
- Make sure the value is a separate argv token, not glued like --timeout-seconds=60 (the parser does not support = form).
Example fix
// before node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic --timeout-seconds 5 // after node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic --timeout-seconds 60
Defensive patterns
Strategy: validation
Validate before calling
function parseTimeoutSeconds(raw) {
const n = Number(raw);
if (!Number.isInteger(n) || n < 10 || n > 120) {
throw new Error('--timeout-seconds must be an integer from 10 to 120');
}
return n * 1000;
}
// call before the review: options.timeoutMs = parseTimeoutSeconds(raw); Type guard
function isValidTimeoutSeconds(raw) {
const n = Number(raw);
return Number.isInteger(n) && n >= 10 && n <= 120;
} Prevention
- Omit --timeout-seconds to accept the safe 60s default.
- If you set it, use an integer in [10,120]; do not use decimals or out-of-range values.
- Pass the value as a separate argv token, not as --flag=value.
When it happens
Trigger: Passing --timeout-seconds 5 (below 10), --timeout-seconds 300 (above 120), --timeout-seconds 10.5 (not an integer), --timeout-seconds abc (Number(NaN) fails isInteger), or omitting the value entirely so argv[index+1] is undefined and Number(undefined) is NaN.
Common situations: Trying to set a very long timeout for slow reviews; passing a decimal; a missing value because the next token was consumed by the shell; copy-pasting a seconds value meant for a different tool.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- --as must be 'agent' or 'human'.
- --host-provider must be anthropic, openai, or unknown
- --timeout-ms must be a positive number
- ${label} must be a positive integer
- Unknown install target: ${parsed.target}. Expected one of ${
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/a3d529a5b15411c0.
Report an issue: GitHub.