#6666 · Approval requests hide the follow-up editor and omit response text
PARTIALLY REPRODUCED · root-cause confidence: high for the component and response-contract mechanisms
1. TL;DR
A pending interaction deliberately replaces the follow-up editor: its DOM remains mounted to preserve drafts, but the editor's ancestor has the HTML hidden attribute. Separately, follow-up submission becomes blocked while an interaction is pending. Approval controls submit only a decision and, for grants, permission data; their shared schema contains no user-authored reason or note. The Claude adapter turns an ordinary rejection into a fixed message, not a user explanation. Two clean trusted checkouts reproduce the hidden-editor behavior with the same focused failing assertion; a live macOS/Claude approval loop and visual browser check were not possible here.
2. Claims vs findings
| Claim | Status | Evidence |
|---|---|---|
| The follow-up composer is unusable while an interaction is pending. | Verified at the component boundary | The actual FollowUpPromptBox sets hidden=true; the changed visibility expectation fails in both clean checkouts. |
| Approval buttons cannot send a user reason or note. | Verified in source | Decision-only UI callback, decision/permission-only shared resolution schema, and fixed Claude denial text. |
| A denial can immediately be followed by another approval before a redirect is entered. | Unverified end to end | No live Claude session was used. The loss of a simultaneous draft editor is established, but provider timing was not measured. |
| The reported desktop/macOS version exhibits this exact behavior. | Unverified platform/version | Investigation uses current trusted main on Linux, not the reported desktop release. |
| Every elicitation only offers approval buttons. | Too broad | Question and plugin interaction paths have their own answer forms. The main composer is hidden for any rendered pending-interaction node; interaction-specific forms may still accept text. |
3. Environment
- Public target repository: get-bb/bb. Both clean checkouts pinned to
9662c45478f4a74f33f11b70187657d97f1e14a7, fetched from its trusted main branch. - Linux 4.19.0-gvisor; Node v22.19.0; pnpm 9.15.0; Vitest 4.1.1; jsdom component tests.
- Two separate temporary clones named
source/andverify/. Production files remain unchanged; only the existing test expectation and its name change. - No live provider or provider CLI version, no database/data directory, no runtime ports, no production instance access, and no network-facing app process.
- Browser Automation local/headless setup returned:
Install Chrome/Chromium on this host or link its executable at the plugin data runtime/chrome path.No screenshot exists; none is fabricated.
4. Minimal reproduction
- Clone the trusted repository and check out the pinned commit. Install the frozen lockfile. Build the SDK runtime before the normal full Turbo build; the first full-build attempt exposed a missing SDK runtime build, resolved without source changes.
- Run the two existing app suites unchanged:
FollowUpPromptBox.test.tsxandThreadPendingInteractionBanner.test.tsx. Result: 66 tests pass. The original lifecycle test explicitly expects the pending editor to be hidden. - In the existing test named
keeps the editor mounted and hidden while a pending interaction takes its place, rename the case as shown below and change its pending-state assertion fromexpect(composerShell?.hidden).toBe(true)toexpect(composerShell?.hidden).toBe(false). It changes only the existing expectation and test name, not production code, dependencies, mocks, or fixtures. - Run
pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/FollowUpPromptBox.test.tsx -t 'keeps the editor usable while a pending interaction is displayed'
Expected: the retained composer remains unhidden with its draft intact. Actual: the pending interaction makes the retained editor's ancestor hidden, so the expectation fails:AssertionError: expected true to be false // Object.is equality - Expected + Received - false + true Test Files 1 failed (1) Tests 1 failed | 47 skipped (48) - Repeat in a second clean checkout at the same base. The identical assertion fails again, not an import/build/setup error.
Complete setup and verification commands
git clone https://github.com/get-bb/bb.git source
cd source
git checkout --detach 9662c45478f4a74f33f11b70187657d97f1e14a7
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run build
pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/FollowUpPromptBox.test.tsx src/components/thread/pending-interactions/ThreadPendingInteractionBanner.test.tsx
pnpm exec turbo run test --filter=bb-plugin-provider-claude-code -- src/interactions.test.ts
git apply - <<'PATCH'
diff --git a/apps/app/src/components/promptbox/FollowUpPromptBox.test.tsx b/apps/app/src/components/promptbox/FollowUpPromptBox.test.tsx
index 4b39b7538b..4fd3cdf8e3 100644
--- a/apps/app/src/components/promptbox/FollowUpPromptBox.test.tsx
+++ b/apps/app/src/components/promptbox/FollowUpPromptBox.test.tsx
@@ -596,7 +596,7 @@ describe("FollowUpPromptBox", () => {
expect(props.composer?.onSubmit).toHaveBeenCalledOnce();
});
- it("keeps the editor mounted and hidden while a pending interaction takes its place", () => {
+ it("keeps the editor usable while a pending interaction is displayed", () => {
const props = createFollowUpPromptBoxProps({ kind: "ready" });
const { container, rerender } = render(<FollowUpPromptBox {...props} />);
const promptBox = screen.getByTestId("prompt-box");
@@ -624,7 +624,7 @@ describe("FollowUpPromptBox", () => {
expect(screen.getByTestId("prompt-box")).toBe(promptBox);
expect(screen.getByLabelText("Follow-up prompt")).toBe(input);
expect(input.value).toBe("Draft typed before the approval");
- expect(composerShell?.hidden).toBe(true);
+ expect(composerShell?.hidden).toBe(false);
const interaction = screen.getByTestId("pending-interaction");
const stackItem = screen.getByTestId("pending-stack");
expect(
PATCH
pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/FollowUpPromptBox.test.tsx -t 'keeps the editor usable while a pending interaction is displayed'
Regression test
The following is the changed existing lifecycle test, using the repository's existing fixture and child-control mocks; FollowUpPromptBox itself is real. This proves the owning component's visibility policy, not browser focus behavior or a live approval round trip. Apply the patch to run it; this excerpt is not a standalone test file.
it("keeps the editor usable while a pending interaction is displayed", () => {
const props = createFollowUpPromptBoxProps({ kind: "ready" });
const { container, rerender } = render(<FollowUpPromptBox {...props} />);
const promptBox = screen.getByTestId("prompt-box");
const input = screen.getByLabelText<HTMLInputElement>("Follow-up prompt");
input.value = "Draft typed before the approval";
const composerShell = container.querySelector<HTMLElement>(
"[data-follow-up-composer]",
);
expect(composerShell?.hidden).toBe(false);
rerender(
<FollowUpPromptBox
{...props}
composer={{
...props.composer!,
submitMode: { kind: "blocked", reason: "pending-interaction" },
}}
stack={<div data-testid="pending-stack">Plan mode</div>}
pendingInteraction={
<div data-testid="pending-interaction">Allow file write?</div>
}
/>,
);
expect(screen.getByTestId("prompt-box")).toBe(promptBox);
expect(screen.getByLabelText("Follow-up prompt")).toBe(input);
expect(input.value).toBe("Draft typed before the approval");
expect(composerShell?.hidden).toBe(false);
const interaction = screen.getByTestId("pending-interaction");
const stackItem = screen.getByTestId("pending-stack");
expect(
stackItem.compareDocumentPosition(interaction) &
Node.DOCUMENT_POSITION_FOLLOWING,
).not.toBe(0);
expect(
interaction.compareDocumentPosition(promptBox) &
Node.DOCUMENT_POSITION_FOLLOWING,
).not.toBe(0);
rerender(<FollowUpPromptBox {...props} />);
expect(screen.getByTestId("prompt-box")).toBe(promptBox);
expect(screen.getByLabelText("Follow-up prompt")).toBe(input);
expect(composerShell?.hidden).toBe(false);
expect(screen.queryByTestId("pending-interaction")).toBeNull();
});
5. Root cause
A. The pending interaction hides the editor and blocks its submit mode
apps/app/src/components/promptbox/FollowUpPromptBox.tsx:261
pendingInteraction = null,
}: FollowUpPromptBoxWithComposerProps) {
const submitMode = composer.submitMode;
const hasPendingInteraction =
pendingInteraction !== null && pendingInteraction !== undefined;
const isStopping = submitMode.kind === "queue-while-stopping";
const canQueueFollowUp = submitMode.kind === "queue" || isStopping;
const canSubmit = submitMode.kind === "ready" || canQueueFollowUp;
apps/app/src/components/promptbox/FollowUpPromptBox.tsx:708
const composerElement = (
<div
ref={composerInteractionRef}
className="relative z-20"
data-follow-up-composer=""
data-follow-up-composer-expanded={isEditorExpanded ? "" : undefined}
data-follow-up-composer-footer-visible={
isCompactViewport && isEditorExpanded ? "" : undefined
}
hidden={hasPendingInteraction}
onBlurCapture={scheduleCollapseAfterFocusLoss}
ThreadDetailPromptArea computes whether any ordered pending interaction exists and passes that state into the shared submission policy. Unhiding the editor alone would not restore a working send/queue path:
packages/client-core/src/prompt/threadDetailPromptSubmission.ts:117
export function buildFollowUpSubmitMode({
hasPendingInteraction,
isDefaultExecutionOptionsLoading,
isStopRequested,
onStop,
runtimeDisplayStatus,
}: BuildFollowUpSubmitModeArgs): FollowUpSubmitMode {
if (isStopRequested) {
return { kind: "queue-while-stopping" };
}
if (hasPendingInteraction) {
return { kind: "blocked", reason: "pending-interaction" };
}
if (shouldQueueFollowUpMessage(runtimeDisplayStatus)) {
return { kind: "queue", onStop };
}
if (isDefaultExecutionOptionsLoading) {
return { kind: "blocked", reason: "loading-execution-options" };
}
return { kind: "ready" };
}
B. Approval text is absent from the contract, not merely omitted from one button
apps/app/src/components/thread/pending-interactions/ThreadPendingInteractionBanner.tsx:200
const submitDecision = (
decision: PendingInteractionApprovalDecision,
): void => {
const resolution = buildPendingInteractionApprovalResolution(
interaction,
decision,
);
void resolvePendingInteraction
.mutateAsync({ threadId, interactionId: interaction.id, resolution })
.catch(() => {});
packages/core-ui/src/pending-interaction-formatting.ts:260
export function buildPendingInteractionApprovalResolution(
interaction: PendingInteraction,
decision: PendingInteractionApprovalDecision,
): PendingInteractionResolution {
if (decision === "deny") {
return {
decision,
};
}
return {
decision,
grantedPermissions: resolveGrantedPermissionsForApproval(
interaction,
decision,
),
};
}
packages/domain/src/pending-interactions.ts:410
export const approvalPendingInteractionResolutionSchema = z.discriminatedUnion(
"decision",
[
z.object({
decision: z.literal("allow_once"),
grantedPermissions:
pendingInteractionGrantedPermissionProfileSchema.nullable(),
}),
z.object({
decision: z.literal("allow_for_session"),
grantedPermissions:
pendingInteractionGrantedPermissionProfileSchema.nullable(),
}),
z.object({
decision: z.literal("deny"),
}),
],
approvalDecisionDiscriminatorError,
The approval footer renders decision buttons, with no reason/note field. The shared schema permits a deny decision or an allow decision plus granted permissions. No typed response-text field is available to forward through SDK, CLI, server, daemon, and provider adapters.
C. Claude rejection text is fixed
plugins/provider-claude-code/src/interactions.ts:336
if (args.resolution.decision === "deny") {
return {
kind: "permission_request",
behavior: "deny",
message:
args.payload.subject.kind === "plan"
? buildClaudePlanRejectionMessage()
: "Permission request denied",
decisionClassification: "user_reject",
};
}
if (args.resolution.decision === "allow_once") {
return {
kind: "permission_request",
behavior: "allow",
decisionClassification: "user_temporary",
};
}
const permissions = resolveClaudeGrantedPermissions(
args.resolution.grantedPermissions,
);
const updatedPermissions = buildClaudeSessionPermissionUpdates({
Ordinary denials become Permission request denied; plan rejections use a generated plan-specific message. This explains why clicking Deny cannot redirect the model with user-authored text. The live model's next-request timing remains unmeasured.
6. Proposed fix and simple-fix decision
Separate editing a draft from sending or resolving an interaction. Preserve the editor and its draft during pending interactions, then explicitly define whether a redirect queues, cancels/steers, or becomes feedback attached atomically to the decision. Add denial feedback and optional approval annotation only with an end-to-end typed contract and provider-specific handling. An approval note must not imply that arbitrary natural-language conditions are enforced as a permission boundary.
No automatic fix or pull request. The requested behavior crosses the shared approval schema and permission-response semantics, and needs a product decision about atomic ordering and conditional approval. These violate the rule's simple-fix exclusions even if a small UI-only patch fits the line limit. No production patch, branch, commit, or push was attempted. GitHub metadata and an open-PR search found no open PR linking this issue at investigation time.
7. Verification
The same investigator repeated the reproduction in a second newly cloned checkout, not a reset of the first one. Before applying the test-only patch, its HEAD was the exact trusted base and its tracked working tree was clean. A fresh frozen install and full Turbo build succeeded: 72 successful tasks. The focused test was then applied and run with the exact command above; result: one failed test, 47 skipped, expected true to be false, matching the first run. No new ports or data directories were needed because this is a component test. The report therefore claims partial reproduction, not an independently verified live desktop workflow.
No correction to the visibility mechanism was needed after the second run. Claims about macOS, browser focus, and successive Claude prompts remain explicitly unverified. The unchanged first-checkout app suites pass 66 tests, and the existing Claude interaction suite passes 25 tests. git diff --check passes for the test-only changes in both clones. All code links below refer to the pinned commit, not mutable main.
8. Related issues
The separate hidden-thread waiting issue (#4407) and provider-mode automatic-denial issue (#4645) concern different entry conditions; this report does not claim to reproduce either. The related permission-mode issue (#6667) was not investigated. Only #6666 was processed.
9. Appendix
Raw logs and the test patch are retained locally, not published, in accordance with the reports repository's policy. All steps, the test, and exact expected/actual output needed to reproduce are inline above. Test exit status 1 is the intended reproduction result, not an unexplained validation failure.
Issue content was treated solely as untrusted claims. No issue-provided commands, URLs, scripts, patches, or linked branches were executed. No investigation workflow or subagent was started, no dependency was added, and no user runtime or credentials were read. The browser attempt failed before creating a session; no app, browser, server, port listener, or runtime data was started by this investigation, so there is no such process/data cleanup to perform.
> AGENT GENERATED