affaan-m/ECC · error · Error
Command "${commandName}" terminated by signal ${result.signa
Error message
Command "${commandName}" terminated by signal ${result.signal} What it means
Thrown by runCommand() in scripts/ecc.js when a spawned child process (the actual command script) is terminated by an OS signal rather than exiting with a numeric status code. This happens when result.status is not a number but result.signal is set, indicating the process was killed externally (e.g. SIGTERM, SIGKILL, SIGSEGV).
Source
Thrown at scripts/ecc.js:301
if (result.error) {
throw result.error;
}
if (result.stdout) {
process.stdout.write(result.stdout);
}
if (result.stderr) {
process.stderr.write(result.stderr);
}
if (typeof result.status === 'number') {
return result.status;
}
if (result.signal) {
throw new Error(`Command "${commandName}" terminated by signal ${result.signal}`);
}
return 1;
}
function main() {
try {
const resolution = resolveCommand(process.argv);
if (resolution.mode === 'help') {
showHelp(0);
}
if (resolution.mode === 'help-command') {
if (!resolution.command) {
showHelp(0);
}
View on GitHub (pinned to 01e15490f0)
Solutions
- Check if the system killed the process due to memory limits (dmesg or CI logs for OOM).
- Re-run the specific command directly to see if it crashes: `node scripts/<command-script>.js <args>`.
- If SIGINT, ensure you are not accidentally sending Ctrl+C or that a parent process is not terminating children.
- If SIGSEGV, investigate native module crashes or Node.js version incompatibility.
- Increase available memory: `node --max-old-space-size=4096 scripts/ecc.js <command>`.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const exitCode = runCommand(cmd, args);
process.exitCode = exitCode;
} catch (err) {
if (err.message.includes('terminated by signal')) {
const sig = err.message.match(/signal (\w+)/)?.[1];
if (sig === 'SIGKILL') console.error('Process killed (likely OOM). Increase --max-old-space-size.');
else console.error(`Process killed by ${sig}`);
process.exit(137);
}
throw err;
} Prevention
- Monitor memory usage of heavy commands and increase --max-old-space-size proactively.
- Run resource-intensive commands in CI with adequate memory limits.
- Log the signal name to distinguish OOM (SIGKILL) from user interrupts (SIGINT).
When it happens
Trigger: The child Node.js process running a command script receives a signal: OOM killer sends SIGKILL (memory exhaustion), user presses Ctrl+C producing SIGINT, the system sends SIGTERM during shutdown, or a segfault produces SIGSEGV. spawnSync returns with signal set and status null/undefined.
Common situations: Out-of-memory conditions when running heavy commands (e.g. catalog generation on large repos), manual process termination, CI environment resource limits, or a crash/segfault in a native module used by a command script.
Related errors
- The local Itô CLI terminated by signal ${result.signal}.
- ${command} ${args.join(' ')} failed: ${result.error.message}
- ${command} ${args.join(' ')} failed: ${(result.stderr || res
- ECC runner did not expose a process id
- Claude Code did not expose a process id
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/eb3544de1112355a.
Report an issue: GitHub.