thedotmack/claude-mem · error
Supervisor is shutting down, refusing to spawn ${type}
Error message
Supervisor is shutting down, refusing to spawn ${type} What it means
Error "Supervisor is shutting down, refusing to spawn ${type}" thrown in thedotmack/claude-mem.
Source
Thrown at src/supervisor/index.ts:124
await this.stopPromise;
return;
}
stopHealthChecker();
this.stopPromise = runShutdownCascade({
registry: this.registry,
currentPid: process.pid
}).finally(() => {
this.started = false;
this.stopPromise = null;
});
await this.stopPromise;
}
assertCanSpawn(type: string): void {
if (this.stopPromise !== null) {
throw new Error(`Supervisor is shutting down, refusing to spawn ${type}`);
}
}
registerProcess(id: string, processInfo: ManagedProcessInfo, processRef?: Parameters<ProcessRegistry['register']>[2]): void {
this.registry.register(id, processInfo, processRef);
}
unregisterProcess(id: string): void {
this.registry.unregister(id);
}
getRegistry(): ProcessRegistry {
return this.registry;
}
}
const supervisorSingleton = new Supervisor(getProcessRegistry());
View on GitHub (pinned to d768ba3643)
Solutions
- Do not spawn new processes after shutdown begins; wait for the supervisor to finish stopping, then start a new supervisor.
- If this fires unexpectedly, check what triggered shutdown (signal handler or stop()) and reorder the spawn to occur before stop.
When it happens
Trigger: Fires when a spawn request (worker, SDK subprocess, or other managed process) arrives after the supervisor has begun shutdown, e.g. during Ctrl-C handling, an in-flight session finalization, or a restart race. The guard at src/supervisor/index.ts:124 refuses the spawn so no orphan process outlives the supervisor.
Common situations: See trigger scenarios.
AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12).
Data as JSON: /api/errors/9ea2009d6401868f.
Report an issue: GitHub.