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
parseArgs in review-with-codex.js validates --timeout-seconds strictly: it must parse to an integer between 10 and 120 inclusive, because the value becomes the Codex CLI probe timeout in milliseconds. The error is thrown immediately during argument parsing when Number() yields NaN, a float, or an out-of-range value.
Solutions
- Pass an integer between 10 and 120, e.g. `--timeout-seconds 30`.
- If you have a millisecond value, divide by 1000 before passing it.
- Ensure the flag is followed by a bare numeric value with no unit suffix.
- Remove the flag entirely to use the script's default timeout if you don't need a custom one.
Example fix
// before node review-with-codex.js --timeout-seconds 300 ... // Error: --timeout-seconds must be an integer from 10 to 120 // after node review-with-codex.js --timeout-seconds 120 ...
Defensive patterns
Strategy: validation
Validate before calling
const seconds = Number(process.env.CODEX_TIMEOUT_S ?? 60);
if (!Number.isInteger(seconds) || seconds < 10 || seconds > 120) {
throw new Error('CODEX_TIMEOUT_S must be an integer 10-120');
} Type guard
const isValidTimeout = (v) => Number.isInteger(Number(v)) && Number(v) >= 10 && Number(v) <= 120;
Try / catch
try {
run(['--timeout-seconds', String(seconds)]);
} catch (e) {
if (String(e.message).includes('--timeout-seconds must be')) {
console.error('Use an integer between 10 and 120 seconds.');
}
} Prevention
- Clamp user/config timeout values to [10, 120] before passing the flag.
- Convert any millisecond values to seconds at the boundary.
- Never build the flag from a possibly-empty shell variable without a default.
When it happens
Trigger: Passing `--timeout-seconds abc` (NaN), `--timeout-seconds 5.5` (non-integer), `--timeout-seconds 5` (< 10), or `--timeout-seconds 300` (> 120). Also occurs when the value is missing entirely so Number(undefined) is NaN.
Common situations: User assumes seconds are optional/unbounded; passing milliseconds by mistake (e.g. 30000); a wrapper script interpolates an empty or unit-suffixed value like `30s`; forgetting the flag value so the next flag is consumed by Number().
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- timeout is outside the 10-120 second safety range
- all overlays must be readable local files
- all takes must be readable local files
- Arguments must not contain NUL bytes.
- asset name must be a simple filename stem (letters, digits…
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/a3d529a5b15411c0.
Report an issue: GitHub.
Appendix: 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 8321021c54)