Skip to content

ACP: map bb permission modes and Plan onto the agent's own session modes #7536

Description

@seklow

The workflow

Run an ACP agent that has its own permission modes as a bb provider and use bb's permission modes and the Plan action as with Claude Code or Codex. My case is Google Antigravity CLI 1.5.8 (agy acp), configured as a custom agent in provider-acp on bb 0.49.0. Code links below are at f024a372f0.

What happens today

  • ACP providers declare only accept-edits and full (declaration.ts:15), and the bridge throws on auto (bridge.ts:3269-3270).
  • Accept edits does not change the agent's own mode. agy starts in its default mode, so every edit becomes an approval card, although agy has an accept-edits mode. agy acp has no launch flag for the mode, and its agentMode setting is not applied over ACP.
  • The agent's modes are reachable only through its mode config option in the Mode menu (session-model.ts:144-153). That option is not tied to bb's permission mode, so a user can switch agy to auto while bb still shows Accept edits.
  • The generic ACP provider declares no composer actions (declaration.ts:104), so there is no Plan action. The SDK contract says the bridge "maps it onto whatever the agent calls it natively" (backend-contract.ts:1423-1429), but the ACP bridge never reads promptMode.
  • Full access already works: permissionCli can add --dangerously-skip-permissions, and bb approves session/request_permission itself in that mode.

agy 1.5.8 advertises the session modes default, accept-edits, auto and plan, plus a config option of category mode. ACP leaves mode ids to the agent, so bb cannot guess them.

What you would expect

A declarative mapping on an ACP agent entry, next to permissionCli, for example:

"sessionModes": { "accept-edits": "accept-edits", "auto": "auto", "plan": "plan" }
  • bb sets the mapped mode (session/set_mode, or the agent's mode config option) when a session starts or is restored, and when a turn changes the permission mode.
  • An agent that maps auto declares auto instead of having it rejected.
  • An agent that maps plan gets the Plan composer action; a plan turn switches to that mode.
  • While a mapping exists, the Mode menu does not offer a second, unsynchronized way to change the same mode.

Known agents could ship such a mapping for agents that have these modes.

Context and alternatives

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added
    providers
    provider-acp
    on Nov 13, 2026
  2. bb-slop-cop commented on Nov 13, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied Type: Feature · Priority: Medium · Effort: High and labels providers, provider-acp. All classifications were missing; no existing values were replaced. Verified the final Type and fields after writing.

    The current ACP provider explicitly exposes only two permission modes and no composer actions. Connecting native session modes to these controls adds provider capabilities and requires configuration and permission-policy design, rather than a contained defect fix. Medium priority reflects the limited provider scope and existing workarounds; High effort reflects the cross-layer design.

    No reproduction report or pull request: this is classified as a Feature, so the bug-report and fix steps do not apply.

  3. seklow commented on Nov 13, 2026

    @seklow
    Author

    A live check of why the mapping also has to run on restore. I drove agy acp 1.5.8 directly over ACP, without bb in between.

    • session/set_mode to accept-edits works: agy sends current_mode_update and a config-option update, and a turn in that session stays in accept-edits.
    • After session/load or session/resume of the same session in a new agy process, the session is back in default, and agy sends no mode notification.

    So the agent forgets its mode with each process, and bb has to set the mapped mode again after every restore, not only when it creates a session. From reading the bridge, a Mode-menu choice today is a one-shot session option: once the agent reports that value, the stored choice is dropped. After an idle reap or a daemon restart, agy would then be back in default without the user noticing.

    AGENT GENERATED

  4. wojteklembryk commented on Nov 22, 2026

    @wojteklembryk

    Another agent in the same position, GitHub Copilot CLI (the registry ACP agent acp-github-copilot-cli), plus one consequence of the two-mode declaration that makes this more than a convenience. Observed on bb 0.49.0; code links at 796cdcc.

    An undeclared auto becomes Full access, not Accept edits. When the requested mode is not declared, the composer picks auto if offered, otherwise full, and only then the first declared mode (selection-state.ts:303-317). ACP agents declare ["accept-edits", "full"] (declaration.ts:15, L86-L88). So a remembered Auto (picked while a Claude Code project was selected), or a plugin setSelection({ permissionMode: "auto" }), settles on Full access in a project whose agent is GitHub Copilot. On 0.49.0 a plugin that requests auto got full in every Copilot project and auto in a Claude Code project. Until ACP agents can declare auto, falling back to accept-edits would be the safer choice for a requested auto.

    What Copilot CLI offers over ACP. copilot --acp (Copilot CLI 1.0.106), driven directly without bb, answers session/new with:

    • session modes agent, plan and autopilot (ids are URLs such as https://agentclientprotocol.com/protocol/session-modes#autopilot), plus a config option with category mode;
    • autopilot is described as "enables allow-all and runs until task completion", so it is closer to bb's full than to auto.

    There is no auto session mode. The closest is the launch flag --assisted-approval (per copilot --help, a probabilistic judge that reviews permission requests, "equivalent to the assisted mode of /permissions"). So for this agent a mapping would need launch flags per mode as well as session modes. permissionCli today has only full and workspaceWrite (bridge.ts:780-793); an auto entry there would cover Copilot, while plan could map to the plan session mode as proposed above.

    AGENT GENERATED

  5. vkosakov commented on Nov 24, 2026

    @vkosakov

    Same gap from a different dialect, with a shape that needs no session-mode mapping.

    Concrete case. OpenCode as an ACP agent (acp-opencode, OpenCode 2.2.7) under bb 0.50.1 on macOS. The user asked for all three modes in the composer and the picker offers only Accept Edits and Full Access.

    Why auto is reachable here without session/set_mode. bb already owns OpenCode's permission surface through OPENCODE_PERMISSION in dialectLaunchEnv: edit is always allow, while bash, webfetch and external_directory are allow for full and ask for accept-edits. That gives a three-way mapping for free:

    • accept-edits: unchanged — bash, webfetch and external_directory ask.
    • auto: bash and webfetch allow, external_directory ask, and handlePermissionRequest answers allow_once while the request's tool-call paths stay inside workspaceWriteRoots.
    • full: unchanged.

    This keeps auto distinct from full on this dialect: leaving the workspace still produces a prompt, which is what the composer copy already promises ("High-risk actions can still come back to you"). Because it is not a session mode, the restore problem from the previous comment does not apply to it.

    Two observations from the same session.

    • With accept-edits, OpenCode asks for nothing except .env reads, so on this dialect Accept Edits already behaves like Full Access in practice. auto is the mode the user was actually looking for; the two declared modes both miss the middle.
    • The fallback noted above hits here too: a project whose remembered shape came from a Claude Code thread opens OpenCode threads at Full Access, which is the opposite of what the user intended.

    Happy to open a pull request with the declaration change, the bridge branch and tests if this shape works for you. The pieces are plugins/provider-acp/src/declaration.ts (the mode list), packages/provider-bridge-acp/src/session-params.ts (the throw on auto), and packages/provider-bridge-acp/src/bridge/bridge.ts (permissionCliArgsForMode, dialectLaunchEnv, handlePermissionRequest).

    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

    provider-acpproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions