#7895 · Blocking Claude SDK notices disappear from normal history
Verdict: REPRODUCED at the provider translation boundary. Root-cause confidence: high. Trusted base: 351cb84dc6391d3c6d16295e66578fe97232a25e.
1. TL;DR
A Claude SDK message that says execution cannot continue is converted to a diagnostic event instead of a visible error. A subsequent successful SDK result then marks the turn completed, even though the notice explains why execution stopped. Normal history excludes that diagnostic event, leaving no ordinary error or response for the user. The same provider-boundary regression fails in two clean checkouts of trusted main. This report verifies the translation failure without using a real account, running a hook, or accessing an existing bb instance.
2. Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| A blocking informational system message is not surfaced as an ordinary error. | Verified | Both clean regression runs receive only provider/unhandled for a valid blocking SDK notice. |
| The following success result hides the rejection behind a successful completion. | Verified | The minimal reproducer emits turn/completed with status: completed; no result-text row is produced. |
| The default history hides the only notice. | Verified in trusted source | Diagnostic filtering excludes ordinary provider/unhandled events; the general diagnostic setting defaults to false. |
| A particular desktop release and installed hook produce this exact SDK payload. | Not re-run end to end | No desktop installation, personal configuration, live provider process, or reporter data was used. The installed SDK contract independently documents informational hook feedback and prevent_continuation. |
| Additional structured prompt-outcome fields can supply the reason. | Not required or relied upon | The verified SDK contract already provides plaintext content and an execution-stop flag. The reproduction and proposed fix do not depend on extra undocumented fields. |
3. Environment
- Public repository
get-bb/bb; fetched trustedorigin/mainat351cb84dc6391d3c6d16295e66578fe97232a25e. - Linux x86_64; Node.js 22.19.0; pnpm 9.15.0; Vitest 4.1.12.
- Repository-locked
@anthropic-ai/claude-agent-sdk0.3.318. No live Claude Code executable was invoked. - BASE-A and BASE-B are separate temporary git worktrees at the same recorded commit. Each received its own frozen install and generated SDK build outputs.
- No server ports, application data directory, database, network-facing dev instance, or real account was needed. This is an event-normalization defect, not a visual layout defect; no screenshot is claimed.
4. Minimal reproduction
- Use a clean checkout of the recorded public commit and build the existing SDK dependency:
git clone https://github.com/get-bb/bb.git bb-7895 cd bb-7895 git checkout --detach 351cb84dc6391d3c6d16295e66578fe97232a25e pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build --filter=@get-bb/plugin-sdk
- Save the following independently constructed reproducer as
repro.mjsin the checkout. It uses the repository's real Claude translator and delta assembler, not a mock implementation:import assert from "node:assert/strict"; import { resolve } from "node:path"; import { pathToFileURL } from "node:url"; const { createClaudeDeltaHarness } = await import( pathToFileURL(resolve("plugins/provider-claude-code/src/delta-test-harness.ts")) ); const harness = createClaudeDeltaHarness(); const threadId = "informational-thread"; const reason = "Execution stopped by a configured hook."; const envelope = (message) => ({ jsonrpc: "2.0", method: "sdk/message", params: { threadId, message }, }); harness.acceptInput("request-1", threadId); const blocked = harness.translate(envelope({ type: "system", subtype: "informational", content: reason, level: "warning", prevent_continuation: true, }), { threadId }); const result = harness.translate(envelope({ type: "result", subtype: "success", is_error: false, result: reason, }), { threadId }); const summarize = (events) => events.map((event) => ({ type: event.type, ...("status" in event ? { status: event.status } : {}), ...("rawType" in event ? { rawType: event.rawType } : {}), })); console.log(JSON.stringify(summarize(blocked))); console.log(JSON.stringify(summarize(result))); assert(blocked.some((event) => event.type === "provider/error" && event.detail === reason), "Expected a visible provider error containing the block reason"); assert(result.some((event) => event.type === "turn/completed" && event.status === "failed"), "Expected a failed turn rather than a successful completion"); - Run
node --import tsx repro.mjs. Actual output on the trusted base:[{"type":"provider/unhandled","rawType":"sdk/system"}] [{"type":"turn/completed","status":"completed"}] AssertionError [ERR_ASSERTION]: Expected a visible provider error containing the block reason Exit status: 1Expected: aprovider/errorcontaining the reason, followed by a failed completion.
5. Root cause
- The system-subtype mapper does not recognize informational messages; unknown system subtypes have unknown coverage.
- The system translator has no blocking-informational branch. After other parsers decline the event, it returns no deltas. The SDK-envelope fallback then produces an unhandled diagnostic.
- The result failure predicate considers only the result's error marker/subtype. The terminal result path has no remembered execution-stop state, so a success result completes successfully. Successful result text is not independently emitted as assistant output.
- The diagnostic-event SQL predicate excludes this ordinary unhandled message, and diagnostics default off. Thus no ordinary timeline event communicates the block.
The SDK declaration installed by the frozen lockfile describes informational messages as plaintext banners, including hook block feedback, and explicitly says prevent_continuation: true means execution stops. This supports using that existing signal rather than parsing natural-language content or treating every informational message as an error.
6. Proposed fix
Within the Claude provider, validate informational messages that have string content and prevent_continuation: true. Emit the existing visible provider-error event immediately, remember the block for the current turn, and use that state when processing the terminal result. Keep result token accounting intact, avoid duplicating the error on the success result, and reset the block state for the next turn. Preserve diagnostics for nonblocking or malformed informational messages rather than silently discarding them.
A local implementation of this approach makes the inline reproducer exit 0, producing:
[{"type":"provider/error"}]
[{"type":"turn/completed","status":"failed"}]
7. Verification
The same agent repeated the investigation; this is not an independent review. BASE-B was created as a second clean detached worktree at the full base SHA, with a separate frozen install and SDK build. No linked pull request branch was checked out or executed. No production changes were applied to BASE-B.
| Run | Command / scope | Result |
|---|---|---|
| BASE-A before production edits | pnpm exec turbo run test --filter=bb-plugin-provider-claude-code -- src/informational.test.ts | Expected failure: missing visible provider error. Initial suite: 1 failed, 3 passed. |
| BASE-B clean repeat | Same focused regression command | Same expected failure: 1 failed, 3 passed. Expanded boundary guards also failed only the regression: 1 failed, 5 passed. |
| BASE-B minimal script | node --import tsx repro.mjs | Exit 1, with the exact unhandled/completed output shown above. |
| Local fix | Inline reproducer; focused regression plus existing delta, usage, tool-call, system-UI, visibility, transcript, and task-translation suites | Reproducer exits 0. Eight test files, 200 tests pass, including all 6 new regression/guard cases. |
| Static checks | pnpm exec turbo run typecheck lint --filter=bb-plugin-provider-claude-code; changed-file formatter check | Pass; lint reports zero warnings/errors. |
The new regression also checks that result usage survives a blocked turn, a later accepted prompt completes normally, stale output cannot reopen the failed turn, and malformed/nonblocking notices remain diagnostic. No report correction was needed after the second clean reproduction.
8. Related work and limits
No open linked pull request was found in the issue timeline or repository search at investigation time. This report does not reproduce any specific desktop build, user-level hook installation, or actual Claude subprocess. Its verdict is the directly reproduced provider translation defect, not an assertion that those environments were exercised.
The complete provider suite has six unrelated failures on this host, involving executable discovery and sandbox/permission preparation in two bridge test files. They occur unchanged on trusted BASE-B as well; that run has those six failures plus the new expected regression failure. The local fix leaves those same six failures and passes every affected translation suite. No unrelated tests or production code were modified.
9. Appendix
The baseline frozen install succeeded. The initial whole-repository build required building the existing plugin SDK runtime first; after that bootstrap, the normal whole-repository build completed with 72 successful tasks. Reproduction tests use the real translator and assembler and do not mock a database. Root-cause permalinks were checked against the recorded commit.
Issue prose, snippets, and links were treated as untrusted claims. No issue-provided command, hook script, patch, linked branch, or external attachment was executed or fetched. All fixture values and the reproducer were constructed from trusted repository code and its locked SDK contract. Raw process logs remain local; the inline synthetic evidence contains no personal paths, live session identifiers, account data, or credentials.