affaan-m/ECC · error · Error
Codex invocation failed: ${result.error.message}
Error message
Codex invocation failed: ${result.error.message} What it means
Thrown by runReview when spawning codex failed with a spawn error other than ETIMEDOUT/ENOENT during the actual review run. The underlying spawn error message is embedded.
Source
Thrown at skills/council-multi-model/scripts/review-with-codex.js:215
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)
Solutions
- Inspect the underlying error detail in the message (stderr/log/HTTP status), fix the cause, and retry.
Defensive patterns
Strategy: retry
When it happens
Trigger: Triggered when review-with-codex.js rejects the current invocation: Codex invocation failed: <value>
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:215 aborts the command with this message.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/ab225f8fadd8e25e.
Report an issue: GitHub.