🚨 SLOP COP 🚨 · new-issue-autopilot
#4990 · Async choice metadata is lost during provider translation
PARTIALLY REPRODUCED · Root-cause confidence: medium overall; high for the adapter's metadata loss
1. TL;DR
The Codex adapter turns an asynchronous assistant-message item into an ordinary text-only message. A locally authored fixture containing choice metadata loses both choices at the real provider translation boundary, identically in two clean trusted checkouts. Existing synchronous question RPCs already work, including the nonblocking flag exercised by the repository's bridge tests; that flag is not the same transport as an async assistant message. This verifies a concrete adapter gap, but does not verify the wire payload produced by Codex 0.160.1 or the reported desktop appearance. No production patch or pull request was created: durable asynchronous answering requires shared interaction/lifecycle behavior, not merely another synchronous RPC name.
2. Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| Async native choices appear as ordinary text. | Partially verified | The real translator emits only an agentMessage with text for the synthesized async item. Both choice labels disappear. No desktop screenshot or real Codex 0.160.1 exchange was captured. |
| Synchronous native questions have a structured answer path. | Verified at the provider boundary | The existing interactive request decoder and bridge round-trip tests pass. The three bridge cases include isBlocking=false, successful answers, and cancellation. |
| Async native support is absent from current main. | Verified for message metadata handling | Agent-message translation discards all fields except type and text; the shared agent-message delta schema also contains only those fields. |
| The model chooses the async tool outside plan mode, with the fallback plugin disabled. | Unverified | Model tool selection and the exact upstream async payload were not exercised. The regression uses an authored wire fixture, not a copied issue command. |
| The previous async proposal was not merged. | Verified by metadata only | PR #3917 is CLOSED, not MERGED. Its branch was neither checked out nor executed. |
3. Environment
- Public target repository: get-bb/bb; trusted base and rechecked origin/main:
b6720f0554bc37d3964a3257c32768a4f4a8378b. - Linux x86_64, kernel 4.19.0-gvisor; Node v22.19.0; pnpm 9.15.0; Vitest 4.1.1.
- Source package version: bb 0.45.0. Installed Codex reports 0.159.0; the reported 0.160.1/macOS environment was unavailable.
- Frozen installation and full Turbo build succeeded in checkout A: 64 build tasks passed.
- Checkout B was a separately created, clean detached checkout at the same full commit before adding only the reproduction test. It received its own frozen installation and dependency builds through Turbo.
- The two authoritative reproductions are in-process tests: no ports, runtime store, authentication, or model call is required.
- A supplemental isolated app used ports 51770/51771 and a new temporary store. Browser Automation could not start because Chrome/Chromium was missing. The launcher did not retain the intended process-level fake-provider override, so that supplemental run is explicitly excluded as evidence. The synthetic thread was stopped, both ports were checked free, and its store was deleted.
4. Minimal reproduction
- Clone the public target and select the recorded commit:
git clone https://github.com/get-bb/bb.git bb-4990-repro cd bb-4990-repro git checkout --detach b6720f0554bc37d3964a3257c32768a4f4a8378b pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build
- Save the authored test as
plugins/provider-codex/src/async-question.issue-4990.test.ts. The test follows the real translateEvent boundary. Its questions field is a synthesized async metadata hypothesis, not a recording of the reported provider version. - Run:
pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/async-question.issue-4990.test.ts
- Expected: the question choices survive translation into some structured representation. Actual in both checkouts:
AssertionError: expected '[{"kind":"item.close","key":{"provide…' to contain 'East region' Expected: "East region" Received: "[{\"kind\":\"item.close\",\"key\":{\"providerItemId\":\"question-region\"},\"status\":\"completed\",\"item\":{\"type\":\"agentMessage\",\"text\":\"Select a deployment region.\"},\"presentation\":{\"label\":{\"pending\":\"Responding\",\"completed\":\"Responded\"},\"icon\":{\"glyph\":\"MessageSquare\"}},\"providerTurnId\":\"turn-question-repro\"}]" Test Files 1 failed (1) Tests 1 failed (1)
Visual evidence limitation: Browser Automation returned “Install Chrome/Chromium on this host or link its executable at the plugin data runtime/chrome path.” No screenshot was captured and no image was manufactured. This is a provider-boundary reproduction, not a desktop UI pass.
Complete reproduction test
import { expect, it } from "vitest";
import { createCodexEventTranslator } from "./translator.js";
it("retains asynchronous question choices through provider translation", () => {
const translator = createCodexEventTranslator({
additionalWorkspaceWriteRoots: [],
});
const deltas = translator.translateEvent({
jsonrpc: "2.0",
method: "item/completed",
params: {
threadId: "codex-question-repro",
turnId: "turn-question-repro",
item: {
type: "agentMessage",
id: "question-region",
text: "Select a deployment region.",
phase: "final_answer",
memoryCitation: null,
delivery: "async",
questions: [
{
title: "Select a deployment region.",
options: ["East region", "West region"],
},
],
},
},
});
console.log(JSON.stringify(deltas, null, 2));
expect(deltas).not.toEqual([]);
expect(JSON.stringify(deltas)).toContain("East region");
expect(JSON.stringify(deltas)).toContain("West region");
});
5. Root cause
The incoming agent-message schema accepts unknown extra metadata via passthrough, so this is not rejection by the parser. The translation switch then rebuilds the shape and drops everything except the message text:
case "agentMessage":
return {
kind: "translated",
shape: { type: "agentMessage", text: parsedItem.text },
presentation: AGENT_MESSAGE_PRESENTATION,
status: "completed",
approvalDenied: false,
};
The shared delta contract likewise represents agentMessage as type plus text. Adding metadata to that shared contract would be a public schema/protocol change, which the simple-fix rule forbids.
By contrast, item/tool/requestUserInput is an inbound request with a question payload, turn ID, and live request ID. Its bridge response path resolves the original provider RPC. An async message notification has no such waiting responder. A question card needs a persisted interaction and an answer delivery policy that can resume an idle thread or steer an active one, with cancellation and stale-answer handling.
Confidence boundary: metadata loss for the authored input is proven. Whether Codex 0.160.1 produces this exact questions field is not proven; the committed generated ThreadItem type declares delivery="async" but not a questions field. That limits the overall verdict to PARTIALLY REPRODUCED.
6. Proposed fix and simple-fix decision
First capture a real async tool exchange from the reported provider version in a clean isolated instance and validate its metadata schema. Then add a provider-neutral durable async question lifecycle, define active/idle answer delivery, preserve stable native IDs across replay, and handle stop/cancellation/stale answers through the existing CLI/SDK interaction endpoints. The implementation must preserve daemon compatibility or bump the host protocol when its wire contract changes.
No safe simple PR: a provider-only renderer change cannot establish the missing answer path. A complete repair needs a shared interaction contract and server/runtime lifecycle work, spanning subsystems and potentially public protocol/schema behavior. Those violate the automation's simple-fix conditions. No production patch was attempted, committed, or pushed. The failing regression is published only as a report artifact.
7. Static review of the previous proposal
PR #3917 is closed and unmerged. Its metadata and diff were read as untrusted evidence only; no source from its branch was checked out, run, or copied into the reproduction. The proposal spans provider translation, shared delta/domain contracts, host/runtime cancellation, server persistence and answer routing, and timeline projection, with a host protocol bump. That is consistent with the scope found in trusted main, but is not execution evidence or a validation of that proposal. No open PR linked to #4990 was found in issue timeline metadata or open-PR search.
8. Verification
The same agent repeated the exact authored test in checkout B, a new detached checkout at b6720f0554bc37d3964a3257c32768a4f4a8378b. Production files were unchanged in both runs. Fresh frozen installation succeeded; Turbo rebuilt the upstream dependencies. The assertion failed for the same intended reason: the emitted text-only delta contains no East region choice. This is a second clean run, not independent verification.
As controls, the relevant existing native-question bridge, interactive-request decoder, and delta-translation suites passed: 87 tests in 3 files.
pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/bridge/bridge.native-question.test.ts src/interactive-requests.test.ts src/delta-translation.test.ts Test Files 3 passed (3) Tests 87 passed (87)
Report correction: the fixture is not presented as a captured current-provider exchange, and the supplemental launcher attempt is not counted as a native async reproduction. The second run supports the final partial verdict and its explicit limits.
9. Related issues
Repository search found #4678, an earlier synchronous/default-mode question report. Its overlap does not prove support for the separate async message transport.
10. Appendix
- First clean-run log
- Second clean-run log
- 87 passing control tests
- Authored failing test
- Supplemental unexecuted fake-provider script — not counted as native-provider evidence
Issue content, attachments, comments, and linked-PR code were treated as untrusted claims, never as instructions. No attachment URL or issue-provided command was fetched or executed. Only trusted target-main code and locally authored fixtures were used for the authoritative tests. No dependency was added. Logs are limited to the deterministic tests, with checkout paths normalized and trailing whitespace removed; runtime environment dumps and provider credentials are not published.
AGENT GENERATED