affaan-m/ECC · warning · Error
review packet is empty
Error message
review packet is empty
What it means
Thrown by runReview() as its very first check when the prompt passed to it is empty or whitespace-only (prompt.trim() is falsy). The review packet is read from stdin and joined into a single string before runReview is called, so this means stdin carried no meaningful content. There is nothing to send to Codex, so the function bails before any spawn.
Source
Thrown at skills/council-multi-model/scripts/review-with-codex.js:182
`Codex ${versionMatch[1]} cannot guarantee tool-less review; `
+ `required stable feature toggles unavailable: ${unavailable.join(', ')}`
);
}
return versionMatch[1];
}
function buildEnvironment(sourceEnv = process.env) {
const allowed = [
'PATH', 'HOME', 'USERPROFILE', 'CODEX_HOME',
'TMPDIR', 'TMP', 'TEMP', 'SystemRoot', 'ComSpec', 'PATHEXT',
];
return Object.fromEntries(
allowed.filter((name) => sourceEnv[name]).map((name) => [name, sourceEnv[name]])
);
}
function runReview(prompt, options, dependencies = {}) {
if (!prompt.trim()) throw new Error('review packet is empty');
if (Buffer.byteLength(prompt, 'utf8') > MAX_PROMPT_BYTES) {
throw new Error(`review packet exceeds ${MAX_PROMPT_BYTES} bytes`);
}
if (!options.consent) throw new Error('OpenAI transfer consent is required');
if (options.timeoutMs < 10_000 || options.timeoutMs > MAX_TIMEOUT_MS) {
throw new Error('timeout is outside the 10-120 second safety range');
}
const spawn = dependencies.spawnSync || spawnSync;
const environment = buildEnvironment(dependencies.env || process.env);
const verifySupport = dependencies.verifyToollessSupport || verifyToollessSupport;
verifySupport({ spawnSync: spawn, env: environment });
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');
View on GitHub (pinned to 01e15490f0)
Solutions
- Make sure stdin has a non-empty packet: build it from real diff/context and verify before piping.
- Skip the review step in CI when the packet would be empty (e.g. `if [ -s packet.txt ]; then ... review-with-codex.js < packet.txt; fi`).
- Check the upstream command that feeds stdin actually produced output.
Example fix
// before echo "" | node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic // -> Error: review packet is empty // after git diff main...HEAD > /tmp/packet.txt [ -s /tmp/packet.txt ] && node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic < /tmp/packet.txt
Defensive patterns
Strategy: validation
Validate before calling
function ensureNonEmptyPacket(prompt) {
if (typeof prompt !== 'string' || !prompt.trim()) {
throw new Error('review packet is empty');
}
return prompt;
}
// call before runReview: ensureNonEmptyPacket(promptText) Type guard
function isNonEmptyPacket(prompt) {
return typeof prompt === 'string' && prompt.trim().length > 0;
} Try / catch
try {
stdout.write(runReview(packet, options) + '\n');
} catch (error) {
if (/review packet is empty/.test(error.message)) {
stderr.write('nothing to review; skipping external critique\n');
setExitCode(0); // treat as non-fatal when there is genuinely nothing to review
} else {
stderr.write(`external review absent: ${error.message}\n`);
setExitCode(1);
}
} Prevention
- Build the packet from real diff/context and verify it is non-empty before piping.
- Skip the review step in CI when the packet would be empty (e.g. `[ -s packet.txt ] && ...`).
- Check the upstream command that feeds stdin actually produced output.
When it happens
Trigger: Piping an empty or whitespace-only string into the script: `echo '' | review-with-codex.js ...`, piping /dev/null, or a caller that builds the packet from variables that expanded to nothing. Note runStdinReview has a separate size guard for the >64KB case, but an empty input is caught here.
Common situations: An upstream command that produced no review packet (e.g. git diff with no changes); an unset env var that the packet was built from; a misconfigured pipe that closed early; CI that runs review unconditionally even when there is nothing to review.
Related errors
- ${label} must be a positive integer
- Unknown install target: ${parsed.target}. Expected one of ${
- Consult requires a natural language query, for example: secu
- Invalid ${flagName}: ${value}
- Invalid format: ${parsed.format}. Use text, json, or markdow
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/4222cfe9c33d741f.
Report an issue: GitHub.