Dead Code Candidates
Identified by automated dead-code hunter (2026-03-02). None of these symbols are imported or called anywhere in the codebase outside their own file.
1. isRedactionEnabled — src/redact.ts:21
Exported but never imported or called. The internal REDACT_ENABLED constant is used directly elsewhere. Safe to remove the export (or remove the function entirely).
2. getClaudeCpuThreshold — src/claudeCli.ts:182
Zero call sites in src/ or tests/. Likely a CPU-scaling helper extracted but never wired in. Candidate for removal — or wire into scan.ts where CPU thresholds are applied.
3. onOpenCodeRawEvent — src/opencodeEvents.ts:58
The rawListeners Set is populated but never subscribed to from outside. notifyRawListeners fires internally, but no external consumer ever registers. Either wire up a consumer or remove this pub/sub hook entirely.
Suggested Action
- Remove or internalize
isRedactionEnabled (trivial)
- Remove
getClaudeCpuThreshold or wire into scan CPU threshold logic
- Remove
onOpenCodeRawEvent + rawListeners Set + notifyRawListeners (if no consumer planned)
Directory scanned: consensus-cli/src/ (~9k LOC)
Dead Code Candidates
Identified by automated dead-code hunter (2026-03-02). None of these symbols are imported or called anywhere in the codebase outside their own file.
1.
isRedactionEnabled—src/redact.ts:21Exported but never imported or called. The internal
REDACT_ENABLEDconstant is used directly elsewhere. Safe to remove the export (or remove the function entirely).2.
getClaudeCpuThreshold—src/claudeCli.ts:182Zero call sites in src/ or tests/. Likely a CPU-scaling helper extracted but never wired in. Candidate for removal — or wire into scan.ts where CPU thresholds are applied.
3.
onOpenCodeRawEvent—src/opencodeEvents.ts:58The rawListeners Set is populated but never subscribed to from outside. notifyRawListeners fires internally, but no external consumer ever registers. Either wire up a consumer or remove this pub/sub hook entirely.
Suggested Action
isRedactionEnabled(trivial)getClaudeCpuThresholdor wire into scan CPU threshold logiconOpenCodeRawEvent+ rawListeners Set + notifyRawListeners (if no consumer planned)Directory scanned: consensus-cli/src/ (~9k LOC)