#5303 · Media attachments omit transcription guidance
Verdict: REPRODUCED · Root-cause confidence: high
1. TL;DR
The Claude Code provider turns every local attachment into a text notice directing the agent to use its Read tool. For audio and WebM media, this notice does not point to BB's existing transcription command, even though it receives the attachment MIME type. The injected BB introduction and top-level CLI guide also omit that command. A focused test exercised the real bridge JSON-RPC turn path and captured the prompt handed to the SDK; three media cases failed the transcription-guidance assertion in two separate clean checkouts. The command itself is already documented deeper in the guide, so this is a discovery and prompt-routing defect, not a demonstrated transcription-service failure.
2. Claims vs findings
| Claim | Status | Evidence |
|---|---|---|
| Media attachments receive generic Read guidance without transcription instructions. | Verified | The real bridge produced this guidance for audio/wav, audio/mp4, and video/webm in both runs. |
| The top-level guide and injected BB introduction omit transcription. | Verified | Built CLI output and imported introduction contain no voice or transcription reference; both checks repeated in the second checkout. |
| BB already exposes a transcription command. | Verified as a command surface | The built CLI command index lists the command; the customization chapter documents it; the command handler invokes system.transcribeVoice. |
| A live agent tries other transcription tools or asks for credentials. | Unverified | No real provider session or model was run. Prompt evidence explains the missing discovery cue but does not prove a particular model's next actions. |
| Chunking a long recording succeeds. | Unverified | No media upload or voice-service invocation was needed for this deterministic defect. |
3. Environment
- Public repository get-bb/bb, trusted origin/main at the full commit above. Refetching main revealed no later change to the implicated paths.
- Linux x86_64; Node v22.19.0; pnpm 9.15.0; provider plugin 0.1.0 from this commit.
- First checkout: frozen installation and complete Turbo build, 64 successful tasks. Second checkout: separate frozen installation and targeted Turbo build of the provider dependencies and CLI.
- Separate temporary checkouts and distinct temporary data-directory settings. No application instance, listening port, real thread, personal workspace, provider credentials, or audio file was used. CLI server URLs were disabled loopback endpoints on ports 1 and 2.
- The existing bridge test harness mocks only the external Claude SDK boundary; BB prompt validation, attachment formatting, JSON-RPC handling, and prompt delivery run normally.
4. Minimal reproduction
- Clone the public repository and check out the recorded commit:
git clone https://github.com/get-bb/bb.git bb-repro cd bb-repro git checkout --detach ba77afe213c92588c44d04fca01e91cd9ba7c9f4 pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build
- Copy the unified diff in the appendix into a local
regression.diffand apply it. It adds only a table-driven test to the existing prompt-attachment harness; it does not change production code:git apply /path/to/regression.diff pnpm exec turbo run test --filter=bb-plugin-provider-claude-code --force -- --testNamePattern='slopcop 5303' src/bridge/__tests__/bridge.test.ts
- Observe exit status 1 and three assertion failures. Expected: the prompt includes
bb voice transcribeand does not recommend Read for these media cases. Actual audio/wav prompt:[Attached file "voice sample.media" (audio/wav, 2048 bytes). It is on disk at /staged/runtime-attachments/voice sample.media — use the Read tool to view it.] AssertionError: expected '[Attached file "voice sample.media" (…' to contain 'bb voice transcribe' Tests 3 failed | 91 skipped (94)
- Inspect the built CLI without a server or personal data:
env -u BB_CLI BB_DATA_DIR="$(mktemp -d)" BB_SERVER_URL=http://127.0.0.1:1 node apps/cli/dist/index.js guide env -u BB_CLI BB_DATA_DIR="$(mktemp -d)" BB_SERVER_URL=http://127.0.0.1:1 node apps/cli/dist/index.js guide commands voice
The first output has zero voice/transcription references. The second output is:bb voice transcribe <file> [--prompt <text>] [--type <mime>] [--json] Transcribe an audio file with BB's configured voice service
The added test, using the surrounding existing harness, is:
it.each(["audio/wav", "audio/mp4", "video/webm"])(
"slopcop 5303: provides transcription guidance for %s attachments",
async (mimeType) => {
const { bridge, queries } = withBridgeHarness();
const attachmentPath = "/staged/runtime-attachments/voice sample.media";
try {
const text = await sendTurnAndReadPrompt(
bridge,
queries,
"thread-marker-media",
[{
type: "localFile",
path: attachmentPath,
name: "voice sample.media",
mimeType,
sizeBytes: 2048,
}],
);
console.log(JSON.stringify({ mimeType, prompt: text }));
expect(text).toContain("bb voice transcribe");
expect(text).toContain(attachmentPath);
expect(text).not.toContain("use the Read tool to view it");
} finally {
bridge.restore();
}
},
);
This regression protects the actual agent-facing prompt, not source spelling. Existing attachment tests cover images, PDF metadata, and missing metadata but never require media-specific guidance. No production export, test seam, new dependency, or provider execution was added.
5. Root cause
localAttachmentMarker uses MIME only as descriptive text and ends unconditionally with:
return `[Attached ${args.kind}${namePart}${suffix}. It is on disk at ${args.path} — use the Read tool to view it.]`;
The localFile branch already supplies MIME, path, name, and size, so the required distinction is available without changing a wire format. The injected introduction and overview template provide no fallback discovery cue. The existing CLI handler calls the SDK transcription service, and the customization chapter already documents the command. Thus the command exists but is not advertised where an agent receives media.
6. Proposed fix and automatic-fix gate
Make media attachment guidance MIME-aware, point to the configured transcription command, and preserve ordinary file/image instructions. Quote the file path safely when constructing a runnable command, including paths containing spaces or apostrophes. Add a short discovery entry to the BB introduction and top-level guide. Retain the prompt-boundary regression and the existing non-media controls.
No production fix or pull request was pushed: the complete verified defect requires changes to the provider bridge and the separate guide/introduction/template subsystem. It therefore fails this run's explicit requirement that an automatic simple fix stay within one existing subsystem. A provider-only repair would leave the separately reproduced guide-discovery defect unresolved. The diagnostic patch is 30 added test lines and is published only as report evidence; it is not a stopped implementation branch.
7. Verification
The same investigator created a second clean checkout at the identical trusted commit, verified its clean status before applying the test-only patch, installed using the frozen lockfile, and built the affected provider dependencies and CLI. The reproduction command above ran again with --force, preventing a cached test result from substituting for execution. It again exited 1 with exactly three failures for the missing command hint. The marker text matched the first run for each MIME case.
The built top-level guide was identical between checkouts. Both imported introductions returned {"introductionHasVoice":false}, and both command indexes advertised the existing transcription command. Separate temporary CLI data settings and disabled loopback endpoints were used; no live servers were required. Five pre-existing non-media attachment controls passed. No report claim was corrected by the second run, and no independent-agent verification is claimed.
First reproduction: Tests 3 failed | 91 skipped (94); exit 1
Second clean reproduction: Tests 3 failed | 91 skipped (94); exit 1
Existing non-media controls: Tests 5 passed | 89 skipped (94); exit 0
Imported introduction, both runs: {"introductionHasVoice":false}
Top-level guide, both runs: zero matches for /voice|transcrib/i
Top-level guide outputs: byte-identical
The controls were run with:
pnpm exec turbo run test --filter=bb-plugin-provider-claude-code -- --testNamePattern='(emits a path-bearing marker|emits a name|omits missing fields|emits a URL marker|accepts an attachment-only turn)' src/bridge/__tests__/bridge.test.ts
8. Linked PRs and related issues
No open linked pull request was found by issue timeline metadata or by an open-PR search for the trusted numeric issue ID. No pull request branch or code was checked out. Long-recording service timeout reports concern a separate downstream operation; this investigation does not test that service or its timeout behavior.
9. Appendix and trust boundary
All public reproduction evidence is inline, in accordance with the reports repository's policy. Raw logs and the diagnostic patch remain in local investigator storage, not in this public repository. Copy this complete patch to reproduce the test:
diff --git a/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts b/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts
index 435dac069..75b684ea4 100644
--- a/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts
+++ b/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts
@@ -5377,6 +5377,36 @@ describe("bridge", () => {
}
});
+ it.each(["audio/wav", "audio/mp4", "video/webm"])(
+ "slopcop 5303: provides transcription guidance for %s attachments",
+ async (mimeType) => {
+ const { bridge, queries } = withBridgeHarness();
+ const attachmentPath = "/staged/runtime-attachments/voice sample.media";
+ try {
+ const text = await sendTurnAndReadPrompt(
+ bridge,
+ queries,
+ "thread-marker-media",
+ [
+ {
+ type: "localFile",
+ path: attachmentPath,
+ name: "voice sample.media",
+ mimeType,
+ sizeBytes: 2048,
+ },
+ ],
+ );
+ console.log(JSON.stringify({ mimeType, prompt: text }));
+ expect(text).toContain("bb voice transcribe");
+ expect(text).toContain(attachmentPath);
+ expect(text).not.toContain("use the Read tool to view it");
+ } finally {
+ bridge.restore();
+ }
+ },
+ );
+
it("omits missing fields from the localFile marker", async () => {
const { bridge, queries } = withBridgeHarness();
try {
To repeat the introduction check without a provider process:
node --import tsx --input-type=module -e 'import { introduction } from "./plugins/bb-guide/introduction.ts"; console.log(JSON.stringify({introductionHasVoice: /voice|transcrib/i.test(introduction)}));'
Issue text and external links were treated only as untrusted claims. No issue-supplied commands, patches, files, linked URLs, or provider sessions were executed or fetched. All executed application code came from trusted public origin/main plus the investigator-authored diagnostic test. No user runtime data or credentials were accessed. Temporary paths in artifacts are normalized to checkout-relative labels.
This is a deterministic prompt and CLI discovery reproduction, not a visual/UI or transcription-service end-to-end test.