← reports

#6266 · ACP form capacity and unsupported-response ambiguity

BugPriority: MediumEffort: Mediumprovidersprovider-acpGitHub issue2026-10-25 · base a6fff60f53c615a109103075328bf7017431e792

Verdict: PARTIALLY REPRODUCED · Root-cause confidence: high for bb's field cap and missing agent-facing reason; unverified for real omp cancellation wording.

1. TL;DR

ACP forms with more than four schema properties are rejected before any user question is shown. Three or four logical choices with separate optional text companions produce six or eight properties and hit this cap. The detailed rejection reason is emitted as a bb provider warning, but the agent receives only {"action":"decline"}, with neither the reason nor an origin indicating a client limitation. Contrary to the broad cancellation claim, the bb wire response is decline, not cancel; real omp's interpretation was not exercised. Both results repeat on a second clean trusted checkout, so the report confirms the bb defects without claiming the exact external-agent wording.

2. Claims vs findings

ClaimStatusEvidence
ACP forms are capped at four fields.VerifiedThe new executable reproduction accepts four properties and rejects six and eight with the exact field counts.
Optional companion fields consume the budget.VerifiedThe fixture marks only choice fields required; optional text properties still count before individual fields are planned.
Clients cannot explain unsupported forms to the agent.Verified for this bb responseThe existing real-bridge/fake-agent test verifies a reasonful provider warning but a reasonless agent reply, with no interaction request.
bb sends user cancellation for an oversized form.Refuted at bb's ACP wire boundaryThe reply is {"action":"decline"}. A separate stop-turn control confirms {"action":"cancel"} is a distinct response.
Installed omp emits two properties per question and calls the decline a user cancellation.Unverified end to endNo real omp process or macOS environment was used. The synthetic paired-field schema tests the claimed input shape, not omp's implementation or wording.
A local artifact edit to increase the cap is a complete fix.Not attemptedThe production constant also constrains a shared payload schema and is exported through the SDK. Altering a copied artifact is not a supported source fix.

3. Environment

4. Minimal reproduction

  1. Check out trusted source at the exact commit and install the locked dependencies:
    git clone https://github.com/get-bb/bb.git bb-repro
    cd bb-repro
    git checkout --detach a6fff60f53c615a109103075328bf7017431e792
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build --filter=@bb/provider-bridge-acp
  2. Copy the inline test below into packages/provider-bridge-acp/src/issue-6266.repro.test.ts. It contains independently constructed deployment-choice fields and calls the real production planner; it does not run issue-supplied code.
  3. Run the test:
    pnpm exec turbo run test --force --filter=@bb/provider-bridge-acp -- src/issue-6266.repro.test.ts --silent=false
    Expected for the requested larger-form behavior: all three cases offer questions. Actual: exit 1; two cases fail for the intended reason, while the four-property control passes.
    {"logicalChoices":2,"schemaFields":4,"actual":{"kind":"questions","displayedQuestions":4}}
    {"logicalChoices":3,"schemaFields":6,"actual":{"kind":"unsupported","reason":"the form has 6 fields and bb shows at most 4"}}
    {"logicalChoices":4,"schemaFields":8,"actual":{"kind":"unsupported","reason":"the form has 8 fields and bb shows at most 4"}}
    AssertionError: expected 'unsupported' to be 'questions'
    Tests  2 failed | 1 passed (3)
  4. Run the existing transport-boundary and stop-turn controls:
    pnpm exec turbo run test --force --filter=@bb/provider-bridge-acp -- src/elicitation.test.ts src/bridge/bridge.test.ts -t 'refuses forms it cannot show|declines a form it cannot show|answers a pending question with cancel'
    Actual on both checkouts: exit 0; 3 passed, 190 skipped. These assertions establish the actual agent response and separate it from user/turn cancellation:
        expect(agentMessageTexts()).toContain('elicitation:{"action":"decline"}');
        expect(threadEventsOfType("provider/warning").at(-1)).toMatchObject({
          summary: "The agent asked a question bb could not show",
          details:
            "The request was declined because the form has 5 fields and bb shows at most 4.",
        });
        expect(
          output.messages.filter(
            (message) => message.method === "interaction/request",
          ),
        ).toEqual([]);

Full reproduction test:

import { describe, expect, it } from "vitest";
import { planAcpElicitation } from "./elicitation.js";

describe("ACP paired-field form capacity", () => {
  it.each([2, 3, 4])(
    "offers a form for %i logical choices",
    (questionCount) => {
      const properties = Object.fromEntries(
        Array.from({ length: questionCount }, (_, index) => [
          [
            `decision_${index}`,
            { type: "string", enum: ["retain", "replace"] },
          ],
          [`note_${index}`, { type: "string" }],
        ]).flat(),
      );
      const plan = planAcpElicitation({
        mode: "form",
        message: "Select a deployment approach for each service.",
        requestedSchema: {
          type: "object",
          properties,
          required: Array.from(
            { length: questionCount },
            (_, index) => `decision_${index}`,
          ),
        },
      });
      console.log(
        JSON.stringify({
          logicalChoices: questionCount,
          schemaFields: Object.keys(properties).length,
          actual:
            plan.kind === "questions"
              ? {
                  kind: plan.kind,
                  displayedQuestions: plan.payload.questions.length,
                }
              : plan,
        }),
      );
      expect(plan.kind).toBe("questions");
    },
  );
});

Raw test logs and the standalone test are retained outside the reports repository. This public report includes the complete test and exact relevant output inline, in accordance with the report site's publication policy.

