Repository navigation
Conversation
…elds Move Codex's requestedSchema normalizer and content validator into the bridge kit so the ACP bridge and the Codex plugin use one copy, exposed to Codex through @get-bb/plugin-sdk/provider-bridge/elicitation-form. The ACP planner now reads requestedSchema.required, folds a choice field and its <name>__other / <name>_other text field into one question with free text, counts questions after folding against the 4-question limit, and answers a form bb cannot show with a JSON-RPC error that names the reason instead of a decline. User questions gain a required flag (default true at the parse boundary). The server, the shared question form, and bb thread interactions answer accept a blank answer only for an optional question. Fixes #6031, #6131, #6266. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The shared requestedSchema parser came from the Codex renderer, which rejected any key it did not know. ACP's old planner ignored them, and omp's ask tool puts a description on every choice, so the strict parser refused omp's real forms outright. Unknown keywords (option and field descriptions, pattern, additionalProperties) are now stripped for both providers; a Codex form with such a keyword renders instead of being refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/swing-2c-question-forms-thr_yvchv5bwp9
branch
from
October 28, 2026 21:56
9899e1c to
b855da1
Compare
Fold an optional plain-text <name>__other or <name>_other field into its choice for every ACP agent instead of only omp and Droid dialect sessions, so Droid launched by a plugin that sets no dialect gets the fix. A required choice without an "other" value keeps its companion separate, since typed text alone could not fill it. The droid dialect and its docs are removed. The bridge no longer validates answers against format, length, bounds or item counts before replying. The generic question form cannot show those errors, so a failed check reached the agent as a user decline. Prompts now state the constraints, and the agent checks the values it receives. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Oct 29, 2026
… folding, 10-question cap, long titles (#6518) ## Human comments ## What was wrong bb's user question could not say that a question is optional, and it allowed at most 4 questions. Several paths also turned "bb could not show this" into a statement about the user: - **ACP (`packages/provider-bridge-acp/src/elicitation.ts`).** The ACP parser ignored `requestedSchema.required` and planned one question per form field. omp (`qN` + `qN__other`) and Droid (`question_N` + `question_N_other`) each send a choice plus an optional "Other" text field, so one question became two required questions (#6031, #6131). Because the parser counted fields rather than questions against the cap, a two-question omp form or a four-question Droid form was refused (#6266, #6508). A refused form went back to the agent as `{action: "decline"}`, i.e. a user decline (#6266). - **ask-user-question.** The plugin capped a call at 4 questions, so larger planning rounds were split across several interruptions (#3264). - **Pi and Codex async questions.** Core rejects interaction titles over 160 characters. Pi accepted titles up to 200 characters and answered both its own validation failure and core's rejection with `{ cancelled: true }`, so the extension reported that the user declined. Codex async questions used the raw question as the title, so any question over 160 characters never opened a card (#4264). This replaces #6476 with a smaller scope: no shared Codex/ACP form translator, no new plugin-SDK subpath, and Codex's form parser is unchanged. ## What changed 1. **Optional questions** (`6dbd15064b`). - `PendingInteractionUserQuestionQuestion` gains `required`; questions persisted before this change parse as required. - The shared question form labels optional questions "Optional" and lets you submit without them. - The server accepts a missing or empty answer only for optional questions. - The CLI's `bb thread interactions show` prints `Optional: may be left unanswered`, and `answer` accepts answers that skip optional questions. The guide template is updated. - Existing providers set `required: true` explicitly. - **Wire change:** `HOST_DAEMON_PROTOCOL_VERSION` 257 → 258, because an older daemon parses interaction payloads with the old schema and would drop `required: false`. - **Plugin SDK** 0.6.97 → 0.6.98, because the SDK's bundled types include the user question type. 2. **ACP fixes, in ACP's own parser** (`04514cb8af`). - Fields not listed in `requestedSchema.required` become optional questions; unanswered ones are left out of `content`. - A choice field `X` absorbs an optional plain-text `X__other` or `X_other` field into one question with free text. If the choice has an `other` value, that option is hidden and typed text selects it (Droid). Otherwise typed text goes only to the companion field (omp). A required choice without an `other` value keeps its companion as a separate question. Option labels are never matched. - The question cap is counted after folding. - A form bb cannot show is answered with a JSON-RPC error (`-32602`, `bb cannot show this form: <reason>`) instead of a decline. 3. **Cap raised to 10 questions** (`030c89be6c`): `USER_QUESTION_MAX_QUESTIONS`, plus the ask-user-question tool's schema, description and overview. 4. **Long titles shortened, not rejected** (`8d247d87c1`). - **Pi:** accepts long extension dialog titles, shortens the card heading to 160 characters, and carries the full title in the payload (`fullTitle`), which the card shows. - **Codex async questions:** shortens the heading; the card already shows the full question. 5. **Question tabs on narrow cards** (`771e53b6f1`). With more questions, the tab row ran off phone-width cards. - Whenever the current question changes, only the tab row scrolls, so the current tab sits clear of the edge. - Each edge with more tabs past it fades into the card's `surface-recessed-solid` background; nothing fades when every tab fits. - `OverflowFade` gains a `surface-recessed` tone. ### Still reported as a cancel or decline - **omp 18.0.5:** bb now sends the error, and omp's log shows it received `RequestError: bb cannot show this form: bb shows at most 10 questions and this form has 11` (code -32602). But this omp version treats an error, a decline and a cancel the same way and tells its model "Ask tool was cancelled by the user". Fixing what the model sees needs a change in omp. - **Pi:** Pi's RPC protocol has no error response. A malformed request, a failed hand-off to bb, or an error coming back from bb still reaches the extension as `{ cancelled: true }`. Shortening titles removes the common cause. - **ACP, failed hand-off:** a question that fails to reach bb after planning, including a daemon interrupt, still answers the agent with `cancel`. - **ACP, unreadable answer:** a typed answer that does not fit its field (for example "abc" for a number) still declines the whole form, as before. - **ask-user-question:** a question header over 160 characters makes the tool call fail with an error that reaches the agent as a tool error, not a decline. ## How you verified **Regression tests (each fails on main, passes here):** - ACP planner: omp and Droid folding, `required` handling, the cap counted after folding, and Other labels not treated as the `other` value. - ACP bridge, through a fake ACP agent: both folding conventions end to end, and an unshowable form answered with an error. - Server public interactions route: optional answers. - CLI `answer` with an optional question skipped. - Shared question form: optional submit and the tab scrolling and fades. - ask-user-question: tool schema and a seven-question call. - Pi coordinator: titles of 160, 161, 200, 201 and 4096 characters. - Codex async questions: a long title. - Daemon contract: rejects 257, accepts 258. **Suites:** - `pnpm exec turbo run lint typecheck --filter='...[origin/main]'` passes (153 tasks). - Full suites pass for `@bb/server` (3726), `@bb/app` (6414), `@bb/provider-bridge-acp`, `@bb/domain`, `@bb/host-daemon-contract`, `@bb/cli`, `@bb/shared-ui`, `@bb/thread-view`, `@bb/plugin-registry`, and the plugins `provider-codex`, `provider-pi`, `provider-claude-code`, `ask-user-question` and `push-notifications`. **Live, against `pnpm start:worktree` for this branch and for `origin/main`, with real agents:** | Issue | Agent | Main | This branch | |---|---|---|---| | #6031 | omp 18.0.5 `ask`, 1 question | 2 questions; `bb thread interactions answer` with only the choice fails: `Missing answer for question 'q0__other'` | 1 optional question. Typed "gamma-hotfix" via Other in the UI; omp replied `You picked: gamma-hotfix` | | #6508 / #6266 cap | omp, 5 questions (10 fields) | No card; "The agent asked a question bb could not show" | One card, 5 tabs. Answers (including custom text and a skipped question) reached omp | | #6266 error | omp, 11 questions | Declined | bb sends the error (see omp caveat above) | | #3264 | Pi + AskUserQuestion, 7 questions | The model sent only D1–D4 because of the 4-question limit | One card, D1–D7; all 7 answers reached Pi | | #4264 Pi | Pi 1.4.0 extension `ui.select` with a 239-character approval title | No card; the extension got `CANCELLED` | Shortened heading with the full title in the card; the extension got `Allow for session` | | #4264 Codex | codex-cli 0.164.0 `request_user_input_async` (model `gpt-6.1-terra`), 212-character question | `{"accepted":true}` but no card; server log: `ui.requestInput title must be 1-160 characters` | Card opened; the answer went back and Codex continued | The tab strip was checked at 390px with 5 and 10 omp questions (first, middle and last question) and at 1280px. Screenshots were taken in light mode at desktop and phone widths. **Not run live:** Droid (#6131), because it is not installed on the test machine. Its `question_N` / `question_N_other` shape is covered by the planner and bridge tests only. Fixes #6031 Fixes #6131 Fixes #6266 Fixes #6508 Fixes #3264 Fixes #4264 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
ACP and Codex each translated MCP-style
requestedSchemaforms into bb questions with their own code, and both mapped onto a question type that could not say a field is optional. ACP split "Other" free-text companions into separate required questions (#6031), ignoredrequestedSchema.required(#6131), counted the 4-question cap before folding and reported unsupported forms to the agent as a user decline (#6266).What changed
One translator in
@bb/provider-bridge-protocol/bridge-kit/elicitation-formnow normalizes and validates these forms for both the ACP bridge and the Codex plugin (Codex reaches it through a newinternal_DO_NOT_USE_SDK subpath, recorded indocs/api_to_audit.md; plugin SDK bumped to 0.6.98). Questions gainrequired(defaulttrue), and the shared question UI and CLI label optional ones.Wire change:
HOST_DAEMON_PROTOCOL_VERSION257 → 258. A 257 daemon would striprequired: falseand the server would default it back totrue, so daemons must update before connecting.Visible behaviour changes:
<name>and an optional plain-text<name>__otheror<name>_otherfield into one question with free text, for every agent; no dialect is involved. When the choice has an exactothervalue, that option is hidden and typed text selects it (Droid); otherwise typed text goes only to the companion (omp). A required choice without anothervalue, a required companion, or a formatted companion stays separate. Option labels are never matched, so the old English “Other” label matcher is gone.How you verified
The three issue bodies and comments in the Swing 2 storage were compared against fetched main's planner and bridge.
q0__other. It fails against main's production planner.acp-main.log: 7 failures / 4 passes when the new planner tests run against main's production planner. Several failures cover the issue regressions; the diagnostic wording assertion also changes intentionally.Passed:
Limits: no live omp/Droid session, browser journey, or iOS verification was run. UI verification is component-level. The verification inventory preflight reports an existing unmapped
diagnosticsCLI family; no unrelated inventory rewrite was made. Recorded ACP parity uses Cursor recordings, so it supplements rather than replaces the omp/Droid planner regressions.The shared translator replaces the Codex-local copy; no sibling implementation is retained.
Fixes #6031
Fixes #6131
Fixes #6266
🤖 Generated with Claude Code