{"record":{"id":"c7a2d2a3ddae8d95","repo":"affaan-m/ECC","slug":"codex-review-timed-out","errorCode":null,"errorMessage":"Codex review timed out","messagePattern":"Codex review timed out","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skills/council-multi-model/scripts/review-with-codex.js","lineNumber":213,"sourceCode":"  const makeTemp = dependencies.mkdtempSync || fs.mkdtempSync;\n  const readFile = dependencies.readFileSync || fs.readFileSync;\n  const remove = dependencies.rmSync || fs.rmSync;\n  const tempDir = makeTemp(path.join(os.tmpdir(), 'ecc-council-review-'));\n  const outputFile = path.join(tempDir, 'last-message.txt');\n\n  try {\n    const result = spawn('codex', buildCodexArgs(tempDir, outputFile), {\n      cwd: tempDir,\n      env: environment,\n      input: prompt,\n      encoding: 'utf8',\n      timeout: options.timeoutMs,\n      maxBuffer: 1024 * 1024,\n      windowsHide: true,\n    });\n\n    if (result.error) {\n      if (result.error.code === 'ETIMEDOUT') throw new Error('Codex review timed out');\n      if (result.error.code === 'ENOENT') throw new Error('Codex CLI is not installed');\n      throw new Error(`Codex invocation failed: ${result.error.message}`);\n    }\n    if (result.status !== 0) {\n      const detail = (result.stderr || '').trim().split('\\n').slice(-1)[0];\n      throw new Error(`Codex review failed${detail ? `: ${detail}` : ''}`);\n    }\n\n    let text;\n    try {\n      text = readFile(outputFile, 'utf8').trim();\n    } catch (error) {\n      throw new Error(`Codex returned no final response: ${error.message}`);\n    }\n    if (!text) throw new Error('Codex returned an empty final response');\n    return `${providerLabel(options.hostProvider)}\\n${text}`;\n  } finally {\n    remove(tempDir, { recursive: true, force: true });","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/skills/council-multi-model/scripts/review-with-codex.js#L195-L231","documentation":"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.","triggerScenarios":"Triggered when review-with-codex.js rejects the current invocation: Codex review timed out","commonSituations":"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.","solutions":["Increase the timeout within the allowed range or fix the underlying condition, then retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}