Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Acp Provider?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/get-bb-acp-provider)
---
name: acp-provider
description: "Configure or troubleshoot ACP agent discovery, custom models, skills, and compaction in BB."
---
# ACP providers
Grok Build (`acp-grok`, the `grok` CLI) is always listed. Other known agents
are discovered automatically when their CLI is installed on the host: `opencode`,
`omp`, `hermes`, `agy`, and `fx` appear as `acp-opencode`, `acp-omp`,
`acp-hermes-agent`, `acp-antigravity`, and `acp-fx`. Inspect the target host's catalog with
`bb provider list` and `bb provider models <provider-id>` using its environment
or machine selector.
Agents in the official ACP registry can be added without writing JSON.
`bb acp registry [--refresh] [--json]` lists them with a status: `available`,
`added`, `update available`, `built in` (bb already ships it), or
`manual install` (the agent ships only as a downloadable binary).
`bb acp add <agent-id>` adds the agent as provider `acp-<agent-id>`, or moves an
added agent to the registry's current version while keeping the fields edited
by hand. `bb acp remove <agent-id>` removes it. The plugin's settings page shows
the same list. An added agent is an entry in the `Custom agents` setting that
runs `npx -y <package>` or `uvx <package>` on the thread's host, so the host
needs Node.js or uv. The list is cached for six hours; when the registry cannot
be reached the saved copy is shown with the reason.
To hide a detected ACP agent, use `bb provider disable acp-opencode`, or Disable
on Settings → Providers. Restore it with `bb provider enable acp-opencode`.
This leaves other ACP agents and the host CLI intact. Disabled agents skip
background capability probing. `bb provider list --all` includes disabled agents.
ACP agents report their own models and may reject unlisted model IDs.
For `acp-opencode` the list mirrors the OpenCode catalog, so add a model to
the OpenCode config rather than bb's `customModels`:
```sh
bb provider models acp-opencode --environment "$BB_ENVIRONMENT_ID"
bb thread spawn --provider acp-opencode --model <provider/model>
```
OpenCode agents are session modes, not models selectable through BB's model
field. OpenCode reports its primary agents as the `mode` session option. BB
asks OpenCode for its models and modes in the directory the thread will run
in: the project's checkout for a new thread, the environment's directory
otherwise. Custom agents from the OpenCode config directory and from the
project's `.opencode/` directory therefore appear in the mode menu:
```sh
bb provider models acp-opencode --project "$BB_PROJECT_ID"
bb thread spawn --provider acp-opencode --option mode=<agent>
```
A new agent file shows up once the stored list is ten minutes old and is read
again. The same holds for a custom agent with `dialect: "opencode"`; every
other ACP agent is asked once per machine.
bb lists only the agents OpenCode itself loads, and OpenCode does not read
agent files from other folders such as `.agents/agents/`. To use such a folder,
set `OPENCODE_CONFIG_DIR` as a machine variable or in a custom agent's `env`; a
relative value is resolved in each workspace, so `.agents` lists every
project's own `.agents/agents/*.md`:
```sh
printf '.agents' | bb machine env set OPENCODE_CONFIG_DIR
```
Every file in that folder must be a valid OpenCode agent file; OpenCode refuses
to start on one it cannot parse, such as `tools` written as a comma-separated
list.
Grok Build advertises its models (Grok, Composer, Claude, GPT, Gemini and open
models) with each model's reasoning levels and Fast option, so the picker lists
every model in one searchable list, each with its own ladder (for example `max`
on Claude Opus), without switching models. Sign in with `grok login`; Settings → Provider usage shows the plan
limit and pay-as-you-go spend from `grok usage`. Cursor CLI users switch with
`cursor-agent update --channel grok`, which points `cursor-agent`, `agent` and
`grok` at Grok Build.
BB launches OpenCode sessions with `OPENCODE_CLIENT=acp` and
`OPENCODE_ENABLE_QUESTION_TOOL=false`, overriding inherited and custom launch
values. Native questions have no ACP interaction handler in BB; agents use the
ask-user-question plugin’s `AskUserQuestion` tool instead. This also applies to
custom agents with `dialect: "opencode"` and does not change OpenCode config files.
BB applies the thread's permission mode to OpenCode. OpenCode 1.x reads it
from `OPENCODE_PERMISSION`, which BB sets and OpenCode merges over the
`permission` keys of its own config. OpenCode 2.x ignores that variable, so BB
writes the same rules (`edit`, `shell`, `webfetch` and `external_directory`, each
on `*`) to the session itself with `opencode api PATCH /api/session/<id>` before
the first prompt, ahead of the session's other rules such as allowed additional
directories. In `accept-edits` OpenCode edits files without asking and asks
before shell commands, web fetches and paths outside the workspace; BB shows
those requests as approvals. In `full` all four are allowed. Changing a thread's
permission mode restarts the OpenCode session with the new policy; the
conversation is restored. In `accept-edits`, if the launch command does not
end in `acp` or OpenCode 2.x rejects the rules, the session fails to start
instead of running without them. In `full` there is nothing to enforce, so a
launch command that does not end in `acp` only logs a warning once.
In `accept-edits`, when any ACP agent asks before a file edit or delete
inside the thread's writable folders, BB approves it itself. Edits elsewhere,
commands and other tools still show as approvals. Grok Build asks before
every file edit and runs commands it considers safe without asking. When you deny an
approval, Grok Build ends the turn and waits for your next message. Its own
question tool appears as a BB question.
BB's own tools (the `bb-bridge` MCP server, for example `check_ui`) run
without asking in every permission mode when the agent's permission request
names one of them in its tool `name` field (`mcp_bb-bridge_<tool>` or
`mcp__bb-bridge__<tool>`) with no tool kind or kind `other`. A request that
names the tool only in its title still asks, because titles can carry text
the model chose.
Approving a request "for session" is remembered by BB for that thread's ACP
session: the agent is answered with its allow-once option, and later requests
with the same subject (the same command, write scope, or tool) are approved
without asking. BB sends an agent's allow-always option only when the agent
offers no allow-once option, so agents do not write the grant to
their global config, and a new thread asks again.
Every ACP thread also gets the MCP servers in the workspace's `.mcp.json`, the
file Claude Code reads. bb reads it from the thread's directory when the session
starts, resumes, or forks and passes its servers to the agent in `session/new`,
`session/load`, `session/resume`, or `session/fork` next to `bb-bridge`.
`${VAR}` and `${VAR:-default}` in a server's command, args, env, URL, and headers
expand from the agent's environment; a server that references an unset
variable without a default is skipped. A relative command is resolved against
the workspace and `PATH`. Stdio servers are always passed; `http` and `sse`
servers only when the agent advertises that MCP transport. A server named
`bb-bridge` is skipped. Each skipped server, and a file bb cannot read or
parse, shows as a provider warning in the thread. Edits apply when the next ACP
session starts.
OpenCode, Grok Build, and Antigravity ACP support the core `bb thread compact`
command; fx ACP does not expose compatible compaction (fx answers `/compact` with a summary but keeps the context). Check the actual agent's capabilities
before attempting provider-specific recovery.
Some agents report compaction through a vendor extension instead: a
`<namespace>/compaction` key in session update `_meta` (OpenCode 2.x's
`opencode/compaction`) or a top-level `_<namespace>/compaction` notification
(Devin's `_cognition.ai/compaction`). bb shows any such extension with a
`status` of `started`, `in_progress`, `completed`, `failed`, or `cancelled` as
the same compaction row. When the extension carries no compaction ID, bb
treats each run from start to a final status as one compaction. A report that
arrives after bb's own `/compact` has finished counts as part of that
compaction, not as a second one.
bb sends `clientCapabilities.session.compaction: {}` at `initialize`. An agent
that reports its own compaction with the ACP `compaction_update` session update
gets the same "Compacting context" row as Claude Code, Codex, and Pi, and a
`completed` status marks the context compacted. A `failed` or `cancelled`
status shows the compaction as failed, with the agent's `error` text. During
bb's own `/compact`, a `failed` or `cancelled` update also sets the result of
the compaction turn. bb does not show
`compaction_summary_chunk` content. An agent that reports compaction in another
way, such as agent text or a `think` tool call, shows as that text or as a
thought.
Listing models reads only the reasoning choices the agent reports for its
current model; it never switches the agent's model. Selecting an unprobed model
starts a separate discovery session that switches to only that model, with a
five-second timeout, then sets the session's starting model and other changed
options, such as the reasoning level and Fast, back before closing it, including
after a failed or timed-out probe. This matters for agents that save every model
change as their default. Results are cached by model. While
loading, or after failure or an unrecognized response, BB shows no reasoning
selector. Sending never waits for discovery: when a model's catalog entry does
not list the thread's reasoning level, BB leaves reasoning out of the request and
the agent keeps its own setting. CLI and SDK reasoning preferences stay stored.
Failed probes, including an agent that errors or times out while switching
models, have a 30-second server retry cooldown; a probe the agent answers
without levels is not repeated until the catalog is refreshed. Discovered levels
survive later catalog refreshes. In `bb provider models
<provider-id> --json`, `reasoningDiscovery: "unknown"` means BB has not
discovered the model's levels yet; `"known"` with an empty
`supportedReasoningEfforts` means the model has no selectable levels, not that
it cannot reason. Use `bb provider models <provider-id> --selected-model <model-id>
--json` (SDK: `providers.models({ providerId, selectedModel })`) to request
the same discovery without the picker. Refresh the catalog after changing the
agent's default model. This does not require omp's proposed `_meta.thoughtLevels` extension.
OpenCode Go subscription usage is available in Provider usage when the selected
machine has OpenCode installed and a Go subscription. Sign in to Go in OpenCode
on that machine, then refresh its OpenCode tab. Verify with
`bb settings usage --machine <id-or-name> --json`; the SDK equivalent is
`bb.sdk.system.usageLimits({ hostId, providerId: "acp-opencode" })`.
BB reports Go's five-hour, weekly, and monthly usage and reset times, not local
session token totals or other OpenCode providers' subscriptions.
The collector checks `OPENCODE_API_KEY` first. For an OpenCode 2 database at
`$XDG_DATA_HOME/opencode/opencode.db`, it then reads the `credential` table API
key or official Console OAuth credential that OpenCode selects for each
integration (`opencode-go` before `opencode`). Otherwise it reads the active
official Console account and organization in that database, then
`OPENCODE_AUTH_CONTENT` or `$XDG_DATA_HOME/opencode/auth.json`. OpenCode 2
imports `auth.json` once when it upgrades an OpenCode 1 database and never reads
`auth.json`, `OPENCODE_AUTH_CONTENT`, or the OpenCode 1 Console account, so the
collector reads them only when there is no OpenCode 2 database.
The default data directory is `~/.local/share/opencode`. Database storage is read
only; expired Console sessions must be refreshed by OpenCode. V2 OAuth requires
the device login method and account/organization metadata for the official
Console server. API-key login
prefers the `opencode-go` credential and accepts the shared `opencode` credential
when Go is subscribed. Custom launch `env` values take precedence over the host
environment. A custom OpenCode wrapper must declare
`dialect: "opencode"` and `providerUsage: true` to expose its usage.
Missing credentials, rejected keys, and collection errors remain unavailable
states rather than zero usage. Never print API keys when diagnosing setup.
## Custom ACP agents
Register another ACP agent in the ACP providers plugin's `customAgents`
setting, a JSON array:
`bb plugin config provider-acp set customAgents '[...]'`. Agents from the
official ACP registry are added to the same setting by `bb acp add <agent-id>`.
The plugin re-registers its providers as soon as the setting changes; no
restart is needed.
- Required: `id` (lowercase letters, digits, and dashes; permanent),
`displayName`, and `command`. The provider id is `acp-<id>`. `grok` is
reserved; an entry with id `opencode`, `omp`, `hermes-agent`,
`antigravity`, or `fx` replaces the shipped agent.
- Launch: `args`, `env`, and `cwd`.
- `modelCli` for CLI model listing and selection, `reasoningCli` for
launch-time reasoning flags, `nativeReasoning` for ACP
`session/set_config_option` reasoning, and `permissionCli` for
permission-mode launch flags.
- `permissionCli`: `full` holds the flags for the `full` mode and
`workspaceWrite` the flags for the `accept-edits` mode. bb puts them after
the first `insertAfterArgs` entries of `args` (default `0`: before all
`args`). For a shell wrapper such as
`"command": "/bin/sh", "args": ["-c", "exec agent acp \"$@\"", "agent"]`,
set `insertAfterArgs` to the length of `args` (here `3`) so that the flags
arrive in `"$@"`. With `0`, the shell reads the flag as its own option,
rejects it, and exits before the agent starts.
`insertAfterArgs` moves only the `permissionCli` flags; bb puts `modelCli`
and `reasoningCli` flags before all `args`.
- `dialect` (`grok`, `opencode`, `omp`, or `fx`) selects the vendor side
channels bb reads.
- `nativeSkillRoots` adds native skills to the composer: a `user` list resolved
from the target host's home directory and a `project` list resolved from the
workspace, each a relative path without dot segments.
- `supportsManualCompaction` (default `false`) shows `/compact` only for agents
that accept an explicit compaction request.