Summary
sl_query (and other daemon-backed MCP calls) intermittently fail with:
connect ECONNREFUSED 127.0.0.1:
and occasionally fetch failed / connect ECONNREFUSED 127.0.0.1:<port>. The CLI/MCP layer tries to reach the managed ktx-daemon HTTP server and nothing is listening on the expected loopback port.
Impact
Seen across several anonymous installs (multiple distinct ephemeral ports) in usage telemetry. When it happens the tool call fails outright rather than degrading. Unlike the semantic-query rejections, this is a genuine fault: the daemon is not reachable when the tool needs it.
Root cause — needs investigation
Unknown; candidates:
- daemon not started / not yet ready when the first
sl_query fires (readiness race),
- daemon crashed/exited, leaving a stale/closed port, or
- a port/handshake mismatch between the CLI and the managed daemon.
Ask
Add readiness/lifecycle instrumentation to distinguish "never started" vs "crashed" vs "race", and make sl_query ensure/await a healthy daemon (or retry once against a freshly resolved port) before failing.
Summary
sl_query(and other daemon-backed MCP calls) intermittently fail with:and occasionally
fetch failed/connect ECONNREFUSED 127.0.0.1:<port>. The CLI/MCP layer tries to reach the managed ktx-daemon HTTP server and nothing is listening on the expected loopback port.Impact
Seen across several anonymous installs (multiple distinct ephemeral ports) in usage telemetry. When it happens the tool call fails outright rather than degrading. Unlike the semantic-query rejections, this is a genuine fault: the daemon is not reachable when the tool needs it.
Root cause — needs investigation
Unknown; candidates:
sl_queryfires (readiness race),Ask
Add readiness/lifecycle instrumentation to distinguish "never started" vs "crashed" vs "race", and make
sl_queryensure/await a healthy daemon (or retry once against a freshly resolved port) before failing.