You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
detectInstalledProviders truthy gate misclassifies subprocess slots as HTTP #174
```js
if (!p.cli || p.type === 'http') return true;
```
The intent is "HTTP-only slots are always included (no CLI to probe)". The implementation also returns true for any subprocess slot where p.cli is falsy — which is the default state after ensureMcpSlotsFromProviders reconstructs providers.json from ~/.claude.json mcpServers (those entries only set mainTool, not cli).
Consequence: subprocess slots with cli: null skip the binary-existence check entirely. They get included even when the underlying CLI isn't installed, producing UNAVAIL at dispatch time instead of being filtered out at startup with a clear "CLI not found" message.
Proposed solution
Replace the truthy check with an explicit type check:
```js
if (p.type === 'http') return true;
const binaryPath = p.resolvedCli || p.cli || p.mainTool;
if (!binaryPath) {
process.stderr.write([manage-agents-core] ${p.name} has no resolvable CLI (cli, resolvedCli, mainTool all empty) — excluded\n);
return false;
}
// ... existing accessSync probe ...
```
Combined with PR #161's mainTool fallback in resolveCli, this gives the function a consistent contract: every subprocess slot must have some resolvable binary or it gets excluded with a clear log line.
Activity
fix(quorum): replace truthy gate in detectInstalledProviders (#183)