thedotmack/claude-mem · error
ActiveServerQueueManager requires…
Error message
ActiveServerQueueManager requires CLAUDE_MEM_QUEUE_ENGINE=bullmq (got ${config.engine}); do not instantiate when bullmq is not selected. What it means
ActiveServerQueueManager only supports the BullMQ queue engine. Its constructor validates config.engine and refuses to instantiate when CLAUDE_MEM_QUEUE_ENGINE is anything other than 'bullmq', since the Redis/BullMQ queue stack cannot run under other engines.
Solutions
- Set CLAUDE_MEM_QUEUE_ENGINE=bullmq in the server environment
- Guard construction: only build ActiveServerQueueManager when the resolved config.engine === 'bullmq'
- Fix the engine string if it was misspelled (must be exactly 'bullmq')
Example fix
// before
const manager = new ActiveServerQueueManager(config); // throws when engine !== 'bullmq'
// after
if (config.engine !== 'bullmq') { throw new Error('server queue requires CLAUDE_MEM_QUEUE_ENGINE=bullmq'); }
const manager = new ActiveServerQueueManager(config); Defensive patterns
Strategy: validation
Validate before calling
if (config.engine !== 'bullmq') {
throw new Error(`server queue stack requires bullmq, got ${config.engine}`);
}
const manager = new ActiveServerQueueManager(config); Type guard
function isBullMqConfig(c: RedisQueueConfig): c is RedisQueueConfig & { engine: 'bullmq' } {
return c.engine === 'bullmq';
} Try / catch
try {
manager = new ActiveServerQueueManager(config);
} catch (e) {
if (String(e.message).includes('CLAUDE_MEM_QUEUE_ENGINE=bullmq')) {
throw new Error('Enable bullmq before using the server queue manager');
}
throw e;
} Prevention
- Check CLAUDE_MEM_QUEUE_ENGINE in deployment manifests before enabling server queues
- Only instantiate the manager behind an engine === 'bullmq' branch
- Keep the engine value in one shared config module to avoid typos
- Add a startup smoke test that constructs the manager under expected env
When it happens
Trigger: Constructing new ActiveServerQueueManager(config) where config.engine is not 'bullmq' — e.g. the config was built from CLAUDE_MEM_QUEUE_ENGINE=inline or a typo like 'bullMQ'.
Common situations: Deploying the server with a queue engine env var left at a non-BullMQ default; refactored code that instantiates the manager unconditionally instead of checking engine first; typos in the engine value.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- CLAUDE_MEM_QUEUE_ENGINE is not "bullmq"
- BullMQ re-enqueue failed (will reconcile on startup)
- CLAUDE_MEM_TELEGRAM_WRAPUP_ROUTES must be a JSON object
- Corrupt JSON file, refusing to overwrite
- Empty observation response, leaving queue intact
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/88e9e8118c0d8325.
Report an issue: GitHub.
Appendix: source
Thrown at src/server/runtime/ActiveServerQueueManager.ts:40
// This boundary intentionally does not start any Worker processors here.
// Phase 4+ wires processors that consume the queues, calling
// `start(kind, processor)` once provider generation is ready. Until then,
// the queues exist as transports for `enqueueOutbox` to publish into.
const QUEUE_KINDS: ServerGenerationJobKind[] = ['event', 'summary'];
export class ActiveServerQueueManager implements ServerQueueManager {
readonly kind = 'queue-manager' as const;
private readonly queues: Map<ServerGenerationJobKind, ServerJobQueue<ServerGenerationJobPayload>>;
private closed = false;
constructor(
private readonly config: RedisQueueConfig,
queues?: Map<ServerGenerationJobKind, ServerJobQueue<ServerGenerationJobPayload>>,
) {
if (config.engine !== 'bullmq') {
throw new Error(
`ActiveServerQueueManager requires CLAUDE_MEM_QUEUE_ENGINE=bullmq (got ${config.engine}); ` +
'do not instantiate when bullmq is not selected.',
);
}
this.queues = queues ?? this.buildQueues(config);
}
getQueue(kind: ServerGenerationJobKind): ServerJobQueue<ServerGenerationJobPayload> {
const queue = this.queues.get(kind);
if (!queue) {
throw new Error(`unknown server generation job kind: ${kind}`);
}
return queue;
}
start(kind: ServerGenerationJobKind, processor: Processor<ServerGenerationJobPayload>): void {
this.getQueue(kind).start(processor);
}View on GitHub (pinned to d8bc9755e7)