affaan-m/ECC · error · Error

Codex review timed out

Error message

Codex review timed out

What it means

Thrown by runReview when the spawned codex process reports error code ETIMEDOUT — the review exceeded options.timeoutMs. The bounded timeout prevents a hung external review from blocking the caller.

Solutions

  1. Increase the timeout within the allowed range or fix the underlying condition, then retry.
Defensive patterns

Strategy: retry

When it happens

Trigger: Triggered when review-with-codex.js rejects the current invocation: Codex review timed out

Common situations: Occurs while running skills/council-multi-model/scripts/review-with-codex.js with invalid arguments, missing flags, or a failing external dependency; the guard at skills/council-multi-model/scripts/review-with-codex.js:213 aborts the command with this message.

Understand the failure class


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/c7a2d2a3ddae8d95. Report an issue: GitHub.

Appendix: source

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

  const makeTemp = dependencies.mkdtempSync || fs.mkdtempSync;
  const readFile = dependencies.readFileSync || fs.readFileSync;
  const remove = dependencies.rmSync || fs.rmSync;
  const tempDir = makeTemp(path.join(os.tmpdir(), 'ecc-council-review-'));
  const outputFile = path.join(tempDir, 'last-message.txt');

  try {
    const result = spawn('codex', buildCodexArgs(tempDir, outputFile), {
      cwd: tempDir,
      env: environment,
      input: prompt,
      encoding: 'utf8',
      timeout: options.timeoutMs,
      maxBuffer: 1024 * 1024,
      windowsHide: true,
    });

    if (result.error) {
      if (result.error.code === 'ETIMEDOUT') throw new Error('Codex review timed out');
      if (result.error.code === 'ENOENT') throw new Error('Codex CLI is not installed');
      throw new Error(`Codex invocation failed: ${result.error.message}`);
    }
    if (result.status !== 0) {
      const detail = (result.stderr || '').trim().split('\n').slice(-1)[0];
      throw new Error(`Codex review failed${detail ? `: ${detail}` : ''}`);
    }

    let text;
    try {
      text = readFile(outputFile, 'utf8').trim();
    } catch (error) {
      throw new Error(`Codex returned no final response: ${error.message}`);
    }
    if (!text) throw new Error('Codex returned an empty final response');
    return `${providerLabel(options.hostProvider)}\n${text}`;
  } finally {
    remove(tempDir, { recursive: true, force: true });

View on GitHub (pinned to 06c5e118c4)