Skip to content

New-thread provider picker offers providers not installed on the selected machine #3142

Open

Description

@IlyaM

This was generated by AI during triage.

Summary

When a remote machine is selected in the new-thread composer, the provider picker offers providers whose CLIs are not installed on that machine. BB already detects the installation state correctly in machine settings, so the picker should only offer providers that can run on the selected machine.

Versions and environment

  • bb 0.42.1, installed through npx bb-app
  • Source inspected at commit dba32a469fd820ff6106715db0aaf6ed297d79a5
  • Linux server with a connected remote Linux execution machine
  • The remote machine has Claude Code installed; Codex, Pi, and Cursor are not installed

Steps to reproduce

  1. Connect a remote machine that has Claude Code installed but does not have Codex installed.

  2. Confirm BB detects the installation state:

    bb machine provider-cli status <machine> --json

    Relevant output:

    {
      "codex": {
        "executablePath": null,
        "installed": false,
        "installSource": "notInstalled"
      },
      "claude-code": {
        "installed": true
      }
    }
  3. Open the new-thread composer.

  4. Select that remote machine as the execution target.

  5. Open the provider/model picker.

The same discrepancy is visible through the CLI:

bb provider list --machine <machine> --json
bb provider models codex --machine <machine> --json

The provider list includes Codex with "available": true, while the Codex model command returns:

[]

Expected vs actual

Actual:

  • Codex, Claude Code, Pi, and Cursor remain visible as selectable provider tabs.
  • Selecting a provider whose CLI is absent produces a “Could not load models” error.
  • A provider remembered from another machine can remain selected after switching machines.

Expected:

  • Providers known to be unavailable on the selected machine should not be offered as usable choices.
  • If the selected provider becomes unavailable after a machine change, the composer should select a ready provider on the new machine.
  • Authentication failures and transient model-loading failures may remain visible, but a confirmed not_installed provider should not appear usable.

Evidence

Observed behavior:

  • Machine-specific CLI status correctly reports Codex, Pi, and Cursor as not installed.
  • The machine-specific provider list nevertheless returns all of them as available.
  • Claude Code model discovery succeeds on the same machine, ruling out a general connectivity failure.

Likely cause:

  • The server includes every provider declared with always visibility without filtering it by machine installation state:
    function listConfiguredSystemProviderInfos(
    deps: Pick<LoggedWorkSessionDeps, "providerRegistry">,
    capability?: ProviderCapabilityFilter,
    ): ProviderInfo[] {
    return deps.providerRegistry
    .list()
    .filter(
    (entry) =>
    entry.visibility === "always" &&
    providerMatchesCapability(entry.info, capability),
    )
    .map((entry) => entry.info);
    }
  • The composer maps the complete returned roster directly into picker options:
    const providerOptions = useMemo(
    (): ProviderPickerOption[] =>
    providers.map((p) => ({
    value: p.id,
    label: p.displayName,
    icon: getProviderIconInfo(p.id, p)?.icon,
    ...(p.strings?.brandPrefix === undefined
    ? {}
    : { brandPrefix: p.strings.brandPrefix }),
    ...(p.strings?.planModeCopy === undefined
    ? {}
    : { planModeCopy: p.strings.planModeCopy }),
    ...(p.strings?.installUrl === undefined
    ? {}
    : { installUrl: p.strings.installUrl }),
    })),
    [providers],
    );
  • Machine CLI status is already loaded, but this path only uses the selected provider’s status for version/update handling:
    const composeHostId = resolveComposeHostId(parsedEnvironment, primaryHostId);
    const providerCliStatus = useHostProviderCliStatus({
    hostId: composeHostId,
    enabled: composeHostId !== null,
    });
    const { queuedJobKeys, runningJobKey, startInstall } =
    useProviderCliInstallRunner();
    const selectedProviderCliStatus =
    providerCliStatus.data?.[selectedProviderId] ?? null;
    const isProviderCliVersionBlocked =
    selectedProviderCliStatus?.versionUnsupported === true;
    const selectedProviderCliIssue = useMemo(() => {
    if (!isProviderCliVersionBlocked || selectedProviderCliStatus === null) {
    return null;
    }
    const issue = buildProviderCliIssue({
    provider: selectedProviderId,
    status: selectedProviderCliStatus,
    });
    return issue && hasProviderCliAction(issue) ? issue : null;
    }, [
    isProviderCliVersionBlocked,
    selectedProviderCliStatus,
    selectedProviderId,
    ]);
  • Readiness fallback only runs when no provider preference already exists, so a remembered provider is not revalidated after the machine changes:
    const selectedProviderIdBeforeReadyFallback = usesStoredCreateSelections
    ? storedProviderId || renderedThreadSelections.selectedProviderId
    : renderedThreadSelections.selectedProviderId;
    const rawServiceTier = usesStoredCreateSelections
    ? storedServiceTier || renderedThreadSelections.serviceTier
    : renderedThreadSelections.serviceTier;
    const rawPermissionMode = usesStoredCreateSelections
    ? storedPermissionMode || renderedThreadSelections.permissionMode
    : renderedThreadSelections.permissionMode;
    const rawEnvironmentSelectionValue =
    scope === "new-thread"
    ? (rootComposeReuseValue ??
    sanitizeStoredEnvironmentValue(storedEnvironmentSelectionValue))
    : renderedThreadSelections.environmentSelectionValue;
    const knownModelCatalogScope = useKnownProviderModelCatalogScope(
    selectedProviderIdBeforeReadyFallback,
    );
    const executionOptionsQueryEnabled = enabled;
    const executionOptionsRouting = resolveProviderRouting
    ? resolveProviderRouting(rawEnvironmentSelectionValue)
    : resolveThreadCreationProviderRouting({
    environmentId,
    environmentHostId,
    environmentSelectionValue: rawEnvironmentSelectionValue,
    ...(knownModelCatalogScope === undefined
    ? {}
    : { modelCatalogScope: knownModelCatalogScope }),
    scope,
    });
    const canResolveReadyProvider =
    executionOptionsQueryEnabled &&
    scope === "new-thread" &&
    preferReadyProviderWhenUnset &&
    selectedProviderIdBeforeReadyFallback.length === 0;
    const shouldResolveReadyProvider =
    canResolveReadyProvider && initialReadyProvider.status === "unresolved";
    const providerStatesQuery = useSystemProviderStates({
    enabled: shouldResolveReadyProvider,
    ...executionOptionsRouting,
    poll: false,
    });
    const queriedReadyProviderId = shouldResolveReadyProvider
    ? providerStatesQuery.data?.providers.find(
    (provider) => provider.status === "ready",
    )?.providerId
    : undefined;
    const readyProviderId =
    initialReadyProvider.status === "resolved"
    ? (initialReadyProvider.providerId ?? undefined)
    : queriedReadyProviderId;
    useEffect(() => {
    if (!shouldResolveReadyProvider || providerStatesQuery.isPending) {
    return;
    }
    setInitialReadyProvider((current) =>
    current.status === "resolved"
    ? current
    : {
    status: "resolved",
    providerId: queriedReadyProviderId ?? null,
    },
    );
    }, [
    providerStatesQuery.isPending,
    queriedReadyProviderId,
    shouldResolveReadyProvider,
    ]);
    const rawSelectedProviderId =
    selectedProviderIdBeforeReadyFallback || readyProviderId || "";
    const executionOptionsProviderId = executionOptionsQueryEnabled
    ? rawSelectedProviderId || undefined
    : undefined;
    const executionOptionsQuery = useSystemExecutionOptions({
    enabled: executionOptionsQueryEnabled,
    ...executionOptionsRouting,
    providerId: executionOptionsProviderId,

ProviderInfo.available appears to describe whether the provider plugin loaded successfully, not whether its executable is installed on the selected machine. It is therefore not sufficient as the picker’s availability signal.

What you ruled out

  • Not incorrect machine detection: the provider CLI status endpoint correctly reports the missing executables.
  • Not incorrect host routing: both provider-list and model-list commands were explicitly routed to the affected machine.
  • Not a general remote-machine failure: Claude Code model discovery succeeds on the same machine.
  • Not a duplicate of Custom ACP providers report available on hosts that cannot execute them #2320: that issue concerns globally configured custom ACP providers and host-specific command availability; this report concerns built-in provider choices and remembered selection in the new-thread composer.
  • Reproduced on bb 0.42.1 and confirmed against source commit dba32a469fd820ff6106715db0aaf6ed297d79a5.

Suggested priority and effort

Medium priority — affects users with heterogeneous or remote machines and presents choices that cannot create a thread. A usable provider can be selected manually, so there is a workaround and no data loss. Likely small-to-medium effort because machine status is already available, but provider-selection persistence and loading states need explicit handling.

AGENT GENERATED

Activity

  1. added theissue type on Sep 5, 2026
  2. added
    providers
    ui
    confirmed-repro
    on Sep 5, 2026
  3. bb-slop-cop commented on Sep 5, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Medium · labels providers, ui, confirmed-repro
    • Report: https://get-bb.github.io/reports/issues/3142.html
    • Verdict: REPRODUCED · confidence high · reproduction label confirmed-repro
    • Root cause: the machine-routed roster includes every always provider, while the new-thread hook checks readiness only when no provider is remembered and maps the full roster into picker options, so a machine switch neither removes nor replaces a confirmed unavailable selection.
    • Pull request: none — fixing this safely requires a product decision because trusted tests deliberately latch readiness across machine switches and available currently means plugin load state, not machine installation.
  4. OXI-717 commented on Oct 19, 2026

    @OXI-717
    Contributor

    Additional verification on desktop BB 0.46.1 (macOS, 2026-10-19): the discrepancy remains observable.

    On the same selected machine:

    • bb machine provider-cli status <machine> --json reports Pi as installed: false, installSource: "notInstalled".
    • bb provider list --json includes pi with available: true.
    • The user reports Pi in the model picker despite not having its CLI installed.

    The CLI installation discrepancy was verified directly; I have not yet independently captured the current UI in a browser. Authentication failures and transient catalog errors should remain separate from confirmed notInstalled.

    The current checkout still maps the roster into picker options in useThreadCreationOptions.ts. This is evidence for the existing issue, not a claim that the install state is the only readiness condition. Hiding a row must preserve an existing thread and must not disable its provider policy; see #4811.

    AGENT GENERATED

  5. OXI-717 commented on Nov 2, 2026

    @OXI-717
    Contributor

    Prototype commit.

    Prepared a native-picker prototype against 916d684 for the existing selected-machine availability problem. It uses the native system provider states instead of treating global catalog registration as runnable on every machine.

    The prototype scopes the existing readiness query to the selected host and validated project/environment, refreshes metadata once per minute while the composer is mounted, and disables unavailable provider choices with a reason. It preserves the current selection and ongoing turn; it does not silently move a conversation to another provider or replay requests. Host installation and unknown-host failures cannot be overridden by a credential proxy.

    The existing experimental environment-health contribution gains optional project context and a negative readiness status, with legacy omitted-status compatibility. A failed contribution remains unknown instead of falling back to a local ready result. The native CLI exposes the same system state with bb provider states. No separate model-selection plugin or model probe is involved.

    Focused author checks: 115 picker/query/helper/server/CLI controls, two real plugin-service failure controls and two SDK failure/compatibility controls pass; affected app/server/CLI/SDK typechecks pass. These are source and synthetic checks, not a deployed or live visual acceptance claim.

    I am sharing this as a prototype for maintainer alignment, following CONTRIBUTING.md; no upstream feature/UI pull request or custom production build has been deployed.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovidersui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions