Skip to content

Add named provider connections and explicit account routing #1447

Description

@SawyerHood

Problem

bb can discover provider credentials and account usage before a user selects an account. Users with personal and work accounts need clear identity control.

Requested behavior

Add named provider connections with:

  • Explicit approval before account-scoped reads.
  • A provider, executable, profile, authentication method, permission limit, and permitted projects.
  • Clear connection selection before thread start.
  • Usage queries only for enabled connections.
  • No silent fallback to a discovered default account.
  • An option to disable credential discovery.

Keep authentication provider-owned. Do not copy provider secrets.

Source

Discord feature request: https://discord.com/channels/1522478522332090528/1535636209072738404/threads/1535647703655125082

AGENT GENERATED: by GPT-5

Activity

  1. added
    enhancement
    on Aug 13, 2026
  2. added
    providers
    and removed
    enhancement
    on Aug 18, 2026
  3. yusuf8834 commented on Sep 3, 2026

    @yusuf8834

    My use case is a narrow version of this proposal: I want to select between several authenticated Codex and Claude accounts when starting a thread.

    Today I approximate this with separate custom ACP providers:

    • Each Codex provider uses a different CODEX_HOME.
    • Each Claude provider uses a different CLAUDE_CONFIG_DIR.
    • Every provider has a stable id and display name.
    • I choose the account from BB's provider picker before starting the thread.

    This works for account isolation, but routing the built-in providers through custom ACP adapters loses native BB behavior such as "Approve for me", provider branding, usage reporting, and some provider-specific session features.

    A small first version of named connections could support:

    1. Multiple named instances of the built-in Codex and Claude providers.
    2. One profile or configuration directory per instance.
    3. A separate provider-picker entry for each instance.
    4. Thread affinity to the selected instance.
    5. Provider-owned authentication, with BB storing no credentials.

    For example:

    • Codex personal
    • Codex work
    • Claude personal
    • Claude work

    I do not need automatic account discovery, load balancing, usage-aware routing, or failover initially. Those could remain separate work under #1552.

    The existing native bridges already support the behavior I need once the correct profile directory reaches the provider process. My current ACP setup confirms that isolated profile directories are enough to operate the accounts concurrently.

    Would this manual named-instance subset be a reasonable first implementation of #1447?

    AGENT GENERATED

  4. SawyerHood commented on Oct 19, 2026

    @SawyerHood
    CollaboratorAuthor

    Consolidated native multi-account request

    Consolidating #5735 into this canonical tracker at the maintainer's request following the open-issue duplicate sweep.

    #5735 is covered by this issue's named connections and explicit account routing, including multiple native Codex/Claude accounts with separate configuration/authentication homes. Keep native-provider functionality and explicit conversation/account affinity.

    Additional acceptance context from #5735:

    • Provide an easy guided account-add/sign-in flow, including headless setup.
    • Make account selection discoverable per thread/project and expose useful account/usage information.
    • Preserve existing conversations' account association rather than silently switching credentials.

    This is explicit account selection, not merely automatic pooled quota routing. The original user workflow remains linked in #5735.

    AGENT GENERATED

  5. OXI-717 commented on Oct 19, 2026

    @OXI-717
    Contributor

    Additional picker acceptance case for named connections: distinguish direct/local authentication from Account Pooler routing rather than displaying an undifferentiated list of engines.

    Observed on desktop BB0.46.1: native and custom pooled Cursor/Devin registrations appear as separate entries; custom registrations use the same generic icon. This is not necessarily a duplicate model: the two entries may use different execution/authentication routes. Two-row entries should be collapsed only when their provider, model and actual connection route are identical.

    Suggested presentation:

    • Local connections: configured direct/provider-owned authentication.
    • Pooler: explicitly pooled routes, with their provider icons and connection labels.
    • Confirmed unavailable installations excluded from the ordinary usable list (New-thread provider picker offers providers not installed on the selected machine #3142); hidden choices remain usable by existing threads and explicit CLI/SDK calls (Hide a provider from thread pickers without disabling it (hiddenProviders general setting) #4811).
    • Authentication or temporary transport failure remains a visible status, not silently treated as an absent installation.
    • Derive connection grouping from real routing metadata, not display-name matching. Native Codex/Claude can also be routed through a pool, so provider family alone is insufficient.
    • Show equivalent state for the selected execution machine, new-thread and follow-up composers; preserve model/reasoning selection, keyboard navigation and current-thread affinity.
    • Expose the metadata through SDK/CLI so plugins do not have to patch the composer DOM.

    The existing provider-icon renderer can supply branding, but it does not provide connection grouping in the core picker. This adds a concrete presentation case to the canonical connection tracker; no custom desktop build or changes to existing threads were applied.

    AGENT GENERATED

  6. k0d3r1s commented on Nov 10, 2026

    @k0d3r1s

    One concrete shape for the native-instances route discussed above, for Claude Code. It adds these parts, which nobody has raised yet:

    • Two profile kinds under one setting. A login profile has its own config root (CLAUDE_CONFIG_DIR) and its own native login. A token profile has no login. It sends the CLI to another Anthropic-compatible endpoint and reads a long-lived API token from a mode-600 file. Both are native Claude Code sessions, not custom ACP adapters, so plan approval, native questions, and branching from a checkpoint keep working.
    • One picker entry per profile, with its own provider id (claude-code-<id>). The thread is bound to that id, so it cannot change accounts later.
    • No fallback to the default login. The profile's bridge removes ambient credential and routing variables from the environment. A login profile uses only the credentials in its own config root. A token profile with a missing, empty, symlinked, or too-open token file refuses to start a session, list models, or branch a thread, and says which check failed. It never falls back to ~/.claude. The file is read fresh on each session start, so rotating the token needs no restart.
    • Profile ids work in custom model config. Custom model entries accept claude-code-<id> next to the bundled ids and acp-* ids, so one account can have its own model list. Today the schema accepts only the first two (bb-app-managed-config.ts#L52-L57).
    • Per-profile native roots. The native-roots lookup receives the provider's launch options, so a login profile lists user skills and commands from its own config root and never from ~/.claude. If the root cannot be resolved, it lists none.
    • Shared plugin settings. Plugin-wide settings (sandbox, memory, 1M context) stay shared by all profiles, and they also apply to token-profile sessions.
    • Optional icon per profile. A profile can pick one of a few shipped marks. A profile without one keeps the Claude mark. This speaks to the generic-icon point in the picker comment above.

    Both kinds are configured in one place, as a list of profiles with an id, a display name, and either a config root or a token file plus endpoint.

    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

    providers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions