Skip to content

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

Backlog

Description

@lanjak

Summary

The custom ACP agent docs name permissionCli as "permission-mode launch flags" but do not say where bb puts the flags. The field insertAfterArgs is not documented. Its default is 0, so bb puts the flags before all args. A custom agent that starts through /bin/sh -c '...' then fails on each thread start in the full mode, because the shell reads the flag as its own option.

Versions and environment

  • bb-app 0.50.1, and main at e0c49e2.
  • Linux, /bin/sh is bash 5. dash also rejects the flag.

Steps to reproduce

  1. Configure an agent as the docs allow:
    bb plugin config provider-acp set customAgents '[{"id":"shwrap","displayName":"Sh wrap","command":"/bin/sh","args":["-c","exec my-agent acp \"$@\"","my-agent"],"permissionCli":{"full":["--dangerously-skip-permissions"]}}]'
  2. Start a thread on acp-shwrap in the full mode.

Expected vs actual

bb runs /bin/sh --dangerously-skip-permissions -c 'exec my-agent acp "$@"' my-agent. The shell prints /bin/sh: --dangerously-skip-permissions: invalid option and exits. With "insertAfterArgs": 3 the agent starts as my-agent acp --dangerously-skip-permissions.

Expected: the docs say what full, workspaceWrite and insertAfterArgs do, and that a shell wrapper needs insertAfterArgs.

Evidence

  • applyPermissionCliArgs uses permissionCli?.insertAfterArgs ?? 0, capped at args.length.
  • docs/configuration.md and the acp-provider skill mention permissionCli with no fields. rg insertAfterArgs docs plugins/*/skills finds nothing.
  • Found on a real setup: the antigravity custom agent failed on every thread start (EPIPE, see the related issue) until insertAfterArgs was set.
  • The modelCli and reasoningCli flags always go before all args (bridge.ts builds [...prefixArgs, ...agentArgs]), so a shell wrapper cannot use them either.

What I ruled out

AGENT GENERATED

Activity

  1. added theissue type on Dec 1, 2026
  2. added
    documentation
    provider-acp
    on Dec 1, 2026
  3. bb-slop-cop commented on Dec 1, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Type: Task
    • Priority: Low
    • Effort: Low
    • Labels added: documentation, provider-acp

    The launch argument placement is configurable; the documentation doesn’t explain how to configure it for wrapper commands.

    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

    documentationprovider-acp

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions