#7185 · Uninitialized SDK messages overwrite the Claude session identity
Issue #7185 · 2026-11-06 · trusted base 14b3293254da0a3b4c858a01c5415d91f17aa7b5
Verdict: REPRODUCED · Root-cause confidence: high · Scope: deterministic provider-bridge reproduction, not a physical sleep/wake experiment.
1. TL;DR
A failed Claude startup can change the identity that bb uses to resume a conversation. The bridge accepts a changed session ID from an SDK error result even when the SDK never announced an initialized session. It then marks that ID restorable, probes context against it, and uses it to restart the next process. Two runs on unchanged trusted production code demonstrate all three consequences. A local root-cause fix passes the expanded regression, but was not pushed because the existing provider suite has six failures on both baseline and candidate.
2. Claims vs findings
| Claim | Status | Evidence |
|---|---|---|
| A result before initialization replaces the saved identity. | Verified | The real bridge emits thread/identity for the injected startup ID in both clean runs. |
| The next process resumes that replacement ID. | Verified | The second SDK query receives resume: startup-attempt instead of persisted-session. |
| Context reporting also targets the unannounced ID. | Verified | The isolated query mock receives resume: startup-attempt. |
| Sleep/wake causes an organization-settings network failure on the reported Mac. | Unverified | No Mac, wake cycle, network failure, or organization policy fetch was used. The controlled SDK error is an execution-error fixture, not a reproduction of that trigger. |
| The replacement ID has no persisted transcript, so future real Claude invocations cannot load it. | Not directly verified live | The poisoned resume argument is proven. The controlled query has no transcript store; no real conversation or user data was accessed. |
3. Environment
- Repository: public get-bb/bb; trusted origin/main commit
14b3293254da0a3b4c858a01c5415d91f17aa7b5. - Linux x86_64; Node v22.19.0; pnpm 9.15.0; installed Claude agent SDK 0.3.318.
- Two separate git worktrees at the same recorded commit. Both production trees were unchanged for reproduction; only an independently authored test was applied.
- No live Claude CLI process or authentication was used. The existing query mock feeds SDK messages to the real bridge and SdkSession.
- No server, browser, TCP port, runtime database, or bb data directory was started. The test harness creates and removes its own temporary fixtures.
Frozen dependency installation succeeded. The first full build needed the repository-prescribed SDK type bootstrap; after pnpm exec turbo run build:types --filter=@get-bb/plugin-sdk, the complete build passed all 73 tasks.
4. Minimal reproduction
Use a clean checkout of the trusted base, not a contributor branch. Copy the complete patch below into a local file named regression.patch, then:
git clone https://github.com/get-bb/bb.git bb-7185 cd bb-7185 git checkout --detach 14b3293254da0a3b4c858a01c5415d91f17aa7b5 pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build:types --filter=@get-bb/plugin-sdk git apply /path/to/regression.patch pnpm exec turbo run test --filter=bb-plugin-provider-claude-code -- src/bridge/__tests__/bridge.test.ts -t "preserves the resumed identity when startup"
- The test resumes a known synthetic conversation, persisted-session.
- It starts a turn and injects an SDK result with an execution error and session ID startup-attempt, without any system/init.
- It ends the SDK stream, then starts another turn to force a new SDK process.
- It checks the emitted identity, isolated context query, and new query's resume option.
Expected: no identity notification or context probe adopts startup-attempt; the next query resumes persisted-session. The failed turn must still be reported normally.
Actual: both runs fail exactly the identity, context-probe, and restart assertions. Selected output follows; complete sanitized output is included below.
"providerThreadId": "startup-attempt", AssertionError: expected [ 'startup-attempt' ] to not include 'startup-attempt' AssertionError: expected 'startup-attempt' to be 'persisted-session' // Object.is equality Expected: "persisted-session" Received: "startup-attempt" Tests 1 failed | 107 skipped (108)
The report is self-contained. The runnable patch and both runs' output are included inline, in accordance with the report repository's public-artifact policy.
Complete runnable regression patch
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 cacbb5b240..18e12b51b4 100644
--- a/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts
+++ b/plugins/provider-claude-code/src/bridge/__tests__/bridge.test.ts
@@ -5673,6 +5673,75 @@ describe("bridge", () => {
}
});
+ it("preserves the resumed identity when startup returns an unannounced session", async () => {
+ const bridge = createBridgeJsonRpcTestHarness(handleLine);
+ const queries: ControlledClaudeQuery[] = [];
+ queryMock.mockImplementation(() => {
+ const query = createControlledClaudeQuery();
+ queries.push(query);
+ return query;
+ });
+ const threadId = "thread-startup-identity";
+ const providerThreadId = "persisted-session";
+ const unannouncedSessionId = "startup-attempt";
+ try {
+ sendResumeThread({ bridge, threadId, providerThreadId, requestId: 1 });
+ await bridge.waitForResponse(1);
+ bridge.sendRequest(
+ 2,
+ "turn/start",
+ canonicalTurnParams({
+ threadId,
+ providerThreadId,
+ input: [{ type: "text", text: "first turn" }],
+ }),
+ );
+ await readNextPrompt(getLatestQueryCall());
+ await bridge.waitForResponse(2);
+ queries[0]?.emit(
+ createStaleResumeErrorMessage({
+ missingSessionId: providerThreadId,
+ sessionId: unannouncedSessionId,
+ }),
+ );
+ queries[0]?.finish();
+ await bridge.flushWork();
+
+ expect.soft(getFailedTurns(bridge.messages)).toHaveLength(1);
+ expect
+ .soft(
+ bridge.messages
+ .filter((message) => message.method === "thread/identity")
+ .map((message) => message.params),
+ )
+ .not.toContainEqual(
+ expect.objectContaining({ providerThreadId: unannouncedSessionId }),
+ );
+ expect
+ .soft(contextQueryMock.mock.calls.map(([call]) => call.options.resume))
+ .not.toContain(unannouncedSessionId);
+
+ bridge.sendRequest(
+ 3,
+ "turn/start",
+ canonicalTurnParams({
+ threadId,
+ providerThreadId,
+ input: [{ type: "text", text: "retry" }],
+ }),
+ );
+ await bridge.flushWork();
+ await readNextPrompt(getLatestQueryCall());
+ await bridge.waitForResponse(3);
+ expect.soft(queries).toHaveLength(2);
+ expect.soft(getLatestQueryOptions().resume).toBe(providerThreadId);
+ } finally {
+ await stopBridgeThread({ bridge, queries, threadId });
+ queries.forEach((query) => query.finish());
+ bridge.restore();
+ }
+ });
+
it("forwards stale Claude resume errors without starting a fresh session", async () => {
const bridge = createBridgeJsonRpcTestHarness(handleLine);
const queries: ControlledClaudeQuery[] = [];
Complete added regression test
it("preserves the resumed identity when startup returns an unannounced session", async () => {
const bridge = createBridgeJsonRpcTestHarness(handleLine);
const queries: ControlledClaudeQuery[] = [];
queryMock.mockImplementation(() => {
const query = createControlledClaudeQuery();
queries.push(query);
return query;
});
const threadId = "thread-startup-identity";
const providerThreadId = "persisted-session";
const unannouncedSessionId = "startup-attempt";
try {
sendResumeThread({ bridge, threadId, providerThreadId, requestId: 1 });
await bridge.waitForResponse(1);
bridge.sendRequest(
2,
"turn/start",
canonicalTurnParams({
threadId,
providerThreadId,
input: [{ type: "text", text: "first turn" }],
}),
);
await readNextPrompt(getLatestQueryCall());
await bridge.waitForResponse(2);
queries[0]?.emit(
createStaleResumeErrorMessage({
missingSessionId: providerThreadId,
sessionId: unannouncedSessionId,
}),
);
queries[0]?.finish();
await bridge.flushWork();
expect.soft(getFailedTurns(bridge.messages)).toHaveLength(1);
expect
.soft(
bridge.messages
.filter((message) => message.method === "thread/identity")
.map((message) => message.params),
)
.not.toContainEqual(
expect.objectContaining({ providerThreadId: unannouncedSessionId }),
);
expect
.soft(contextQueryMock.mock.calls.map(([call]) => call.options.resume))
.not.toContain(unannouncedSessionId);
bridge.sendRequest(
3,
"turn/start",
canonicalTurnParams({
threadId,
providerThreadId,
input: [{ type: "text", text: "retry" }],
}),
);
await bridge.flushWork();
await readNextPrompt(getLatestQueryCall());
await bridge.waitForResponse(3);
expect.soft(queries).toHaveLength(2);
expect.soft(getLatestQueryOptions().resume).toBe(providerThreadId);
} finally {
await stopBridgeThread({ bridge, queries, threadId });
queries.forEach((query) => query.finish());
bridge.restore();
}
});
5. Root cause
The bridge treats a session_id field as proof that the session is initialized. The assignment occurs before any message-type guard. plugins/provider-claude-code/src/bridge/bridge.ts:1625–1632:
const providerThreadId = message.session_id?.trim() ?? "";
if (
providerThreadId.length > 0 &&
threadSession.attachment.providerThreadId !== providerThreadId
) {
threadSession.attachment.providerThreadId = providerThreadId;
sendThreadIdentity(args.threadIdRef.current, providerThreadId);
}
plugins/provider-claude-code/src/bridge/bridge.ts:1040–1049 marks the emitted identity sessionRestorable: true. The runtime records that identity through packages/agent-runtime/src/runtime.ts:1271–1283. This is not a failure in the idle-session reaper: no reaper or host process runs in the reproduction.
The same callback-local ID is used for an isolated context query at plugins/provider-claude-code/src/bridge/bridge.ts:1670–1681:
if (providerThreadId) {
void threadSession.contextUsageCollector.capture({
read: (signal) =>
readIsolatedClaudeContextUsage({
sessionOptions: threadSession.attachment.sessionOptions,
providerSessionId: providerThreadId,
dynamicTools:
threadSession.attachment.sessionConstructionConfig
.dynamicTools ?? [],
signal,
}),
providerSessionId: providerThreadId,
When the failed SDK stream ends, plugins/provider-claude-code/src/bridge/bridge.ts:1491–1505 prefers the overwritten attachment ID for replacement. Thus even a later caller supplying the previously saved ID cannot prevent the resident attachment from resuming the wrong one.
The lower SDK session cache also accepts IDs from every message: plugins/provider-claude-code/src/bridge/sdk-session.ts:488–494. That cache supplies outgoing user messages. The expanded local regression leaves the stream open in a second case and observes the same incorrect session_id on the next prompt. The SDK's installed type declaration identifies system/init as the session metadata message; startup errors are not evidence that a restorable conversation was loaded.
6. Proposed fix and safety gate
Adopt changed IDs only from a nonempty system/init announcement, in both the bridge attachment and SdkSession cache. Context probes should use the retained authoritative attachment identity rather than arbitrary incoming result IDs. Keep forwarding execution errors. Add positive coverage showing that a subsequent genuine init still updates identity, context probes, and outgoing prompts.
A local three-file candidate implements that policy without dependencies, protocols, migrations, or stored-data changes. The original expanded regression fails on unchanged production code (two cases) and passes after the candidate (two cases). Lint and typecheck pass; the complete build passed before production changes. Candidate size: 145 changed text lines, additions plus deletions; no binary changes; git diff --check passes.
Fix stopped; no commit, push, or pull request. The full existing provider suite does not pass: candidate 429 passed / 6 failed, baseline 427 passed / 7 failed including the new one-case reproduction. The same six unrelated existing failures occur on both. The automation requires passing relevant existing tests and does not change unrelated failures, so no safe PR was opened. The local candidate remains uncommitted for follow-up.
- Claude Code installation status > reports 'a native install outside PATH' as installed
- bridge > falls back to well-known install locations when PATH discovery fails
- bridge > prepares the 'full' sandbox before approving a Plan preset (undefined, undefined)
- bridge > prepares the 'full' sandbox before approving a Plan preset (true, undefined)
- bridge > refreshes permissions before turn/start and preserves the conversation
- bridge > refreshes permissions before turn/steer and preserves the conversation
The expanded regression failed before the candidate (two cases) and passes after it (two cases). The SDK cache adjustment is covered at the real bridge's outgoing prompt boundary; no production-only testing seam was added. Raw local evidence is retained outside the public repository.
7. Linked PR review
Target-repository PR #7186 is closed and unmerged. Its metadata and diff were read as untrusted data only, after the direct reproduction was authored and executed. Its code was never checked out or run.
Static review: it gates attachment adoption on an initialized flag and retains the attachment ID for context probes, addressing the tested pre-init replacement. It does not change the SDK session cache, and it permits later non-init messages to replace attachment identity once initialization occurred. The reviewed code is not claimed verified; no PR test was executed. No open target-repository PR linking this issue was found.
8. Related issues
A small set of recent provider-claude-code issues was inspected for classification patterns. No additional duplicate was established. This report does not claim an exhaustive duplicate search, or diagnose the sleep/wake trigger.
9. Verification
The same agent repeated the reproduction, not an independent verifier. A second clean detached worktree was created from the recorded origin/main commit. Frozen installation and the SDK bootstrap succeeded there. Applying only the report's independently authored regression patch and running the same Turbo command produced the same three assertion failures in 67 ms of test execution (one failed, 107 skipped). The first final direct run took 61 ms. No temporary port or runtime data directory was required. No report correction was needed: both runs support the identity/probe/resume mechanism, and neither establishes the physical wake/network trigger.
pnpm exec turbo run test --filter=bb-plugin-provider-claude-code -- src/bridge/__tests__/bridge.test.ts -t "preserves the resumed identity when startup"
First reproduction output, sanitized
• turbo 2.11.10
• Packages in scope: bb-plugin-provider-claude-code
• Running test in 1 package
• Remote caching disabled
//:ensure-native-modules: cache bypass, force executing 1c20f4f26f0c2da9
@bb/templates:generate:templates: cache hit, replaying logs 48196f3bcbc84f04
@bb/templates:generate:templates:
@bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <primary-checkout>/packages/templates
@bb/templates:generate:templates: > node ./scripts/generate-templates.mjs
@bb/templates:generate:templates:
@bb/process-utils:generate:profile-worker: cache hit, replaying logs 5c813633ea1dc706
@bb/process-utils:generate:profile-worker:
@bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <primary-checkout>/packages/process-utils
@bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs
@bb/process-utils:generate:profile-worker:
@bb/templates:generate:plugin-scaffold: cache hit, replaying logs 252fe86c3c9e330c
@bb/templates:generate:plugin-scaffold:
@bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <primary-checkout>/packages/templates
@bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs
@bb/templates:generate:plugin-scaffold:
@bb/plugin-build:generate: cache hit, replaying logs 623dc1ec7b14b716
@bb/plugin-build:generate:
@bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <primary-checkout>/packages/plugin-build
@bb/plugin-build:generate: > node ./scripts/generate-plugin-theme.mjs && node ./scripts/generate-runtime-export-manifest.mjs
@bb/plugin-build:generate:
@bb/plugin-build:generate: plugin-theme.generated.ts up to date
@bb/plugin-build:generate: host-tailwind.css up to date
@bb/plugin-build:generate: host-tailwind-version.ts up to date
@bb/plugin-build:generate: wrote <primary-checkout>/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.1)
@get-bb/plugin-sdk:build: cache hit, replaying logs 72ade0aefce2d3cc
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: > @get-bb/plugin-sdk@0.6.132 build <primary-checkout>/packages/plugin-sdk
@get-bb/plugin-sdk:build: > node scripts/build-runtime.mjs
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: Built 24 @get-bb/plugin-sdk runtime entries.
//:ensure-native-modules:
//:ensure-native-modules: > bb@ ensure-native-modules <primary-checkout>
//:ensure-native-modules: > node scripts/ensure-native-modules.mjs
//:ensure-native-modules:
bb-plugin-provider-claude-code:test: cache miss, executing 70ea6dd2829d2213
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: > bb-plugin-provider-claude-code@0.1.0 test <primary-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test: > vitest run --config vitest.config.ts "src/bridge/__tests__/bridge.test.ts" "-t" "preserves the resumed identity when startup"
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: RUN v4.1.12 <primary-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: {"jsonrpc":"2.0","id":2,"result":{"ok":true}}
bb-plugin-provider-claude-code:test: ❯ |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts (108 tests | 1 failed | 107 skipped) 61ms
bb-plugin-provider-claude-code:test: ↓ uses the reported 200000 capacity from initialization through assistant messages and compaction (delayed: false)
bb-plugin-provider-claude-code:test: ↓ uses the reported 1000000 capacity from initialization through assistant messages and compaction (delayed: false)
bb-plugin-provider-claude-code:test: ↓ uses the reported 200000 capacity from initialization through assistant messages and compaction (delayed: true)
bb-plugin-provider-claude-code:test: ↓ uses the reported 1000000 capacity from initialization through assistant messages and compaction (delayed: true)
bb-plugin-provider-claude-code:test: ↓ keeps prompts on the live session while automatic context reporting is blocked
bb-plugin-provider-claude-code:test: ↓ publishes the session's live slash commands as provider commands
bb-plugin-provider-claude-code:test: ↓ lists a folder's commands from Claude Code without sending a prompt
bb-plugin-provider-claude-code:test: ↓ answers model/list with the missing-executable code when the Claude CLI is absent
bb-plugin-provider-claude-code:test: ↓ forks a Claude session from the session config directory through the requested checkpoint
bb-plugin-provider-claude-code:test: ↓ keeps manager sessions on a plain string system prompt
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT='1' with artifactsEnabled=true and inherited {}
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT=undefined with artifactsEnabled=false and inherited {}
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT='1' with artifactsEnabled=false and inherited { CLAUDE_CODE_ARTIFACT: '1' }
bb-plugin-provider-claude-code:test: ↓ decomposes ultracode into xhigh effort plus the ultracode settings flag
bb-plugin-provider-claude-code:test: ↓ enables workflows without the ultracode flag at lower efforts
bb-plugin-provider-claude-code:test: ↓ sets fast mode only for the fast service tier at session start
bb-plugin-provider-claude-code:test: ↓ passes the memory setting when workflows are not enabled
bb-plugin-provider-claude-code:test: ↓ disables Claude auto-memory reads and writes
bb-plugin-provider-claude-code:test: ↓ leaves standard sessions on the default Claude tool preset
bb-plugin-provider-claude-code:test: ↓ allows bypass mode only for full access sessions, including ones starting in plan mode
bb-plugin-provider-claude-code:test: ↓ uses a Claude executable discovered from PATH for SDK sessions
bb-plugin-provider-claude-code:test: ↓ falls back to well-known install locations when PATH discovery fails
bb-plugin-provider-claude-code:test: ↓ trims explicit Claude executable overrides before forwarding
bb-plugin-provider-claude-code:test: ↓ rejects explicit Claude executable overrides that are not executable
bb-plugin-provider-claude-code:test: ↓ configures acceptEdits and auto sessions with the same Claude sandbox
bb-plugin-provider-claude-code:test: ↓ keeps plan sessions on native gating without the workspace sandbox
bb-plugin-provider-claude-code:test: ↓ leaves the Claude sandbox off when the sandbox setting is disabled
bb-plugin-provider-claude-code:test: ↓ 'auto workspace sandbox denies out-of-…'
bb-plugin-provider-claude-code:test: ↓ 'escalation deny blocks unsandboxed Ba…'
bb-plugin-provider-claude-code:test: ↓ forwards unresolved high-risk auto-mode asks to bb
bb-plugin-provider-claude-code:test: ↓ forwards a sandbox network ask with a grantable network permission
bb-plugin-provider-claude-code:test: ↓ approves only Claude Code's suggested rule when a Bash command is allowed for the session
bb-plugin-provider-claude-code:test: ↓ forwards a permissions.ask rule prompt that carries no permission hints
bb-plugin-provider-claude-code:test: ↓ forwards a permissions.ask rule prompt in full access mode when Approvals in Full Access is on
bb-plugin-provider-claude-code:test: ↓ approves Claude Code's prompts in full access mode until a turn turns Approvals in Full Access on
bb-plugin-provider-claude-code:test: ↓ keeps approving requests itself in full access mode when running as root
bb-plugin-provider-claude-code:test: ↓ keeps folder grants scoped and clears them on live permission changes
bb-plugin-provider-claude-code:test: ↓ forwards AskUserQuestion through canUseTool and returns the answer payload
bb-plugin-provider-claude-code:test: ↓ forwards ExitPlanMode for user approval in plan mode
bb-plugin-provider-claude-code:test: ↓ prepares the 'full' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'auto' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'full' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'auto' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (undefined, true)
bb-plugin-provider-claude-code:test: ↓ sends 'an embedded dollar skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'an embedded slash skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'a leading dollar skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'a skill in a later input fragment' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'several selected skills' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ switches a live session into Plan mode when a later turn carries /plan
bb-plugin-provider-claude-code:test: ↓ enters Plan mode from a /plan steer and only re-requests it after the plan is approved
bb-plugin-provider-claude-code:test: ↓ fails a /plan turn instead of running it in the old mode when the SDK refuses the switch
bb-plugin-provider-claude-code:test: ↓ denies ExitPlanMode without prompting when the plan is missing
bb-plugin-provider-claude-code:test: ↓ dispatches an inbound request whose id collides with a pending bb request
bb-plugin-provider-claude-code:test: ↓ answers a schema-invalid request with an error instead of dropping it
bb-plugin-provider-claude-code:test: ↓ does not answer a response line that matches no pending request
bb-plugin-provider-claude-code:test: ↓ denies invalid AskUserQuestion input before forwarding to bb
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns an interactive request error
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns an invalid response payload
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns a mismatched response kind
bb-plugin-provider-claude-code:test: ↓ returns the bridge-owned Claude model list from the SDK probe
bb-plugin-provider-claude-code:test: ↓ treats an empty Claude model report as a discovery failure
bb-plugin-provider-claude-code:test: ↓ recovers model discovery when an inherited model conflicts with client data
bb-plugin-provider-claude-code:test: ↓ propagates Claude model discovery failures and closes the probe
bb-plugin-provider-claude-code:test: ↓ exposes the host HOME and CLAUDE settings cascade to the Claude SDK on thread/start
bb-plugin-provider-claude-code:test: ↓ includes captured Claude stderr when the SDK stream fails
bb-plugin-provider-claude-code:test: ↓ passes thread/start max reasoningLevel through to Claude SDK effort and thinking display
bb-plugin-provider-claude-code:test: ↓ passes thread/start additional workspace-write roots to Claude SDK options
bb-plugin-provider-claude-code:test: ↓ passes thread/resume additional workspace-write roots to Claude SDK options
bb-plugin-provider-claude-code:test: ↓ returns an existing live same-provider thread/resume session
bb-plugin-provider-claude-code:test: ↓ rebuilds for enforcement changes but applies model changes live
bb-plugin-provider-claude-code:test: ↓ keeps a live Claude session across an escalation-only resume change
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when chromeEnabled changes
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when disable1MContext changes
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when artifactsEnabled changes
bb-plugin-provider-claude-code:test: ↓ refreshes permissions before turn/start and preserves the conversation
bb-plugin-provider-claude-code:test: ↓ refreshes permissions before turn/steer and preserves the conversation
bb-plugin-provider-claude-code:test: ↓ applies sandbox changes live without replacing the Claude process
bb-plugin-provider-claude-code:test: ↓ applies turn model, reasoning, memory, and workflow settings live
bb-plugin-provider-claude-code:test: ↓ updates subagent tools across turns while preserving the conversation (initially enabled: false)
bb-plugin-provider-claude-code:test: ↓ updates subagent tools across turns while preserving the conversation (initially enabled: true)
bb-plugin-provider-claude-code:test: ↓ keeps background subagents on their parent tool escalation when canUseTool omits agent metadata
bb-plugin-provider-claude-code:test: ↓ replaces a live thread/resume session when the provider thread differs
bb-plugin-provider-claude-code:test: ↓ refuses a thread/resume with no provider thread id
bb-plugin-provider-claude-code:test: ↓ replaces a stream-ended same-provider thread/resume session
bb-plugin-provider-claude-code:test: ↓ waits for a closing same-provider thread/resume session before replacing it
bb-plugin-provider-claude-code:test: ↓ resumes a Claude session when follow-up arrives after an SDK stream error
bb-plugin-provider-claude-code:test: ↓ settles a background command when the Claude SDK stream ends under it
bb-plugin-provider-claude-code:test: ↓ restarts a Claude session before the next turn after an authentication failure
bb-plugin-provider-claude-code:test: ↓ does not resume an ended Claude session for invalid follow-up input
bb-plugin-provider-claude-code:test: × preserves the resumed identity when startup returns an unannounced session 58ms
bb-plugin-provider-claude-code:test: ↓ forwards stale Claude resume errors without starting a fresh session
bb-plugin-provider-claude-code:test: ↓ holds thread stop open until the Claude SDK stream closes
bb-plugin-provider-claude-code:test: ↓ waits for an in-flight close before replacing the same thread
bb-plugin-provider-claude-code:test: ↓ opens 'turn start' when the SDK consumes input before producing output
bb-plugin-provider-claude-code:test: ↓ opens 'turn steer' when the SDK consumes input before producing output
bb-plugin-provider-claude-code:test: ↓ keeps the prior escalation when a rejected 'turn start' cannot push input
bb-plugin-provider-claude-code:test: ↓ keeps the prior escalation when a rejected 'turn steer' cannot push input
bb-plugin-provider-claude-code:test: ↓ emits a path-bearing marker for a localImage attachment
bb-plugin-provider-claude-code:test: ↓ emits a name+mime+size marker for a localFile with full metadata
bb-plugin-provider-claude-code:test: ↓ omits missing fields from the localFile marker
bb-plugin-provider-claude-code:test: ↓ emits a URL marker for a remote image attachment
bb-plugin-provider-claude-code:test: ↓ accepts an attachment-only turn (no text fragments)
bb-plugin-provider-claude-code:test: ↓ assembles a local plugin per generic skill root and loads them on canonical sessions
bb-plugin-provider-claude-code:test: ↓ rebuilds with the same provider session when the turn environment changes
bb-plugin-provider-claude-code:test: ↓ uses Fable's Claude Code capacity through a custom API endpoint
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected [ { …(3) }, { …(3) } ] to not deep equally contain ObjectContaining{…}
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: - Expected:
bb-plugin-provider-claude-code:test: ObjectContaining {
bb-plugin-provider-claude-code:test: "providerThreadId": "startup-attempt",
bb-plugin-provider-claude-code:test: }
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: + Received:
bb-plugin-provider-claude-code:test: [
bb-plugin-provider-claude-code:test: {
bb-plugin-provider-claude-code:test: "providerThreadId": "persisted-session",
bb-plugin-provider-claude-code:test: "sessionRestorable": true,
bb-plugin-provider-claude-code:test: "threadId": "thread-startup-identity",
bb-plugin-provider-claude-code:test: },
bb-plugin-provider-claude-code:test: {
bb-plugin-provider-claude-code:test: "providerThreadId": "startup-attempt",
bb-plugin-provider-claude-code:test: "sessionRestorable": true,
bb-plugin-provider-claude-code:test: "threadId": "thread-startup-identity",
bb-plugin-provider-claude-code:test: },
bb-plugin-provider-claude-code:test: ]
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5717:14
bb-plugin-provider-claude-code:test: 5715| .map((message) => message.params),
bb-plugin-provider-claude-code:test: 5716| )
bb-plugin-provider-claude-code:test: 5717| .not.toContainEqual(
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5718| expect.objectContaining({ providerThreadId: unannouncedSessi…
bb-plugin-provider-claude-code:test: 5719| );
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected [ 'startup-attempt' ] to not include 'startup-attempt'
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5722:14
bb-plugin-provider-claude-code:test: 5720| expect
bb-plugin-provider-claude-code:test: 5721| .soft(contextQueryMock.mock.calls.map(([call]) => call.options…
bb-plugin-provider-claude-code:test: 5722| .not.toContain(unannouncedSessionId);
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5723|
bb-plugin-provider-claude-code:test: 5724| bridge.sendRequest(
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected 'startup-attempt' to be 'persisted-session' // Object.is equality
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: Expected: "persisted-session"
bb-plugin-provider-claude-code:test: Received: "startup-attempt"
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5737:51
bb-plugin-provider-claude-code:test: 5735| await bridge.waitForResponse(3);
bb-plugin-provider-claude-code:test: 5736| expect.soft(queries).toHaveLength(2);
bb-plugin-provider-claude-code:test: 5737| expect.soft(getLatestQueryOptions().resume).toBe(providerThreadI…
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5738| } finally {
bb-plugin-provider-claude-code:test: 5739| await stopBridgeThread({ bridge, queries, threadId });
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: Test Files 1 failed (1)
bb-plugin-provider-claude-code:test: Tests 1 failed | 107 skipped (108)
bb-plugin-provider-claude-code:test: Start at 18:07:00
bb-plugin-provider-claude-code:test: Duration 1.47s (transform 859ms, setup 0ms, import 1.22s, tests 61ms, environment 0ms)
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ELIFECYCLE Test failed. See above for more details.
bb-plugin-provider-claude-code#test: ERROR command (<primary-checkout>/plugins/provider-claude-code) /usr/local/bin/pnpm run test src/bridge/__tests__/bridge.test.ts -t preserves the resumed identity when startup exited (1)
Tasks: 6 successful, 7 total
Cached: 5 cached, 7 total
Time: 2.994s
Failed: bb-plugin-provider-claude-code#test
ERROR run failed: command exited (1)
Second reproduction output, sanitized
• turbo 2.11.10
• Packages in scope: bb-plugin-provider-claude-code
• Running test in 1 package
• Remote caching disabled, using shared worktree cache
//:ensure-native-modules: cache bypass, force executing 1c20f4f26f0c2da9
@bb/process-utils:generate:profile-worker: cache hit, replaying logs 5c813633ea1dc706
@bb/process-utils:generate:profile-worker:
@bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <primary-checkout>/packages/process-utils
@bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs
@bb/process-utils:generate:profile-worker:
@bb/templates:generate:templates: cache hit, replaying logs 48196f3bcbc84f04
@bb/templates:generate:plugin-scaffold: cache hit, replaying logs 252fe86c3c9e330c
@bb/plugin-build:generate: cache hit, replaying logs 623dc1ec7b14b716
@bb/plugin-build:generate:
@bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <primary-checkout>/packages/plugin-build
@bb/plugin-build:generate: > node ./scripts/generate-plugin-theme.mjs && node ./scripts/generate-runtime-export-manifest.mjs
@bb/plugin-build:generate:
@bb/plugin-build:generate: plugin-theme.generated.ts up to date
@bb/plugin-build:generate: host-tailwind.css up to date
@bb/plugin-build:generate: host-tailwind-version.ts up to date
@bb/plugin-build:generate: wrote <primary-checkout>/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.1)
@bb/templates:generate:templates:
@bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <primary-checkout>/packages/templates
@bb/templates:generate:templates: > node ./scripts/generate-templates.mjs
@bb/templates:generate:templates:
@bb/templates:generate:plugin-scaffold:
@bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <primary-checkout>/packages/templates
@bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs
@bb/templates:generate:plugin-scaffold:
@get-bb/plugin-sdk:build: cache hit, replaying logs 6bc43dbe01a75bd6
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: > @get-bb/plugin-sdk@0.6.132 build <verification-checkout>/packages/plugin-sdk
@get-bb/plugin-sdk:build: > node scripts/build-runtime.mjs
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: Built 24 @get-bb/plugin-sdk runtime entries.
//:ensure-native-modules:
//:ensure-native-modules: > bb@ ensure-native-modules <verification-checkout>
//:ensure-native-modules: > node scripts/ensure-native-modules.mjs
//:ensure-native-modules:
bb-plugin-provider-claude-code:test: cache miss, executing 63c542f87e1e252c
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: > bb-plugin-provider-claude-code@0.1.0 test <verification-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test: > vitest run --config vitest.config.ts "src/bridge/__tests__/bridge.test.ts" "-t" "preserves the resumed identity when startup"
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: RUN v4.1.12 <verification-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: {"jsonrpc":"2.0","id":2,"result":{"ok":true}}
bb-plugin-provider-claude-code:test: ❯ |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts (108 tests | 1 failed | 107 skipped) 67ms
bb-plugin-provider-claude-code:test: ↓ uses the reported 200000 capacity from initialization through assistant messages and compaction (delayed: false)
bb-plugin-provider-claude-code:test: ↓ uses the reported 1000000 capacity from initialization through assistant messages and compaction (delayed: false)
bb-plugin-provider-claude-code:test: ↓ uses the reported 200000 capacity from initialization through assistant messages and compaction (delayed: true)
bb-plugin-provider-claude-code:test: ↓ uses the reported 1000000 capacity from initialization through assistant messages and compaction (delayed: true)
bb-plugin-provider-claude-code:test: ↓ keeps prompts on the live session while automatic context reporting is blocked
bb-plugin-provider-claude-code:test: ↓ publishes the session's live slash commands as provider commands
bb-plugin-provider-claude-code:test: ↓ lists a folder's commands from Claude Code without sending a prompt
bb-plugin-provider-claude-code:test: ↓ answers model/list with the missing-executable code when the Claude CLI is absent
bb-plugin-provider-claude-code:test: ↓ forks a Claude session from the session config directory through the requested checkpoint
bb-plugin-provider-claude-code:test: ↓ keeps manager sessions on a plain string system prompt
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT='1' with artifactsEnabled=true and inherited {}
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT=undefined with artifactsEnabled=false and inherited {}
bb-plugin-provider-claude-code:test: ↓ sets CLAUDE_CODE_ARTIFACT='1' with artifactsEnabled=false and inherited { CLAUDE_CODE_ARTIFACT: '1' }
bb-plugin-provider-claude-code:test: ↓ decomposes ultracode into xhigh effort plus the ultracode settings flag
bb-plugin-provider-claude-code:test: ↓ enables workflows without the ultracode flag at lower efforts
bb-plugin-provider-claude-code:test: ↓ sets fast mode only for the fast service tier at session start
bb-plugin-provider-claude-code:test: ↓ passes the memory setting when workflows are not enabled
bb-plugin-provider-claude-code:test: ↓ disables Claude auto-memory reads and writes
bb-plugin-provider-claude-code:test: ↓ leaves standard sessions on the default Claude tool preset
bb-plugin-provider-claude-code:test: ↓ allows bypass mode only for full access sessions, including ones starting in plan mode
bb-plugin-provider-claude-code:test: ↓ uses a Claude executable discovered from PATH for SDK sessions
bb-plugin-provider-claude-code:test: ↓ falls back to well-known install locations when PATH discovery fails
bb-plugin-provider-claude-code:test: ↓ trims explicit Claude executable overrides before forwarding
bb-plugin-provider-claude-code:test: ↓ rejects explicit Claude executable overrides that are not executable
bb-plugin-provider-claude-code:test: ↓ configures acceptEdits and auto sessions with the same Claude sandbox
bb-plugin-provider-claude-code:test: ↓ keeps plan sessions on native gating without the workspace sandbox
bb-plugin-provider-claude-code:test: ↓ leaves the Claude sandbox off when the sandbox setting is disabled
bb-plugin-provider-claude-code:test: ↓ 'auto workspace sandbox denies out-of-…'
bb-plugin-provider-claude-code:test: ↓ 'escalation deny blocks unsandboxed Ba…'
bb-plugin-provider-claude-code:test: ↓ forwards unresolved high-risk auto-mode asks to bb
bb-plugin-provider-claude-code:test: ↓ forwards a sandbox network ask with a grantable network permission
bb-plugin-provider-claude-code:test: ↓ approves only Claude Code's suggested rule when a Bash command is allowed for the session
bb-plugin-provider-claude-code:test: ↓ forwards a permissions.ask rule prompt that carries no permission hints
bb-plugin-provider-claude-code:test: ↓ forwards a permissions.ask rule prompt in full access mode when Approvals in Full Access is on
bb-plugin-provider-claude-code:test: ↓ approves Claude Code's prompts in full access mode until a turn turns Approvals in Full Access on
bb-plugin-provider-claude-code:test: ↓ keeps approving requests itself in full access mode when running as root
bb-plugin-provider-claude-code:test: ↓ keeps folder grants scoped and clears them on live permission changes
bb-plugin-provider-claude-code:test: ↓ forwards AskUserQuestion through canUseTool and returns the answer payload
bb-plugin-provider-claude-code:test: ↓ forwards ExitPlanMode for user approval in plan mode
bb-plugin-provider-claude-code:test: ↓ prepares the 'full' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'auto' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (undefined, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'full' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'auto' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (true, undefined)
bb-plugin-provider-claude-code:test: ↓ prepares the 'accept-edits' sandbox before approving a Plan preset (undefined, true)
bb-plugin-provider-claude-code:test: ↓ sends 'an embedded dollar skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'an embedded slash skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'a leading dollar skill' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'a skill in a later input fragment' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ sends 'several selected skills' to Claude as a leading command only when it is the only selection
bb-plugin-provider-claude-code:test: ↓ switches a live session into Plan mode when a later turn carries /plan
bb-plugin-provider-claude-code:test: ↓ enters Plan mode from a /plan steer and only re-requests it after the plan is approved
bb-plugin-provider-claude-code:test: ↓ fails a /plan turn instead of running it in the old mode when the SDK refuses the switch
bb-plugin-provider-claude-code:test: ↓ denies ExitPlanMode without prompting when the plan is missing
bb-plugin-provider-claude-code:test: ↓ dispatches an inbound request whose id collides with a pending bb request
bb-plugin-provider-claude-code:test: ↓ answers a schema-invalid request with an error instead of dropping it
bb-plugin-provider-claude-code:test: ↓ does not answer a response line that matches no pending request
bb-plugin-provider-claude-code:test: ↓ denies invalid AskUserQuestion input before forwarding to bb
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns an interactive request error
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns an invalid response payload
bb-plugin-provider-claude-code:test: ↓ denies AskUserQuestion when bb returns a mismatched response kind
bb-plugin-provider-claude-code:test: ↓ returns the bridge-owned Claude model list from the SDK probe
bb-plugin-provider-claude-code:test: ↓ treats an empty Claude model report as a discovery failure
bb-plugin-provider-claude-code:test: ↓ recovers model discovery when an inherited model conflicts with client data
bb-plugin-provider-claude-code:test: ↓ propagates Claude model discovery failures and closes the probe
bb-plugin-provider-claude-code:test: ↓ exposes the host HOME and CLAUDE settings cascade to the Claude SDK on thread/start
bb-plugin-provider-claude-code:test: ↓ includes captured Claude stderr when the SDK stream fails
bb-plugin-provider-claude-code:test: ↓ passes thread/start max reasoningLevel through to Claude SDK effort and thinking display
bb-plugin-provider-claude-code:test: ↓ passes thread/start additional workspace-write roots to Claude SDK options
bb-plugin-provider-claude-code:test: ↓ passes thread/resume additional workspace-write roots to Claude SDK options
bb-plugin-provider-claude-code:test: ↓ returns an existing live same-provider thread/resume session
bb-plugin-provider-claude-code:test: ↓ rebuilds for enforcement changes but applies model changes live
bb-plugin-provider-claude-code:test: ↓ keeps a live Claude session across an escalation-only resume change
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when chromeEnabled changes
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when disable1MContext changes
bb-plugin-provider-claude-code:test: ↓ restarts the Claude process before the next turn when artifactsEnabled changes
bb-plugin-provider-claude-code:test: ↓ refreshes permissions before turn/start and preserves the conversation
bb-plugin-provider-claude-code:test: ↓ refreshes permissions before turn/steer and preserves the conversation
bb-plugin-provider-claude-code:test: ↓ applies sandbox changes live without replacing the Claude process
bb-plugin-provider-claude-code:test: ↓ applies turn model, reasoning, memory, and workflow settings live
bb-plugin-provider-claude-code:test: ↓ updates subagent tools across turns while preserving the conversation (initially enabled: false)
bb-plugin-provider-claude-code:test: ↓ updates subagent tools across turns while preserving the conversation (initially enabled: true)
bb-plugin-provider-claude-code:test: ↓ keeps background subagents on their parent tool escalation when canUseTool omits agent metadata
bb-plugin-provider-claude-code:test: ↓ replaces a live thread/resume session when the provider thread differs
bb-plugin-provider-claude-code:test: ↓ refuses a thread/resume with no provider thread id
bb-plugin-provider-claude-code:test: ↓ replaces a stream-ended same-provider thread/resume session
bb-plugin-provider-claude-code:test: ↓ waits for a closing same-provider thread/resume session before replacing it
bb-plugin-provider-claude-code:test: ↓ resumes a Claude session when follow-up arrives after an SDK stream error
bb-plugin-provider-claude-code:test: ↓ settles a background command when the Claude SDK stream ends under it
bb-plugin-provider-claude-code:test: ↓ restarts a Claude session before the next turn after an authentication failure
bb-plugin-provider-claude-code:test: ↓ does not resume an ended Claude session for invalid follow-up input
bb-plugin-provider-claude-code:test: × preserves the resumed identity when startup returns an unannounced session 64ms
bb-plugin-provider-claude-code:test: ↓ forwards stale Claude resume errors without starting a fresh session
bb-plugin-provider-claude-code:test: ↓ holds thread stop open until the Claude SDK stream closes
bb-plugin-provider-claude-code:test: ↓ waits for an in-flight close before replacing the same thread
bb-plugin-provider-claude-code:test: ↓ opens 'turn start' when the SDK consumes input before producing output
bb-plugin-provider-claude-code:test: ↓ opens 'turn steer' when the SDK consumes input before producing output
bb-plugin-provider-claude-code:test: ↓ keeps the prior escalation when a rejected 'turn start' cannot push input
bb-plugin-provider-claude-code:test: ↓ keeps the prior escalation when a rejected 'turn steer' cannot push input
bb-plugin-provider-claude-code:test: ↓ emits a path-bearing marker for a localImage attachment
bb-plugin-provider-claude-code:test: ↓ emits a name+mime+size marker for a localFile with full metadata
bb-plugin-provider-claude-code:test: ↓ omits missing fields from the localFile marker
bb-plugin-provider-claude-code:test: ↓ emits a URL marker for a remote image attachment
bb-plugin-provider-claude-code:test: ↓ accepts an attachment-only turn (no text fragments)
bb-plugin-provider-claude-code:test: ↓ assembles a local plugin per generic skill root and loads them on canonical sessions
bb-plugin-provider-claude-code:test: ↓ rebuilds with the same provider session when the turn environment changes
bb-plugin-provider-claude-code:test: ↓ uses Fable's Claude Code capacity through a custom API endpoint
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected [ { …(3) }, { …(3) } ] to not deep equally contain ObjectContaining{…}
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: - Expected:
bb-plugin-provider-claude-code:test: ObjectContaining {
bb-plugin-provider-claude-code:test: "providerThreadId": "startup-attempt",
bb-plugin-provider-claude-code:test: }
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: + Received:
bb-plugin-provider-claude-code:test: [
bb-plugin-provider-claude-code:test: {
bb-plugin-provider-claude-code:test: "providerThreadId": "persisted-session",
bb-plugin-provider-claude-code:test: "sessionRestorable": true,
bb-plugin-provider-claude-code:test: "threadId": "thread-startup-identity",
bb-plugin-provider-claude-code:test: },
bb-plugin-provider-claude-code:test: {
bb-plugin-provider-claude-code:test: "providerThreadId": "startup-attempt",
bb-plugin-provider-claude-code:test: "sessionRestorable": true,
bb-plugin-provider-claude-code:test: "threadId": "thread-startup-identity",
bb-plugin-provider-claude-code:test: },
bb-plugin-provider-claude-code:test: ]
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5717:14
bb-plugin-provider-claude-code:test: 5715| .map((message) => message.params),
bb-plugin-provider-claude-code:test: 5716| )
bb-plugin-provider-claude-code:test: 5717| .not.toContainEqual(
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5718| expect.objectContaining({ providerThreadId: unannouncedSessi…
bb-plugin-provider-claude-code:test: 5719| );
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected [ 'startup-attempt' ] to not include 'startup-attempt'
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5722:14
bb-plugin-provider-claude-code:test: 5720| expect
bb-plugin-provider-claude-code:test: 5721| .soft(contextQueryMock.mock.calls.map(([call]) => call.options…
bb-plugin-provider-claude-code:test: 5722| .not.toContain(unannouncedSessionId);
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5723|
bb-plugin-provider-claude-code:test: 5724| bridge.sendRequest(
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: FAIL |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts > bridge > preserves the resumed identity when startup returns an unannounced session
bb-plugin-provider-claude-code:test: AssertionError: expected 'startup-attempt' to be 'persisted-session' // Object.is equality
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: Expected: "persisted-session"
bb-plugin-provider-claude-code:test: Received: "startup-attempt"
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ❯ src/bridge/__tests__/bridge.test.ts:5737:51
bb-plugin-provider-claude-code:test: 5735| await bridge.waitForResponse(3);
bb-plugin-provider-claude-code:test: 5736| expect.soft(queries).toHaveLength(2);
bb-plugin-provider-claude-code:test: 5737| expect.soft(getLatestQueryOptions().resume).toBe(providerThreadI…
bb-plugin-provider-claude-code:test: | ^
bb-plugin-provider-claude-code:test: 5738| } finally {
bb-plugin-provider-claude-code:test: 5739| await stopBridgeThread({ bridge, queries, threadId });
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: Test Files 1 failed (1)
bb-plugin-provider-claude-code:test: Tests 1 failed | 107 skipped (108)
bb-plugin-provider-claude-code:test: Start at 18:07:04
bb-plugin-provider-claude-code:test: Duration 1.49s (transform 875ms, setup 0ms, import 1.24s, tests 67ms, environment 0ms)
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: ELIFECYCLE Test failed. See above for more details.
bb-plugin-provider-claude-code#test: ERROR command (<verification-checkout>/plugins/provider-claude-code) /usr/local/bin/pnpm run test src/bridge/__tests__/bridge.test.ts -t preserves the resumed identity when startup exited (1)
Tasks: 6 successful, 7 total
Cached: 5 cached, 7 total
Time: 3.036s
Failed: bb-plugin-provider-claude-code#test
ERROR run failed: command exited (1)
Focused candidate verification output, sanitized
• turbo 2.11.10
• Packages in scope: bb-plugin-provider-claude-code
• Running test in 1 package
• Remote caching disabled
//:ensure-native-modules: cache bypass, force executing 1c20f4f26f0c2da9
@bb/templates:generate:plugin-scaffold: cache hit, replaying logs 252fe86c3c9e330c
@bb/process-utils:generate:profile-worker: cache hit, replaying logs 5c813633ea1dc706
@bb/templates:generate:plugin-scaffold:
@bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <primary-checkout>/packages/templates
@bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs
@bb/templates:generate:plugin-scaffold:
@bb/process-utils:generate:profile-worker:
@bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <primary-checkout>/packages/process-utils
@bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs
@bb/process-utils:generate:profile-worker:
@bb/templates:generate:templates: cache hit, replaying logs 48196f3bcbc84f04
@bb/templates:generate:templates:
@bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <primary-checkout>/packages/templates
@bb/templates:generate:templates: > node ./scripts/generate-templates.mjs
@bb/templates:generate:templates:
@bb/plugin-build:generate: cache hit, replaying logs 623dc1ec7b14b716
@bb/plugin-build:generate:
@bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <primary-checkout>/packages/plugin-build
@bb/plugin-build:generate: > node ./scripts/generate-plugin-theme.mjs && node ./scripts/generate-runtime-export-manifest.mjs
@bb/plugin-build:generate:
@bb/plugin-build:generate: plugin-theme.generated.ts up to date
@bb/plugin-build:generate: host-tailwind.css up to date
@bb/plugin-build:generate: host-tailwind-version.ts up to date
@bb/plugin-build:generate: wrote <primary-checkout>/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.1)
@get-bb/plugin-sdk:build: cache hit, replaying logs 72ade0aefce2d3cc
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: > @get-bb/plugin-sdk@0.6.132 build <primary-checkout>/packages/plugin-sdk
@get-bb/plugin-sdk:build: > node scripts/build-runtime.mjs
@get-bb/plugin-sdk:build:
@get-bb/plugin-sdk:build: Built 24 @get-bb/plugin-sdk runtime entries.
//:ensure-native-modules:
//:ensure-native-modules: > bb@ ensure-native-modules <primary-checkout>
//:ensure-native-modules: > node scripts/ensure-native-modules.mjs
//:ensure-native-modules:
bb-plugin-provider-claude-code:test: cache miss, executing 6fa2701706f26ea5
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: > bb-plugin-provider-claude-code@0.1.0 test <primary-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test: > vitest run --config vitest.config.ts "src/bridge/__tests__/bridge.test.ts" "-t" "preserves the resumed identity when startup"
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: RUN v4.1.12 <primary-checkout>/plugins/provider-claude-code
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: {"jsonrpc":"2.0","id":2,"result":{"ok":true}}
bb-plugin-provider-claude-code:test: {"jsonrpc":"2.0","id":2,"result":{"ok":true}}
bb-plugin-provider-claude-code:test: ✓ |bb-plugin-provider-claude-code| src/bridge/__tests__/bridge.test.ts (109 tests | 107 skipped) 64ms
bb-plugin-provider-claude-code:test:
bb-plugin-provider-claude-code:test: Test Files 1 passed (1)
bb-plugin-provider-claude-code:test: Tests 2 passed | 107 skipped (109)
bb-plugin-provider-claude-code:test: Start at 18:11:37
bb-plugin-provider-claude-code:test: Duration 1.47s (transform 862ms, setup 0ms, import 1.23s, tests 64ms, environment 0ms)
bb-plugin-provider-claude-code:test:
Tasks: 7 successful, 7 total
Cached: 5 cached, 7 total
Time: 3.015s
10. Appendix and trust boundary
The issue and linked contribution were treated as untrusted claims. No issue commands, scripts, branches, or tests were run; no external URL from the issue was fetched. All executable repository code came from the recorded trusted origin/main, plus this agent's own reproduction and local candidate. No credentials or real session logs were read. Public artifacts contain only synthetic test IDs and sanitized generated output.
Commands used for repository evidence: git fetch origin main; git rev-parse origin/main; git show at the recorded base for linked lines; git worktree add --detach for the verification checkout; the frozen install and SDK bootstrap above; full turbo build; the focused Turbo regression command above; turbo test/lint/typecheck filtered to bb-plugin-provider-claude-code; oxfmt on the three candidate files; git diff --check; git diff --numstat origin/main. GitHub issue, type/field, label, and PR metadata were read via authenticated GitHub CLI queries. Classification writes use the SlopCop wrapper.
Report created by the SlopCop new-issue-autopilot rule. Reproduction label: confirmed-repro.