Skip to content

CLI asserts "bb isn't running" for any probe failure, without evidence #1216

Closed

Description

@sholub-dev

Version: bb 0.36.0 (macOS)

Problem

When an unknown command triggers the plugin-contribution probe (bb memory ..., bb connect), any fetch failure prints:

bb isn't running — open the bb app, then re-run this command.

The probe catches the error with a bare catch (apps/cli/src/plugin-cli-proxy.ts), so ECONNREFUSED, EPERM/EACCES from a sandboxed shell, and timeouts are indistinguishable — and the message asserts a fact the code has no evidence for. Agents act on it: they declare a healthy bb dead, abandon queued work, and ask the user to open an app that is already open.

Observed in production: an agent's sandboxed shell lost network access while bb was up and listening (lsof showed the listening socket and live connections). Every bb memory ... command printed "bb isn't running"; the agent reported the backend as dead three times and relaunched duplicate jobs.

Steps to reproduce

$ BB_SERVER_URL=http://192.0.2.1:38886 bb memory catalog
bb isn't running — open the bb app, then re-run this command.

The same constant appears for a refused connection, a blocked one (EPERM), and a timeout. Only ECONNREFUSED actually means nothing is listening.

Expected

Only ECONNREFUSED justifies "bb is not running". Blocked connections and timeouts should name the address and the errno so the reader can tell "this shell is blocked" from "the server is down".

Related: the built-in-command formatter losing .cause is #1189 — different code path (this probe discards the error before any formatter runs).

Activity

  1. added theissue type on Aug 10, 2026
  2. self-assigned this
    on Aug 10, 2026
  3. added a commit that references this issue on Aug 10, 2026
    e2cb3fe
  4. added a commit that references this issue on Aug 14, 2026
    8ef0a18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions