Skip to content

Document permissionCli and insertAfterArgs for custom ACP agents - #8506

Open
lanjak wants to merge 1 commit into
get-bb:mainfrom
lanjak:docs-acp-permissioncli-insertafterargs
Open

lanjak wants to merge 1 commit into
get-bb:mainfrom
lanjak:docs-acp-permissioncli-insertafterargs

Conversation

@lanjak

@lanjak lanjak commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

The custom ACP agent docs listed permissionCli as "permission-mode launch flags" with no fields. insertAfterArgs was not documented, and its default 0 puts the flags before all args (applyPermissionCliArgs). A custom agent that starts through /bin/sh -c '...' therefore failed on each thread start in the full mode.

What changed

  • docs/configuration.md: describes full (the full mode), workspaceWrite (the accept-edits mode) and insertAfterArgs, with a shell wrapper example. It also says that insertAfterArgs moves only the permissionCli flags (bb puts modelCli and reasoningCli flags before all args), and that a value larger than args is capped.
  • plugins/provider-acp/skills/acp-provider/SKILL.md: the same rules in short form.
  • permissionCli.readonly is accepted by the schema but no ACP permission mode uses it, so the docs do not mention it.

Docs: this PR is the docs change.

How you verified

Base: e0c49e2.

  • Checked each claim against bridge.ts (permissionCliArgsForMode, applyPermissionCliArgs, launch args built as [...prefixArgs, ...agentArgs]) and packages/domain/src/acp-cli.ts.
  • Ran the documented example by hand: /bin/sh -c 'exec echo my-agent acp "$@"' my-agent --dangerously-skip-permissions prints my-agent acp --dangerously-skip-permissions. With the flag first, /bin/sh prints invalid option and exits.
  • On a real setup, the antigravity custom agent (agy 1.5.20) failed every thread start until "insertAfterArgs": 3 was set. After that change, a thread started and replied.
  • oxfmt --check on both files: clean.

Fixes #8505

AGENT GENERATED

The custom agent docs named permissionCli but did not say where bb puts the
flags. The default insertAfterArgs of 0 puts them before all args, so a
/bin/sh -c wrapper fails at start. Describe full, workspaceWrite and
insertAfterArgs, with a shell wrapper example.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom ACP agent docs do not explain permissionCli.insertAfterArgs, so sh -c wrappers fail

1 participant