#7116 · Concurrent catalog bridge retirement
Verdict: REPRODUCED · Root-cause confidence: high (runtime-level reproduction, not a live Claude session).
1. TL;DR
Two concurrent session starts can cancel one another before a user message reaches the provider. Different skill-root snapshots intentionally select different child bridge processes, even when the provider and bridge artifact are identical. The runtime incorrectly interprets an unregistered sibling process as an obsolete bridge and shuts it down. Two clean checkouts reproduce failed starts using the repository’s scripted echo bridge, while the identical-catalog controls succeed and deliver messages. Depending on scheduling, one or both starts fail; a clean child exit is a consequence of the runtime’s requested shutdown, not evidence of a healthy session.
2. Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| Concurrent starts with different skill snapshots can lose sessions. | Verified | Both clean runs fail only the distinct-catalog test; starts reject with bridge-exit or missing-process errors. |
| The runtime itself shuts down a newly launched sibling bridge. | Verified | Exit callbacks report expected:true during concurrent start, before explicit test cleanup; source shows the overly broad retirement predicate. |
| Both commands always fail. | Not universal | Run A rejected both starts; run B fulfilled one and rejected the other. The race is real, but the number of victims is schedule-dependent. |
| Composer Predictions and idle runtime replacement expose this in live Claude usage. | Not exercised | No live plugin, real provider login, production data, server turn rejection, or idle replacement was used. The test reproduces the exact underlying runtime path directly. |
| Reported frequency, delay window, and SIGTERM variant. | Unverified here | These runs demonstrate code-0 exits and missing processes, not production timing or occurrence rates. |
3. Environment
- Trusted
origin/main:fa30b0a7dcdf745f7baf8e41721f754b7d3198fe; re-fetched and unchanged during investigation. - Linux 4.19.0-gvisor x86_64; Node v22.19.0; pnpm 9.15.0; Vitest 4.1.1.
- Provider: repository-owned scripted echo test bridge, as actual child processes. No Claude CLI or credentials required.
- Two separate detached worktrees named
base-aandbase-bbeneath a new temporary investigation directory. Each had a frozen dependency install and targeted Turbo build; no production source changes. - No HTTP ports or bb instance. Each test allocates a new temporary workspace and bridge data directory, then shuts down its runtime and removes both directories.
4. Minimal reproduction
- Clone trusted main and select the recorded commit.
- Install and build the runtime dependency graph.
- Save the complete test shown below as
packages/agent-runtime/src/runtime.catalog-concurrency.test.tsbefore running the final command. - Execute through Turbo with cache bypass:
git clone https://github.com/get-bb/bb.git bb-7116-a cd bb-7116-a git checkout --detach fa30b0a7dcdf745f7baf8e41721f754b7d3198fe pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build --filter=@bb/agent-runtime pnpm exec turbo run test --filter=@bb/agent-runtime --force -- src/runtime.catalog-concurrency.test.ts
Expected: two passing cases; both sessions start and receive their echo. Actual: the shared-catalog case passes, but the distinct-catalog case fails before message delivery. The command exits 1, as expected for this regression on unchanged production code.
Run A: control PASS; distinct catalogs FAIL
session outcomes [{"status":"rejected","reason":"Error: Provider \"fake\" is not running"},{"status":"rejected","reason":"ProviderProcessExitedError: Provider \"fake\" exited unexpectedly (code 0)"}]
Run B: control PASS; distinct catalogs FAIL
session outcomes [{"status":"fulfilled"},{"status":"rejected","reason":"ProviderProcessExitedError: Provider \"fake\" exited unexpectedly (code 0)"}]
Both runs: Test Files 1 failed (1); Tests 1 failed | 1 passed (2)
The complete test and sanitized execution logs are embedded in this report. Raw evidence remains in local investigation storage, as required by the reports repository policy.
Complete reproduction test
import { mkdirSync, mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { expect, it } from "vitest";
import type { ThreadEvent } from "@bb/domain";
import { createAgentRuntime } from "./runtime.js";
import { promptTextInput } from "./test/prompt-input.js";
import {
createScriptedEchoLaunch,
fullRuntimeOptions,
waitForThreadAgentMessageText,
} from "./test/runtime-test-harness.js";
it.each([false, true])(
"keeps concurrent sessions usable with distinct catalogs: %s",
async (distinctCatalogs) => {
const workspacePath = mkdtempSync(join(tmpdir(), "bb-catalog-concurrency-"));
const bridgeLaunch = createScriptedEchoLaunch();
const events: ThreadEvent[] = [];
const runtime = createAgentRuntime({
workspacePath,
skillRoots: [],
onEvent: (event) => events.push(event),
onToolCall: async () => ({ contentItems: [], success: true }),
onProcessExit: (exit) => {
console.info("bridge exit", JSON.stringify(exit));
},
});
const skillPath = join(workspacePath, "alternate-skills");
mkdirSync(skillPath);
const sessions = [
{ threadId: "catalog-empty", skillRoots: [] },
{
threadId: "catalog-alternate",
skillRoots: distinctCatalogs
? [{ id: "alternate", path: skillPath, skills: [] }]
: [],
},
];
try {
const results = await Promise.allSettled(
sessions.map((session) =>
runtime.startThread({
...session,
bridgeLaunch,
environmentId: "env-catalog-test",
projectId: "project-catalog-test",
providerId: "fake",
options: fullRuntimeOptions,
}),
),
);
console.info(
"session outcomes",
JSON.stringify(
results.map((result) =>
result.status === "fulfilled"
? { status: result.status }
: { status: result.status, reason: String(result.reason) },
),
),
);
expect(results.map((result) => result.status)).toEqual([
"fulfilled",
"fulfilled",
]);
for (const session of sessions) {
const text = `usable ${session.threadId}`;
await runtime.runTurn({
clientRequestId: "creq_abcdefghjk",
threadId: session.threadId,
input: [promptTextInput({ text })],
options: fullRuntimeOptions,
});
await waitForThreadAgentMessageText({
events,
providerId: "fake",
runtime,
text,
threadId: session.threadId,
});
}
} finally {
await runtime.shutdown();
rmSync(workspacePath, { recursive: true, force: true });
rmSync(bridgeLaunch.dataDir, { recursive: true, force: true });
}
},
);
5. Root cause
- packages/agent-runtime/src/runtime.ts:365–380 appends a skill-root hash to the process key. Empty roots versus one alternate root therefore select different bridge processes of the same provider and launch.
- packages/agent-runtime/src/runtime-provider-process.ts:246–272 runs stale-bridge retirement after startup. It identifies candidates by different full process key, same provider, and zero currently registered threads:
processKey !== args.processKey && providerProcess.providerId === args.providerId && providerProcess.identity.threadIds.size === 0
- packages/agent-runtime/src/runtime.ts:1544–1574 awaits that retirement before registering the new thread. A concurrent bridge can therefore exist without a registered thread and still be required by a start in progress.
- packages/agent-runtime/src/runtime-provider-process.ts:298–328 marks the retirement as expected and terminates the selected child. The concurrent caller then finds a missing/exited process or receives rejection of its pending request.
The predicate confuses a different session catalog with a superseded bridge launch. The snapshot of candidates can also become stale before termination: a bridge can acquire a thread after it was selected. This explains why the visible failures and victim counts vary without requiring a provider crash.
6. Proposed fix
Retain and compare the existing bridge-launch fingerprint separately from the catalog-specific process key. A sibling using the same launch must not be treated as superseded solely because its skill snapshot differs. Preserve retirement of genuinely obsolete artifact/configuration launches and existing last-thread release behavior. The fingerprint implementation is already available at packages/agent-runtime/src/bridge-launch-process-key.ts:42–53.
The inline test protects concurrent session usability at the runtime boundary, without mocks or new production seams. It should pass after the retirement discriminator is repaired. Existing coverage must continue to retire obsolete launch artifacts and preserve live sibling sessions.
7. PR review
PR #7117 — static review only
GitHub metadata confirms an open PR targeting main whose closing references include #7116. The inspected diff records a bridge-launch fingerprint on each process, excludes same-launch siblings from retirement, updates the obsolete-launch test fixture, and adds concurrent-catalog coverage. This addresses the verified discriminator error in the owning subsystem. No blocking finding was identified in this bounded static review; the PR branch was neither checked out nor executed, so post-fix behavior is not certified here.
Inspected PR head: 78fca954fb3bfb51358fb621ad66d08dcec7b110. Tests executed for this report are on trusted main plus the independent reproduction test only. No duplicate fix PR opened because the existing open PR already links this issue.
8. Related issues
This report isolates bridge retirement, not the surrounding environment-runtime replacement mechanism. Other issue claims were not separately investigated. The linked fix PR is recorded above; no external issue links or submitted scripts were executed.
9. Verification
The same agent repeated the reproduction in a second clean detached checkout at the identical trusted commit. Its tracked and untracked status was empty before adding the exact same test. Frozen install and targeted build succeeded; pnpm exec turbo run test --filter=@bb/agent-runtime --force -- src/runtime.catalog-concurrency.test.ts executed fresh rather than replaying cache. Result: one passing shared-catalog control and one failing distinct-catalog regression, with a provider exit while starting a session.
Correction supported by the second run: do not claim both starts always fail. One failed in run B, both failed in run A. An initial test-authoring error used an invalid turn request ID; it was corrected to the repository’s valid request-ID format before the final runs published here. No production code changed to obtain either result.
Existing runtime.process-lifecycle.test.ts and runtime.skill-roots-capability.test.ts: 38 tests passed. Runtime package typecheck: passed. These results establish that the isolated regression is not a general bridge setup failure. This is a second run by the same agent, not independent review.
10. Appendix
Run A full validation log
• turbo 2.10.12 • Packages in scope: @bb/agent-runtime • Running test in 1 packages • Remote caching disabled, using shared worktree cache //:ensure-native-modules: cache bypass, force executing 765f6e8e9db08e4d @bb/templates:generate:plugin-scaffold: cache hit, replaying logs 43e74f8f90a240ed @bb/templates:generate:plugin-scaffold: @bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <investigation>/base-a/packages/templates @bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs @bb/templates:generate:plugin-scaffold: @bb/process-utils:generate:profile-worker: cache hit, replaying logs 53cd812e8bad846b @bb/templates:generate:templates: cache hit, replaying logs c2d3f4837c0769ab @bb/process-utils:generate:profile-worker: @bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <investigation>/base-a/packages/process-utils @bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs @bb/process-utils:generate:profile-worker: @bb/plugin-build:generate: cache hit, replaying logs d60fdd187c812e2c @bb/templates:generate:templates: @bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <investigation>/base-a/packages/templates @bb/templates:generate:templates: > node ./scripts/generate-templates.mjs @bb/templates:generate:templates: @bb/plugin-build:generate: @bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <investigation>/base-a/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 <investigation>/base-a/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.0) @bb/agent-runtime:generate:test-bridges: cache miss, executing 687da1250c4573bf @bb/agent-runtime:generate:test-bridges: @bb/agent-runtime:generate:test-bridges: > @bb/agent-runtime@0.0.1 generate:test-bridges <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:generate:test-bridges: > node ./scripts/build-test-bridges.mjs @bb/agent-runtime:generate:test-bridges: //:ensure-native-modules: //:ensure-native-modules: > bb@ ensure-native-modules <investigation>/base-a //:ensure-native-modules: > node scripts/ensure-native-modules.mjs //:ensure-native-modules: @bb/agent-runtime:test: cache miss, executing 889b7f2c95e957fc @bb/agent-runtime:test: @bb/agent-runtime:test: > @bb/agent-runtime@0.0.1 test <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:test: > vitest run --config vitest.config.ts "src/runtime.catalog-concurrency.test.ts" @bb/agent-runtime:test: @bb/agent-runtime:test: @bb/agent-runtime:test: RUN v4.1.1 <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:test: @bb/agent-runtime:test: stdout | src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: bridge exit {"providerId":"fake","threads":[],"code":0,"expected":true,"signal":null,"stderr":null} @bb/agent-runtime:test: @bb/agent-runtime:test: stdout | src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: bridge exit {"providerId":"fake","threads":[{"activeTurnId":null,"pendingTurnStart":false,"providerThreadId":null,"threadId":"catalog-alternate"}],"code":0,"expected":true,"signal":null,"stderr":null} @bb/agent-runtime:test: @bb/agent-runtime:test: stdout | src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: session outcomes [{"status":"rejected","reason":"Error: Provider \"fake\" is not running"},{"status":"rejected","reason":"ProviderProcessExitedError: Provider \"fake\" exited unexpectedly (code 0)"}] @bb/agent-runtime:test: @bb/agent-runtime:test: ❯ |@bb/agent-runtime| src/runtime.catalog-concurrency.test.ts (2 tests | 1 failed) 989ms @bb/agent-runtime:test: ✓ keeps concurrent sessions usable with distinct catalogs: false 522ms @bb/agent-runtime:test: × keeps concurrent sessions usable with distinct catalogs: true 466ms @bb/agent-runtime:test: @bb/agent-runtime:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ @bb/agent-runtime:test: @bb/agent-runtime:test: FAIL |@bb/agent-runtime| src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: AssertionError: expected [ 'rejected', 'rejected' ] to deeply equal [ 'fulfilled', 'fulfilled' ] @bb/agent-runtime:test: @bb/agent-runtime:test: - Expected @bb/agent-runtime:test: + Received @bb/agent-runtime:test: @bb/agent-runtime:test: [ @bb/agent-runtime:test: - "fulfilled", @bb/agent-runtime:test: - "fulfilled", @bb/agent-runtime:test: + "rejected", @bb/agent-runtime:test: + "rejected", @bb/agent-runtime:test: ] @bb/agent-runtime:test: @bb/agent-runtime:test: ❯ src/runtime.catalog-concurrency.test.ts:63:54 @bb/agent-runtime:test: 61| ), @bb/agent-runtime:test: 62| ); @bb/agent-runtime:test: 63| expect(results.map((result) => result.status)).toEqual([ @bb/agent-runtime:test: | ^ @bb/agent-runtime:test: 64| "fulfilled", @bb/agent-runtime:test: 65| "fulfilled", @bb/agent-runtime:test: @bb/agent-runtime:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ @bb/agent-runtime:test: @bb/agent-runtime:test: @bb/agent-runtime:test: Test Files 1 failed (1) @bb/agent-runtime:test: Tests 1 failed | 1 passed (2) @bb/agent-runtime:test: Start at 12:01:12 @bb/agent-runtime:test: Duration 2.35s (transform 818ms, setup 0ms, import 1.14s, tests 989ms, environment 0ms) @bb/agent-runtime:test: @bb/agent-runtime:test: ELIFECYCLE Test failed. See above for more details. @bb/agent-runtime#test: ERROR command (<investigation>/base-a/packages/agent-runtime) /usr/local/bin/pnpm run test src/runtime.catalog-concurrency.test.ts exited (1) Tasks: 6 successful, 7 total Cached: 4 cached, 7 total Time: 4.177s Failed: @bb/agent-runtime#test ERROR run failed: command exited (1)Run B full validation log
• turbo 2.10.12 • Packages in scope: @bb/agent-runtime • Running test in 1 packages • Remote caching disabled, using shared worktree cache //:ensure-native-modules: cache bypass, force executing 765f6e8e9db08e4d @bb/templates:generate:plugin-scaffold: cache bypass, force executing 43e74f8f90a240ed @bb/plugin-build:generate: cache bypass, force executing d60fdd187c812e2c @bb/templates:generate:templates: cache bypass, force executing c2d3f4837c0769ab @bb/process-utils:generate:profile-worker: cache bypass, force executing 53cd812e8bad846b @bb/templates:generate:templates: @bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <investigation>/base-b/packages/templates @bb/templates:generate:templates: > node ./scripts/generate-templates.mjs @bb/templates:generate:templates: //:ensure-native-modules: //:ensure-native-modules: > bb@ ensure-native-modules <investigation>/base-b //:ensure-native-modules: > node scripts/ensure-native-modules.mjs //:ensure-native-modules: @bb/plugin-build:generate: @bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <investigation>/base-b/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/templates:generate:plugin-scaffold: @bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <investigation>/base-b/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 <investigation>/base-b/packages/process-utils @bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs @bb/process-utils:generate:profile-worker: //:ensure-native-modules: [ensure-native-modules] Detached hardlinked better-sqlite3 binary before verification @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 <investigation>/base-b/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.0) @bb/agent-runtime:generate:test-bridges: cache bypass, force executing 687da1250c4573bf @bb/agent-runtime:generate:test-bridges: @bb/agent-runtime:generate:test-bridges: > @bb/agent-runtime@0.0.1 generate:test-bridges <investigation>/base-b/packages/agent-runtime @bb/agent-runtime:generate:test-bridges: > node ./scripts/build-test-bridges.mjs @bb/agent-runtime:generate:test-bridges: @bb/agent-runtime:test: cache bypass, force executing 889b7f2c95e957fc @bb/agent-runtime:test: @bb/agent-runtime:test: > @bb/agent-runtime@0.0.1 test <investigation>/base-b/packages/agent-runtime @bb/agent-runtime:test: > vitest run --config vitest.config.ts "src/runtime.catalog-concurrency.test.ts" @bb/agent-runtime:test: @bb/agent-runtime:test: @bb/agent-runtime:test: RUN v4.1.1 <investigation>/base-b/packages/agent-runtime @bb/agent-runtime:test: @bb/agent-runtime:test: stdout | src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: bridge exit {"providerId":"fake","threads":[],"code":0,"expected":true,"signal":null,"stderr":null} @bb/agent-runtime:test: @bb/agent-runtime:test: stdout | src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: session outcomes [{"status":"fulfilled"},{"status":"rejected","reason":"ProviderProcessExitedError: Provider \"fake\" exited unexpectedly (code 0)"}] @bb/agent-runtime:test: @bb/agent-runtime:test: ❯ |@bb/agent-runtime| src/runtime.catalog-concurrency.test.ts (2 tests | 1 failed) 1002ms @bb/agent-runtime:test: ✓ keeps concurrent sessions usable with distinct catalogs: false 524ms @bb/agent-runtime:test: × keeps concurrent sessions usable with distinct catalogs: true 476ms @bb/agent-runtime:test: @bb/agent-runtime:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ @bb/agent-runtime:test: @bb/agent-runtime:test: FAIL |@bb/agent-runtime| src/runtime.catalog-concurrency.test.ts > keeps concurrent sessions usable with distinct catalogs: true @bb/agent-runtime:test: AssertionError: expected [ 'fulfilled', 'rejected' ] to deeply equal [ 'fulfilled', 'fulfilled' ] @bb/agent-runtime:test: @bb/agent-runtime:test: - Expected @bb/agent-runtime:test: + Received @bb/agent-runtime:test: @bb/agent-runtime:test: [ @bb/agent-runtime:test: "fulfilled", @bb/agent-runtime:test: - "fulfilled", @bb/agent-runtime:test: + "rejected", @bb/agent-runtime:test: ] @bb/agent-runtime:test: @bb/agent-runtime:test: ❯ src/runtime.catalog-concurrency.test.ts:63:54 @bb/agent-runtime:test: 61| ), @bb/agent-runtime:test: 62| ); @bb/agent-runtime:test: 63| expect(results.map((result) => result.status)).toEqual([ @bb/agent-runtime:test: | ^ @bb/agent-runtime:test: 64| "fulfilled", @bb/agent-runtime:test: 65| "fulfilled", @bb/agent-runtime:test: @bb/agent-runtime:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ @bb/agent-runtime:test: @bb/agent-runtime:test: @bb/agent-runtime:test: Test Files 1 failed (1) @bb/agent-runtime:test: Tests 1 failed | 1 passed (2) @bb/agent-runtime:test: Start at 12:01:40 @bb/agent-runtime:test: Duration 2.35s (transform 811ms, setup 0ms, import 1.14s, tests 1.00s, environment 0ms) @bb/agent-runtime:test: @bb/agent-runtime:test: ELIFECYCLE Test failed. See above for more details. @bb/agent-runtime#test: ERROR command (<investigation>/base-b/packages/agent-runtime) /usr/local/bin/pnpm run test src/runtime.catalog-concurrency.test.ts exited (1) Tasks: 6 successful, 7 total Cached: 0 cached, 7 total Time: 6.449s Failed: @bb/agent-runtime#test ERROR run failed: command exited (1)38 passing existing tests
• turbo 2.10.12 • Packages in scope: @bb/agent-runtime • Running test in 1 packages • Remote caching disabled, using shared worktree cache @bb/plugin-build:generate: cache miss, executing f672116bef389eeb @bb/process-utils:generate:profile-worker: cache miss, executing 725aaca9eedab7d4 @bb/templates:generate:plugin-scaffold: cache miss, executing 70820795a5444706 //:ensure-native-modules: cache bypass, force executing 1a8987207bd20eac @bb/templates:generate:templates: cache miss, executing 7efebe7c20336785 @bb/plugin-build:generate: @bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <investigation>/base-a/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/templates:generate:plugin-scaffold: @bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <investigation>/base-a/packages/templates @bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs @bb/templates:generate:plugin-scaffold: //:ensure-native-modules: //:ensure-native-modules: > bb@ ensure-native-modules <investigation>/base-a //:ensure-native-modules: > node scripts/ensure-native-modules.mjs //:ensure-native-modules: @bb/process-utils:generate:profile-worker: @bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <investigation>/base-a/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: @bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <investigation>/base-a/packages/templates @bb/templates:generate:templates: > node ./scripts/generate-templates.mjs @bb/templates:generate:templates: @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 <investigation>/base-a/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.3.0) @bb/agent-runtime:generate:test-bridges: cache miss, executing 3c345df6d8c2c56d @bb/agent-runtime:generate:test-bridges: @bb/agent-runtime:generate:test-bridges: > @bb/agent-runtime@0.0.1 generate:test-bridges <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:generate:test-bridges: > node ./scripts/build-test-bridges.mjs @bb/agent-runtime:generate:test-bridges: @bb/agent-runtime:test: cache miss, executing ffc9450b6ba7bebc @bb/agent-runtime:test: @bb/agent-runtime:test: > @bb/agent-runtime@0.0.1 test <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:test: > vitest run --config vitest.config.ts "src/runtime.process-lifecycle.test.ts" "src/runtime.skill-roots-capability.test.ts" @bb/agent-runtime:test: @bb/agent-runtime:test: @bb/agent-runtime:test: RUN v4.1.1 <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:test: @bb/agent-runtime:test: ✓ |@bb/agent-runtime| src/runtime.skill-roots-capability.test.ts (3 tests) 1708ms @bb/agent-runtime:test: ✓ starts a thread on a bridge that does not declare skills.configure, without sending the request 772ms @bb/agent-runtime:test: ✓ selects a bridge by the session's skill snapshot without replacing sibling sessions 933ms @bb/agent-runtime:test: ✓ |@bb/agent-runtime:isolated| src/runtime.process-lifecycle.test.ts (35 tests) 12449ms @bb/agent-runtime:test: ✓ ranks provider processes ahead of bb for the out-of-memory killer 455ms @bb/agent-runtime:test: ✓ retires a threadless bridge process superseded by a new artifact hash 911ms @bb/agent-runtime:test: ✓ keeps an old-hash bridge process that still owns a thread 842ms @bb/agent-runtime:test: ✓ waits for provider retirement before starting a same-key replacement 839ms @bb/agent-runtime:test: ✓ does not wait for stalled replacement initialization during full shutdown 475ms @bb/agent-runtime:test: ✓ waits for an exited provider to finalize before replacing it 1119ms @bb/agent-runtime:test: ✓ starts a single replacement for concurrent callers after an exit 1108ms @bb/agent-runtime:test: ✓ cuts off inherited provider output before starting a replacement 1370ms @bb/agent-runtime:test: ✓ treats shutdown process errors as expected without carrying state to replacement processes 831ms @bb/agent-runtime:test: ✓ gives a changed declaration its own bridge process at the same artifact hash 839ms @bb/agent-runtime:test: ✓ fails fast when the bridge artifact does not exist 341ms @bb/agent-runtime:test: @bb/agent-runtime:test: Test Files 2 passed (2) @bb/agent-runtime:test: Tests 38 passed (38) @bb/agent-runtime:test: Start at 12:01:47 @bb/agent-runtime:test: Duration 14.24s (transform 2.15s, setup 0ms, import 3.06s, tests 14.16s, environment 0ms) @bb/agent-runtime:test: Tasks: 7 successful, 7 total Cached: 0 cached, 7 total Time: 18.332s
Passing typecheck
• turbo 2.10.12 • Packages in scope: @bb/agent-runtime • Running typecheck in 1 packages • Remote caching disabled, using shared worktree cache @bb/templates:generate:templates: cache hit, replaying logs 015a6c1b249fd886 @bb/templates:generate:templates: @bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates <trusted-checkout> @bb/templates:generate:templates: > node ./scripts/generate-templates.mjs @bb/templates:generate:templates: @bb/templates:generate:plugin-scaffold: cache hit, replaying logs 040dd1c720ef4fc6 @bb/templates:generate:plugin-scaffold: @bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold <trusted-checkout> @bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs @bb/templates:generate:plugin-scaffold: @bb/process-utils:generate:profile-worker: cache hit, replaying logs 76af9d5b420c9490 @bb/process-utils:generate:profile-worker: @bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker <investigation>/base-a/packages/process-utils @bb/process-utils:generate:profile-worker: > node scripts/generate-profile-worker.mjs @bb/process-utils:generate:profile-worker: @bb/plugin-build:generate: cache hit, replaying logs 938790f5efadc613 @bb/plugin-build:generate: @bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate <trusted-checkout> @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: wrote packages/plugin-build/src/generated/plugin-theme.generated.ts @bb/plugin-build:generate: wrote packages/plugin-build/src/generated/host-tailwind.css @bb/plugin-build:generate: wrote packages/plugin-build/src/generated/host-tailwind-version.ts @bb/plugin-build:generate: wrote <trusted-checkout> (react@19.3.0) @bb/agent-runtime:typecheck: cache miss, executing 64af34de99c95e23 @bb/agent-runtime:typecheck: @bb/agent-runtime:typecheck: > @bb/agent-runtime@0.0.1 typecheck <investigation>/base-a/packages/agent-runtime @bb/agent-runtime:typecheck: > tsrs --noEmit @bb/agent-runtime:typecheck: Tasks: 5 successful, 5 total Cached: 4 cached, 5 total Time: 1.313s
Additional commands actually run:
pnpm exec turbo run test --filter=@bb/agent-runtime -- src/runtime.process-lifecycle.test.ts src/runtime.skill-roots-capability.test.ts pnpm exec turbo run typecheck --filter=@bb/agent-runtime
Test value: concurrent session usability is the observable invariant; overly broad retirement is the credible regression. Existing skill-root coverage starts sessions sequentially and misses the overlap. The new test uses the established bridge fixture and introduces no production seam.
Local checkout paths are replaced with neutral placeholders and trailing log whitespace is normalized. No screenshots are needed for this nonvisual runtime failure. Trust boundary: issue text and PR diff were evidence only; no issue-supplied command, code, branch, or external URL was run. Only trusted main and the independently authored test executed.