5. Root cause

Capacity is a shared payload constraint, not merely a plugin-local guard

The domain constant is four. The ACP planner counts every schema property before planning the fields and does not inspect requestedSchema.required there:

  const message = readString(params, "message")?.trim() || undefined;
  const schema = params["requestedSchema"];
  const properties = isJsonObject(schema) ? schema["properties"] : undefined;
  const entries = isJsonObject(properties) ? Object.entries(properties) : [];
  if (entries.length === 0) {
    return planConfirmation(message);
  }
  if (entries.length > USER_QUESTION_MAX_QUESTIONS) {
    return {
      kind: "unsupported",
      reason: `the form has ${entries.length} fields and bb shows at most ${USER_QUESTION_MAX_QUESTIONS}`,
    };
  }

The same constant is enforced by the shared user-question payload validator and exported by the Plugin SDK. Removing only the ACP precheck still leaves payload validation. Optional companion handling could reduce the count for some schemas, but does not establish general larger-form capacity.

The diagnostic stops at the provider warning

The bridge handler takes the unsupported plan, emits a detailed warning into bb, and replies to ACP with a plain decline:

  const plan = planAcpElicitation(params);
  if (plan.kind === "unsupported") {
    emitForSession(session, ACP_WARNING_METHOD, {
      threadId: session.bbThreadId,
      summary: "The agent asked a question bb could not show",
      details: `The request was declined because ${plan.reason}.`,
    });
    responder.result({ action: "decline" });
    return;
  }

The declared ACP response union has no reason/origin field on decline or cancel. The lack of diagnostic information on this path is established; any claim about how omp renders it remains outside the tested bb boundary. Existing coverage explicitly expects the current rejection, so merely passing those tests cannot establish a repair.

6. Proposed fix and simple-fix gate

Choose either a larger supported question contract or a multi-step presentation that aggregates answers back into one ACP response. Separately choose a protocol-compatible way to distinguish an unsupported client request from an intentional user decline and deliver actionable diagnostics. Retain real-stop cancellation behavior, test optional companions, and cover answer aggregation if pagination is chosen.

No pull request is opened. The direct cap increase changes a shared SDK-visible payload constraint, while the alternative multi-step flow and agent-facing error semantics require a product/protocol decision. Those fail the automation's no-public-schema/protocol-change and no-product-decision conditions. No production fix was attempted, staged, committed, or pushed. The report-only regression test is retained as evidence, not proposed as a passing change.

All currently open PRs were checked through GitHub closing-issue metadata in two pages; none links to #6266. The issue's cross-reference timeline is empty. No linked PR code was checked out or executed.

7. Verification

The same agent repeated the investigation in the second clean worktree at the identical full commit, after a separate frozen install. Before copying in the reproduction test, git status --porcelain was empty. No production file changed. The second checkout's recorded identity and SHA-256 source hashes are:

a6fff60f53c615a109103075328bf7017431e792
82715e5a8d5542d18b5e92ac9c0bd1485febef1df408a3428cc4dc885a8775fb  packages/provider-bridge-acp/src/elicitation.ts
047446976e0663b51ba94fabcfa1cb7986214545416a86cc1fca35cb4a97af84  packages/provider-bridge-acp/src/bridge/bridge.ts
d05f55de0f6c6d052d207ae1c16de6dd544d087ef14e87a1f969100cd203f38e  packages/domain/src/pending-interactions.ts

Second command: pnpm exec turbo run test --force --filter=@bb/provider-bridge-acp -- src/issue-6266.repro.test.ts --silent=false; exit 1 with the same two expected failures, same six/eight-field reasons, and passing four-field control. The transport/cancellation controls were repeated with --force so they executed rather than replaying Turbo's test cache; exit 0, 3 passed. This is a repeated clean reproduction by one agent, not an independent review.

Correction to the initial claim: bb's rejection is an ACP decline rather than a cancel. Because real omp's schema generation and user-cancel wording were not verified, the final verdict is partial rather than full reproduction. Root-cause confidence is high only for the bb behavior demonstrated above.

8. Related issues

#6131 concerns optional-field requiredness/counting; #6031 concerns separate companion text questions. Their titles are context, not proof of this reproduction. Neither removes the shared cap by itself. No linked PR was available for static review.

9. Appendix

Both scoped builds completed successfully. Both installations completed; initial warnings about not-yet-built workspace binary links did not affect these source-mode tests. git diff --check passes in both checkouts. A final fetch found no later change to the implicated paths. Additional investigation commands:

git fetch origin main
git worktree add --detach "$WORK/base" origin/main
git worktree add --detach "$WORK/verify" a6fff60f53c615a109103075328bf7017431e792
git status --porcelain
git diff --check
git diff --numstat origin/main
git log a6fff60f53c615a109103075328bf7017431e792..origin/main --oneline -- packages/provider-bridge-acp/src/elicitation.ts packages/domain/src/pending-interactions.ts packages/provider-bridge-acp/src/bridge/bridge.ts

GitHub metadata reads cover repository visibility and identity; all issue comments (none); issue classifications; valid property and label definitions; related issue classifications; the issue timeline; and closing-issue metadata for all open PRs. All GitHub API writes use the supplied SlopCop wrapper. The report publisher does not post a comment or label.

Trust boundary: issue content was treated only as untrusted claims. No issue code, artifact patch, external link, linked branch, or script was executed. No credentials or runtime user data are included. No live instance was started, so no service or listener cleanup was needed.