Skip to content

ACP modelCli: a failed or timed-out model list replaces the catalog with acp-default only and logs success #5311

Closed

Description

@thomaswillner

Summary

When a custom ACP agent's modelCli.listArgs command fails or times out, the provider catalog is replaced with a single acp-default entry and the refresh is logged as success. Every model a thread or plugin has pinned then looks unavailable until a later refresh succeeds.

A failed listing should keep the last good catalog, or be reported as a failure. It should never publish a degraded one-entry catalog as changed: true success.

Versions and environment

  • bb desktop 0.45.0 (npm bb-app 0.45.0), macOS 26 (Darwin 25.6.0), Apple Silicon, single local host.
  • Provider: provider-acp with a customAgents entry using modelCli: { listArgs: ["--bb-list-models"], selectFlag: "--model", primaryModels: [] }.
  • The handleModelList / loadAgentModelCatalog code on main (packages/provider-bridge-acp/src/bridge/bridge.ts) has the same structure as the 0.45.0 bundle. I have not run 0.46.0.

Steps to reproduce

  1. Configure a custom ACP agent with modelCli.listArgs whose list command normally prints acp-default - … followed by two or more provider/id lines.
  2. Let the catalog refresh once successfully: the log shows Provider model catalog refresh settled … "outcome":"success","modelCount":3.
  3. Make the list command fail on the next refresh: exit non-zero, or run past MODEL_LIST_TIMEOUT_MS. Under heavy host load the command simply took longer than the timeout.
  4. Watch the next catalog refresh settled line, and anything that validates a pinned model against the catalog.

Expected vs actual

Expected: the catalog keeps the last good list, or the refresh records a failure and keeps the stored catalog.

Actual: the refresh is recorded as success with one model, and the stored catalog is replaced:

[00:35:13] Provider model catalog refresh settled {"providerId":"acp-prime","durationMs":2770,"outcome":"success","modelCount":3,"changed":false}
[00:45:47] Provider model catalog refresh settled {"providerId":"acp-prime","durationMs":27749,"outcome":"success","modelCount":1,"changed":true}
[00:57:19] Provider model catalog refresh settled {"providerId":"acp-prime","durationMs":14590,"outcome":"success","modelCount":3,"changed":true}

Between 00:45:47 and 00:57:19, a plugin scheduler that checks its pinned worker model against the catalog refused the same work item over 12,000 times, with worker model <provider>/<id> is not available from acp-prime. The model was still configured and was served again as soon as the next refresh succeeded.

Evidence

  • handleModelList (bridge.ts): when loadAgentModelCatalog(params.listCommand) returns null and listCommand is set, session discovery is skipped. The handler falls through to sendResult(id, { models: [ACP_DEFAULT_MODEL], selectedOnlyModels: [] }), a normal result rather than an error.
  • loadAgentModelCatalog does return cachedModelCatalog on failure, but that cache is a module-level variable inside the bridge process. Inference, not proven: the failing refresh ran in a bridge process that held no earlier catalog, so the cache was empty and the one-entry fallback was sent. Either way, the measured outcome on 0.45.0 is the collapse shown above.
  • The server then records the one-entry result as outcome: "success" and changed: true, so the degraded list replaces the good stored catalog.

What you ruled out

  • The agent's own model configuration: unchanged throughout. The next refresh returned the same 3 models with no config change.
  • The list command printing a short list: our command refuses to print a list of one model or fewer and exits 1. The one-entry catalog came from the bridge fallback, not from the command's stdout.
  • A local workaround fixing the root cause: we now make our list command serve its own last good list on failure. That masks the problem for one agent only; any other modelCli agent with a slow or failing list command still collapses.

Suggested priority and effort (optional)

Medium priority, small change. Options:

  1. When listCommand is set and returns no catalog, return an error from model/list instead of the acp-default-only result. The server then keeps its stored catalog and records outcome: "failure".
  2. Or, server side, never let a one-entry acp-default result replace a stored catalog that had more models.
  3. Or, move cachedModelCatalog to a store that outlives one bridge process.

Checks

AGENT GENERATED: written by Claude Code from a local incident investigation. The underlying report is private local notes, so there is no public link.

Activity

  1. added theissue type on Oct 10, 2026
  2. added
    providers
    provider-acp
    confirmed-repro
    on Oct 10, 2026
  3. bb-slop-cop commented on Oct 10, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low. Applied labels: providers, provider-acp, confirmed-repro; no existing classifications were replaced.
    • Report: https://get-bb.github.io/reports/issues/5311.html — REPRODUCED, root-cause confidence high, repeated in a second clean trusted checkout.
    • Root cause: An explicit CLI listing with no usable process-local catalog falls through to a successful acp-default-only response, which the server persists instead of retaining its last good catalog.
    • Regression evidence: Nonzero exit, unusable output, and a real command timeout fail before the fix in both checkouts and pass afterward. The full bridge suite passes 388 tests; server catalog tests pass all 18; lint, typecheck, and diff checks pass.
    • Ready fix: Preserve ACP catalogs when explicit model discovery fails #5313 — 51 changed text lines across two files; preserves cached catalogs and the default for agents without a CLI listing. Not merged.
  4. self-assigned this
    on Oct 14, 2026
  5. removed their assignment
    on Oct 14, 2026
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-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions