← reports

#7230 · Live ACP forks cross the owning process

BugPriority: MediumEffort: Mediumproviders · threads · provider-acpGitHub issueNovember 7, 2026

Trusted base: e61446e15a0bb3e6df551e45c3aba5c5187ffad3.

PARTIALLY REPRODUCED · Root-cause confidence: high · Reproduction label: partial-repro

1. TL;DR

A live ACP session can belong to one provider process, with that process responsible for deciding whether it is safe to copy. The bridge instead starts a different process and asks that process to fork the source. A real-child-process regression test reproduces the resulting ownership rejection twice on trusted main, with no production changes. The test provider uses exclusive filesystem markers and a process-local ownership set; it is not Kimi. Kimi-specific version behavior, its external plugin declaration, the reported HTTP response, and a successful real-provider handoff were not verified, so the overall verdict remains partial.

2. Claims vs findings

Claim being testedFindingEvidence
A live source fork is sent to a new child rather than its owner.VerifiedThe real bridge starts a source child successfully, then the target child rejects the fork because its local ownership set does not contain the source. Both clean runs fail identically.
There is no source-close/target-resume handoff in the live fork path.VerifiedTrusted main's fork branch directly assigns the returned session ID; it never selects the source connection or sends session/close.
Kimi 2.3+ and specifically 2.5.1 reject the operation with a session-lock error.UnverifiedNo Kimi executable, account, or external plugin was used. The deterministic fixture demonstrates the ownership failure, not a vendor-specific error string or version cutoff.
The external Kimi plugin disables fork, causing side-chat HTTP 400.UnverifiedThe external plugin is not part of this checkout. Core has a provider-capability rejection and custom ACP definitions default to no forks; neither establishes the external plugin's actual setting.
Turning off a provider lock can copy a live turn.Unverified dynamicallyThe bridge does not consult source quiescence here, but no actual concurrent provider writes, corruption, or lock-disabled run were exercised.
Source fork → close the fork → target resume works in the real provider.UnverifiedThe fixture models this expected contract. On main it fails before handoff; no successful Kimi handoff is claimed.

3. Environment

4. Minimal reproduction

The patch below adds one two-case bridge regression and opt-in filesystem ownership behavior to the existing ACP child fixture. No production code is changed. The first case expects a usable fork while preserving the source; the second specifies fatal target-resume failure rather than silently opening a fresh session. Both fail earlier on main because the fork goes to the non-owner process. Assertions after that failure are desired post-fix checks, not behavior verified on main. The test title's reference to history means preventing a fresh-session fallback; it does not validate semantic transcript contents.

  1. Use a disposable checkout and run this complete command block. It contains the complete reproducible test/fixture patch inline, as required by the reports repository's no-artifact-files policy.
git clone --single-branch --branch main https://github.com/get-bb/bb.git bb-issue-7230
cd bb-issue-7230
git checkout --detach e61446e15a0bb3e6df551e45c3aba5c5187ffad3
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run build
cat > /tmp/issue-7230.patch <<'PATCH'
diff --git a/packages/provider-bridge-acp/src/bridge/bridge.test.ts b/packages/provider-bridge-acp/src/bridge/bridge.test.ts
index 9bb672e22..9debb10e5 100644
--- a/packages/provider-bridge-acp/src/bridge/bridge.test.ts
+++ b/packages/provider-bridge-acp/src/bridge/bridge.test.ts
@@ -4118,6 +4118,96 @@ describe("acp bridge", () => {
     expect(notifications("error")).toEqual([]);
   }, 15_000);
 
+  it.each([false, true])(
+    "hands a live process-owned fork to the target without losing history (resume failure: %s)",
+    async (failResume) => {
+      const sourceLog = join(workspaceDir, "source-requests.jsonl");
+      const targetLog = join(workspaceDir, "target-requests.jsonl");
+      const envVars = {
+        FAKE_ACP_FORK_SESSION: "1",
+        FAKE_ACP_RESUME_SESSION: "1",
+        FAKE_ACP_SESSION_LOCK_DIR: workspaceDir,
+      };
+      const source = await startThread({
+        envVars: { ...envVars, FAKE_ACP_REQUEST_LOG: sourceLog },
+      });
+      const forkId = sendRequest("thread/fork", {
+        threadId: "thread-owned-fork",
+        cwd: workspaceDir,
+        instructionMode: "append",
+        options: executionOptions({
+          providerOptions: {
+            acpLaunchSpec: acpLaunchSpec({
+              envVars: {
+                ...envVars,
+                FAKE_ACP_REQUEST_LOG: targetLog,
+                ...(failResume ? { FAKE_ACP_FAIL_RESUME: "1" } : {}),
+              },
+            }),
+          },
+        }),
+        sourceProviderThreadId: source.providerThreadId,
+      });
+      const response = await waitForResponse(forkId);
+      if (failResume) {
+        expect(response.error?.message).toContain("Session cannot be acquired");
+        expect(
+          loggedAcpRequests(targetLog).some(
+            (request) => request.method === "session/new",
+          ),
+        ).toBe(false);
+        expect(
+          notifications("thread/identity").some(
+            (message) => message.params?.["threadId"] === "thread-owned-fork",
+          ),
+        ).toBe(false);
+      } else {
+        expect(response.error).toBeUndefined();
+        const forkedId = providerThreadIdOf(response);
+        bbThreadIdByProviderThreadId.set(forkedId, "thread-owned-fork");
+        expect(forkedId).not.toBe(source.providerThreadId);
+        expect(
+          loggedAcpRequests(sourceLog)
+            .filter((request) => request.method === "session/close")
+            .map((request) => request.params?.["sessionId"]),
+        ).toEqual([forkedId]);
+        sendTurnRequest("turn/start", forkedId, {
+          input: [{ type: "text", text: "hello fork", mentions: [] }],
+        });
+        await waitForTurnCompleted();
+      }
+      expect(
+        loggedAcpRequests(sourceLog).some(
+          (request) => request.method === "session/fork",
+        ),
+      ).toBe(true);
+      expect(
+        loggedAcpRequests(targetLog).some(
+          (request) => request.method === "session/fork",
+        ),
+      ).toBe(false);
+      expect(
+        loggedAcpRequests(targetLog).some(
+          (request) => request.method === "session/resume",
+        ),
+      ).toBe(true);
+      expect(existsSync(join(workspaceDir, source.providerThreadId))).toBe(
+        true,
+      );
+      const completed = threadEventsOfType("turn/completed").length;
+      sendTurnRequest("turn/start", source.providerThreadId, {
+        input: [{ type: "text", text: "hello source", mentions: [] }],
+      });
+      await waitFor(
+        () =>
+          threadEventsOfType("turn/completed").length > completed
+            ? true
+            : undefined,
+        "source remains usable",
+      );
+    },
+  );
+
   it("forks an advertised ACP session with the target cwd and MCP servers", async () => {
     const forkLog = join(workspaceDir, "fork-params.json");
     const forkId = sendRequest("thread/fork", {
diff --git a/packages/provider-bridge-acp/src/bridge/fake-acp-agent.mjs b/packages/provider-bridge-acp/src/bridge/fake-acp-agent.mjs
index 79c416fdc..177eac9c7 100755
--- a/packages/provider-bridge-acp/src/bridge/fake-acp-agent.mjs
+++ b/packages/provider-bridge-acp/src/bridge/fake-acp-agent.mjs
@@ -111,11 +111,20 @@
 
 import { spawn } from "node:child_process";
 import { createInterface } from "node:readline";
-import { appendFileSync, renameSync, writeFileSync } from "node:fs";
+import {
+  appendFileSync,
+  existsSync,
+  renameSync,
+  rmSync,
+  writeFileSync,
+} from "node:fs";
+import { join } from "node:path";
 
 const failLoad = process.env.FAKE_ACP_FAIL_LOAD === "1";
 const loadSession = process.env.FAKE_ACP_LOAD_SESSION === "1" || failLoad;
 const forkSession = process.env.FAKE_ACP_FORK_SESSION === "1";
+const sessionLockDir = process.env.FAKE_ACP_SESSION_LOCK_DIR;
+const ownedSessions = new Set();
 const deleteSession = process.env.FAKE_ACP_DELETE_SESSION === "1";
 const additionalDirectories =
   process.env.FAKE_ACP_ADDITIONAL_DIRECTORIES === "1";
@@ -914,6 +923,7 @@ async function handleMessage(message) {
                   sessionCapabilities: {
                     ...(forkSession ? { fork: {} } : {}),
                     ...(resumeSession ? { resume: {} } : {}),
+                    ...(sessionLockDir ? { close: {} } : {}),
                     ...(deleteSession ? { delete: {} } : {}),
                     ...(additionalDirectories
                       ? { additionalDirectories: {} }
@@ -984,6 +994,12 @@ async function handleMessage(message) {
         await sleep(sessionNewDelayMs);
       }
       activeSessionId = sessionId;
+      if (sessionLockDir) {
+        writeFileSync(join(sessionLockDir, activeSessionId), "owned", {
+          flag: "wx",
+        });
+        ownedSessions.add(activeSessionId);
+      }
       captureMcpServers(message);
       sendSessionResponse(message, {
         sessionId: activeSessionId,
@@ -1055,10 +1071,39 @@ async function handleMessage(message) {
         });
         return;
       }
+      if (sessionLockDir) {
+        if (
+          process.env.FAKE_ACP_FAIL_RESUME === "1" ||
+          existsSync(join(sessionLockDir, message.params.sessionId))
+        ) {
+          send({
+            jsonrpc: "2.0",
+            id: message.id,
+            error: { code: -32000, message: "Session cannot be acquired" },
+          });
+          return;
+        }
+        writeFileSync(join(sessionLockDir, message.params.sessionId), "owned", {
+          flag: "wx",
+        });
+        ownedSessions.add(message.params.sessionId);
+      }
       captureMcpServers(message);
       activeSessionId = message.params?.sessionId;
       send({ jsonrpc: "2.0", id: message.id, result: configState() });
       return;
+    case "session/close":
+      if (!sessionLockDir || !ownedSessions.delete(message.params.sessionId)) {
+        send({
+          jsonrpc: "2.0",
+          id: message.id,
+          error: { code: -32000, message: "Session is not owned" },
+        });
+        return;
+      }
+      rmSync(join(sessionLockDir, message.params.sessionId));
+      send({ jsonrpc: "2.0", id: message.id, result: {} });
+      return;
     case "session/fork":
       if (!requireAuthenticated(message)) {
         return;
@@ -1071,18 +1116,41 @@ async function handleMessage(message) {
         });
         return;
       }
+      if (
+        sessionLockDir &&
+        (!ownedSessions.has(message.params.sessionId) ||
+          activePromptId !== null)
+      ) {
+        send({
+          jsonrpc: "2.0",
+          id: message.id,
+          error: {
+            code: -32000,
+            message: "Source session is not quiescent in this process",
+          },
+        });
+        return;
+      }
       if (process.env.FAKE_ACP_FORK_LOG) {
         writeFileSync(
           process.env.FAKE_ACP_FORK_LOG,
           JSON.stringify(message.params),
         );
       }
-      activeSessionId = forkReuseSourceId
+      const forkedSessionId = forkReuseSourceId
         ? message.params.sessionId
         : `fake-fork-${process.pid}`;
+      if (sessionLockDir) {
+        writeFileSync(join(sessionLockDir, forkedSessionId), "owned", {
+          flag: "wx",
+        });
+        ownedSessions.add(forkedSessionId);
+      } else {
+        activeSessionId = forkedSessionId;
+      }
       captureMcpServers(message);
       sendSessionResponse(message, {
-        sessionId: activeSessionId,
+        sessionId: forkedSessionId,
         ...configState(),
       });
       return;
PATCH
git apply /tmp/issue-7230.patch
pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/bridge/bridge.test.ts -t 'hands a live process-owned fork'

Expected: the success case has no bridge error, closes only the newly forked session in the source process, resumes it in the target, and both sessions can accept a prompt. The injected target-resume failure case must return its acquisition error without session/new or target identity.

Actual: before reaching either outcome, the fixture rejects a fork on a process that does not own the source:

Expected: undefined
Received: {
  "code": -32000,
  "message": "Source session is not quiescent in this process"
}

Test Files  1 failed (1)
Tests       2 failed | 207 skipped (209)

The error string above comes from the agent-authored fixture, not Kimi. As a negative control, the existing advertised-fork and rejection tests remain passing, proving this is specific to a live process-owned source rather than general fork/setup failure:

pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/bridge/bridge.test.ts -t 'forks an advertised|rejects a fork|rejects fork before'
Test Files  1 passed (1)
Tests       3 passed | 206 skipped (209)

5. Root cause

The ACP bridge sends session/fork through a newly spawned target connection instead of the live source connection, bypassing process-local ownership and quiescence. The source session is indexed inside the bridge, but that index is used for returned-ID collision detection rather than selecting the owner to perform the fork. A child with process-local session ownership therefore cannot safely acquire the still-live source. The normal fork branch immediately treats its result as the target session and never releases that fork in the owner or reopens it in the target.

const connection = createBridgeAgentConnection(...);
...
if (request.kind === "fork") {
  const forkedSession = await connection.request({
    method: "session/fork",
    params: { sessionId: request.sourceProviderThreadId, ... },
    ...
  });
  ...
  sessionId = forkedSession.sessionId;
}

6. Proposed fix and duplicate-fix check

Use the live source connection to perform the native fork when the owner supports releasing the new fork and the target can restore it. Let the provider enforce active-turn rejection; do not disable its lock. Validate the returned ID before closing only the fork, then restore it in the target and fail the operation if restore fails. Preserve the ordinary non-live-source fork path for compatible providers. Test source continuity, process ownership, release-before-acquire, and fatal restore failure.

No production fix was attempted or pushed: an open ready pull request, #7231, appeared during this investigation and GitHub's closing-issue metadata links it to #7230. A duplicate PR is expressly prohibited. The local reproduction patch changes two existing files and 164 text lines (161 additions, 3 deletions), contains no binary or dependency change, and passes git diff --check; it is evidence, not a proposed production fix.

7. Linked PR: #7231 — static review only

Reviewed GitHub metadata and diff at head fcb34df1f7f1f017661a96fc84bd9ba3bdb42605. No PR branch was checked out, no PR code was copied into the reproduction, and no linked-PR code or tests were executed. Its reported test results and real-provider claims remain unverified here.

Mechanism: the diff chooses the source connection when the source advertises close and the target supports resume/load, sends fork then source-close, and restores in the target. It rethrows fork-handoff restore errors instead of falling back to session/new. This structurally addresses the reproduced wrong-connection path.

Coverage gap (medium): its added bridge test in packages/provider-bridge-acp/src/bridge/bridge.test.ts near line 4121 checks method ordering in one shared log, not which child owns each request. Its fixture accepts close without enforcing ownership and does not exercise target-resume failure. A wrong-process implementation could satisfy that ordering alone. The owner-enforcing reproduction in this report is stronger for that distinct boundary.

Verdict: plausible root-cause repair by static inspection; not runtime-verified, not a merge endorsement. No confirmed production defect in the linked diff is asserted.

8. Related issues

#7150 concerns allowing custom ACP agents to declare fork support. That is a separate capability-registration feature: enabling the declaration alone does not correct the bridge's owner-process selection.

9. Verification

The same agent repeated the reproduction, not an independent reviewer. CHECKOUT_2 was a clean detached checkout of e61446e15a0bb3e6df551e45c3aba5c5187ffad3, given a separate frozen install, and received only the independently authored reproduction patch. The same Turbo test command launched fresh fixture processes and new temporary workspaces and failed with the same ownership error: 2 failed, 207 skipped. First run: 14:18:15 UTC; second run: 14:19:38 UTC on November 7, 2026. No correction to the bridge root-cause finding was needed; the report deliberately limits the vendor-specific conclusions.

Root-cause links were checked against the pinned commit. The existing fork controls passed at 14:20:52 UTC. No UI screenshot is applicable to this subprocess/JSON-RPC bug. No after-fix success is claimed.

10. Appendix — sanitized captured output

Temporary paths are replaced with CHECKOUT_1/CHECKOUT_2 and OS process IDs with PID. Complete local evidence is retained outside the public reports repository. Issue and PR text were treated as untrusted claims; no instructions, scripts, or linked branches from them were executed.

First trusted-base regression run
   • turbo 2.11.10
   • Packages in scope: @bb/provider-bridge-acp
   • Running test in 1 package
   • Remote caching disabled

@bb/process-utils:generate:profile-worker: cache miss, executing cf0095c46d1e0d2c
//:ensure-native-modules: cache bypass, force executing 7d52cb8f2b2f4d70
//:ensure-native-modules: 
//:ensure-native-modules: > bb@ ensure-native-modules $CHECKOUT_1
//: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 $CHECKOUT_1/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/provider-bridge-acp:test: cache miss, executing 234ff883af86b683
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: > @bb/provider-bridge-acp@0.0.1 test $CHECKOUT_1/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: > vitest run --config vitest.config.ts "src/bridge/bridge.test.ts" "-t" "hands a live process-owned fork"
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  RUN  v4.1.12 $CHECKOUT_1/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (node:PID) ExperimentalWarning: SQLite is an experimental feature and might change at any time
@bb/provider-bridge-acp:test: (Use `node --trace-warnings ...` to show where the warning was created)
@bb/provider-bridge-acp:test:  ❯ |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts (209 tests | 2 failed | 207 skipped) 273ms
@bb/provider-bridge-acp:test:      ↓ answers initialize and lists grouped models without spawning an agent
@bb/provider-bridge-acp:test:      ↓ answers a minimal model/list (no params) with the synthetic default
@bb/provider-bridge-acp:test:      ↓ uses the CLI model list before ACP-native session discovery when both are present
@bb/provider-bridge-acp:test:      ↓ lets the 'omp' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ lets the 'opencode' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ lets the 'acp' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ uses Cursor CLI variants as reasoning metadata for bare ACP models
@bb/provider-bridge-acp:test:      ↓ discovers ACP-native models and per-model reasoning from session configOptions
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a stale-once reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a stale reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a missing-model reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a missing-value reply
@bb/provider-bridge-acp:test:      ↓ keeps probing reasoning for later models after one model's probe fails
@bb/provider-bridge-acp:test:      ↓ advertises Cursor's parameterized model picker during discovery
@bb/provider-bridge-acp:test:      ↓ applies Cursor model parameters and maps 'default' to fast='false'
@bb/provider-bridge-acp:test:      ↓ applies Cursor model parameters and maps 'fast' to fast='true'
@bb/provider-bridge-acp:test:      ↓ omits additionalDirectories for agents without the capability
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/new' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/fork' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/load' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/resume' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards updated roots when a later turn changes them
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/start session construction
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/resume session construction
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/fork session construction
@bb/provider-bridge-acp:test:      ↓ fails session construction when an advertised Fast selection is rejected
@bb/provider-bridge-acp:test:      ↓ leaves service tier untouched when the agent advertises no Fast option
@bb/provider-bridge-acp:test:      ↓ discovers ACP-native models from session models state
@bb/provider-bridge-acp:test:      ↓ advertises launch-time reasoning CLI levels on ACP-native models
@bb/provider-bridge-acp:test:      ↓ authenticates before ACP-native model discovery
@bb/provider-bridge-acp:test:      ↓ probes per-model reasoning across large catalogs instead of falling back
@bb/provider-bridge-acp:test:      ↓ leaves unprobed models unknown when a large native catalog exceeds the discovery budget
@bb/provider-bridge-acp:test:      ↓ discovers only the selected late model without rescanning a large catalog or requiring metadata
@bb/provider-bridge-acp:test:      ↓ keeps selected reasoning unknown after probe error
@bb/provider-bridge-acp:test:      ↓ keeps selected reasoning unknown after probe timeout
@bb/provider-bridge-acp:test:      ↓ isolates individual model probe failures so later models still discover reasoning
@bb/provider-bridge-acp:test:      ↓ times out hung ACP-native discovery, kills the child, and reports the timeout
@bb/provider-bridge-acp:test:      ↓ reports the agent's own error when it cannot open a session to list models, instead of a placeholder model
@bb/provider-bridge-acp:test:      ↓ fails model/list with a clear error when the agent itself is missing
@bb/provider-bridge-acp:test:      ↓ tells a signed-out user how to sign in when listing models, with the agent's terminal command
@bb/provider-bridge-acp:test:      ↓ serves ACP-native discovered models from cache within the TTL and re-discovers after it
@bb/provider-bridge-acp:test:      ↓ falls back to the synthetic model when ACP-native session discovery has no model option
@bb/provider-bridge-acp:test:      ↓ fails model/list with a clear error when the list command is missing
@bb/provider-bridge-acp:test:      ↓ fails model/list when the list command reports ACP auth is required
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command exits unsuccessfully without a cached catalog
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command prints no models without a cached catalog
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command times out without a cached catalog
@bb/provider-bridge-acp:test:      ↓ keeps the last good CLI catalog when the same command later fails
@bb/provider-bridge-acp:test:      ↓ keeps CLI reasoning on the resolved model variant instead of ACP config
@bb/provider-bridge-acp:test:      ↓ sets native question availability only for 'opencode' sessions
@bb/provider-bridge-acp:test:      ↓ sets native question availability only for 'acp' sessions
@bb/provider-bridge-acp:test:      ↓ launches OpenCode with a permission policy that follows the thread's permission mode
@bb/provider-bridge-acp:test:      ↓ gives agents other than OpenCode no OpenCode permission policy
@bb/provider-bridge-acp:test:      ↓ launches ACP agents with a configured reasoning CLI flag
@bb/provider-bridge-acp:test:      ↓ launches full-mode ACP agents with configured permission CLI args
@bb/provider-bridge-acp:test:      ↓ does not apply full-mode permission CLI args in workspace-write mode
@bb/provider-bridge-acp:test:      ↓ uses modelCli only for model selection when reasoningCli owns effort
@bb/provider-bridge-acp:test:      ↓ switches ACP-native models A to B to A when setters return no state ('model config option')
@bb/provider-bridge-acp:test:      ↓ switches ACP-native models A to B to A when setters return no state ('session models state')
@bb/provider-bridge-acp:test:      ↓ applies a queued steer's changed ACP-native model before its prompt
@bb/provider-bridge-acp:test:      ↓ restores the requested ACP-native model after the agent switches itself
@bb/provider-bridge-acp:test:      ↓ tracks an acknowledged ACP-native model when a later tier update fails
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models with session/set_config_option before the first prompt
@bb/provider-bridge-acp:test:      ↓ returns the model config option's own error and never calls an unadvertised session/set_model
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models from session models state (config error: false)
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models from session models state (config error: true)
@bb/provider-bridge-acp:test:      ↓ applies a changed ACP-native model before a follow-up prompt ('model config option')
@bb/provider-bridge-acp:test:      ↓ applies a changed ACP-native model before a follow-up prompt ('session models state')
@bb/provider-bridge-acp:test:      ↓ applies changed ACP-native reasoning and service tier before a follow-up prompt
@bb/provider-bridge-acp:test:      ↓ rejects a follow-up turn whose ACP-native model the agent refuses
@bb/provider-bridge-acp:test:      ↓ rebuilds the agent with the current turn's model selection
@bb/provider-bridge-acp:test:      ↓ relaunches a CLI-selected ACP agent when a follow-up changes its model
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'model' changes (restorable=false)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'reasoning' changes (restorable=false)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'model' changes (restorable=true)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'reasoning' changes (restorable=true)
@bb/provider-bridge-acp:test:      ↓ selects ACP-native reasoning with session/set_config_option before the first prompt
@bb/provider-bridge-acp:test:      ↓ leaves the live agent effort untouched when execution omits reasoning
@bb/provider-bridge-acp:test:      ↓ applies configured native reasoning when the ACP agent does not advertise thought_level
@bb/provider-bridge-acp:test:      ↓ confirms ACP-native models without thought_level have no selectable reasoning
@bb/provider-bridge-acp:test:      ↓ lists an ACP-native model's own thought levels when none of them are standard levels
@bb/provider-bridge-acp:test:      ↓ shows configured native reasoning for ACP-native models without thought_level
@bb/provider-bridge-acp:test:      ↓ preserves Electron Node mode for the dynamic-tool MCP process only
@bb/provider-bridge-acp:test:      ↓ warns and launches the family id when a reasoning variant is missing
@bb/provider-bridge-acp:test:      ↓ starts a session and runs a prompt turn end to end
@bb/provider-bridge-acp:test:      ↓ rebuilds the agent with environment from a later turn
@bb/provider-bridge-acp:test:      ↓ authenticates ACP sessions with cached tokens when advertised
@bb/provider-bridge-acp:test:      ↓ prefers xAI API-key auth when XAI_API_KEY is available
@bb/provider-bridge-acp:test:      ↓ lets agents surface their own error for unsupported advertised auth methods
@bb/provider-bridge-acp:test:      ↓ tells the user how to sign in, from the methods the agent advertised
@bb/provider-bridge-acp:test:      ↓ keeps a non-auth session failure untyped when the agent advertises a login bb cannot perform
@bb/provider-bridge-acp:test:      ↓ keeps an agent exit during session/new untyped when the agent advertises a login bb cannot perform
@bb/provider-bridge-acp:test:      ↓ approves Cursor session MCP servers for the session lifetime (#2018)
@bb/provider-bridge-acp:test:      ↓ forwards ACP dynamic tool calls through the runtime tool-call contract
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after socket-close
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after provider-exit
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after turn-end
@bb/provider-bridge-acp:test:      ↓ keeps the dynamic-tool TCP server alive after a client reset on initialize
@bb/provider-bridge-acp:test:      ↓ lists skills/configure roots in canonical session instructions
@bb/provider-bridge-acp:test:      ↓ prepends instructions to the first prompt only
@bb/provider-bridge-acp:test:      ↓ auto-allows permission requests in full mode
@bb/provider-bridge-acp:test:      ↓ forwards permission requests to the runtime in ask mode
@bb/provider-bridge-acp:test:      ↓ presents an external-directory write permission as a file-change approval
@bb/provider-bridge-acp:test:      ↓ answers session-grant decisions with the allow_always option
@bb/provider-bridge-acp:test:      ↓ acknowledges fs add writes
@bb/provider-bridge-acp:test:      ↓ acknowledges fs update writes
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ rejects simultaneous starts while reconciling unchanged permissions
@bb/provider-bridge-acp:test:      ↓ preserves stacked steers across permission CLI rebuilds
@bb/provider-bridge-acp:test:      ↓ reports a permission-changing steer whose replacement fails to start
@bb/provider-bridge-acp:test:      ↓ denies client fs writes outside the workspace in accept-edits mode
@bb/provider-bridge-acp:test:      ↓ allows canonical accept-edits writes into a configured extra write root
@bb/provider-bridge-acp:test:      ↓ keeps partial output from the cancelled prompt then continues
@bb/provider-bridge-acp:test:      ↓ rebuilds a stuck agent after a steer cancellation error (session/load=0)
@bb/provider-bridge-acp:test:      ↓ rebuilds a stuck agent after a steer cancellation error (session/load=1)
@bb/provider-bridge-acp:test:      ↓ delivers stacked steers on the same turn
@bb/provider-bridge-acp:test:      ↓ closes a command left open by a steered-away prompt as interrupted
@bb/provider-bridge-acp:test:      ↓ cancels a stacked steer prompt that also hangs
@bb/provider-bridge-acp:test:      ↓ runs the builtin /compact command as compaction, not as a prompt
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn legibly when the agent rejects the request
@bb/provider-bridge-acp:test:      ↓ does not report an ACP refusal as successful compaction
@bb/provider-bridge-acp:test:      ↓ does not apply OMP compaction prose to 'generic' ACP
@bb/provider-bridge-acp:test:      ↓ does not apply OMP compaction prose to 'OpenCode' ACP
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn when the agent reports the failure in an end-turn message
@bb/provider-bridge-acp:test:      ↓ completes a no-op compaction turn without reporting a compacted context
@bb/provider-bridge-acp:test:      ↓ keeps classifying a no-op compaction when the agent rewords its prose
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn when the failure report is reworded or preceded by other text
@bb/provider-bridge-acp:test:      ↓ accepts turn input only after the prompt carrying it goes out
@bb/provider-bridge-acp:test:      ↓ never accepts a queued steer the stopped turn did not send
@bb/provider-bridge-acp:test:      ↓ rejects steers when no turn is active
@bb/provider-bridge-acp:test:      ↓ cancels the active turn on thread/stop
@bb/provider-bridge-acp:test:      ↓ settles the interrupted turn itself when the agent ignores session/cancel
@bb/provider-bridge-acp:test:      × hands a live process-owned fork to the target without losing history (resume failure: false) 157ms
@bb/provider-bridge-acp:test:      × hands a live process-owned fork to the target without losing history (resume failure: true) 114ms
@bb/provider-bridge-acp:test:      ↓ forks an advertised ACP session with the target cwd and MCP servers
@bb/provider-bridge-acp:test:      ↓ rejects a checkpoint fork before session/fork
@bb/provider-bridge-acp:test:      ↓ rejects a fork result that reuses the source session id
@bb/provider-bridge-acp:test:      ↓ rejects fork before session/fork when the agent omits the capability
@bb/provider-bridge-acp:test:      ↓ emits session.reset after identity at every construction (start, resume, fork)
@bb/provider-bridge-acp:test:      ↓ surfaces Grok context window size and prompt usage from session _meta
@bb/provider-bridge-acp:test:      ↓ ignores Grok-shaped session _meta on other ACP dialects
@bb/provider-bridge-acp:test:      ↓ holds an agent update written with the session/new response until thread/identity is out, and leaves out what the agent said before any prompt
@bb/provider-bridge-acp:test:      ↓ holds an agent update written with the session/fork response until the fork's thread/identity is out
@bb/provider-bridge-acp:test:      ↓ forwards context usage reported during session/load
@bb/provider-bridge-acp:test:      ↓ ignores load-time context usage for a different session
@bb/provider-bridge-acp:test:      ↓ discards load-time context usage when session/load fails
@bb/provider-bridge-acp:test:      ↓ re-applies ACP-native reasoning after session/load resume
@bb/provider-bridge-acp:test:      ↓ falls back to a fresh session with a warning when load is unsupported
@bb/provider-bridge-acp:test:      ↓ reports unexpected agent exits as a single provider error
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='0', failLoad='0', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='0', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='1', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='0', failLoad='0', active=true)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='0', active=true)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='1', active=true)
@bb/provider-bridge-acp:test:      ↓ fails the interrupted turn and accepts the next message while an exited agent's process tree is still being cleaned up
@bb/provider-bridge-acp:test:      ↓ releases a session still under construction: the agent is reaped and the pending thread/start fails
@bb/provider-bridge-acp:test:      ↓ lets a retried thread/start supersede a construction still in flight for the same thread
@bb/provider-bridge-acp:test:      ↓ fails thread/start with a clear error when the agent command is missing
@bb/provider-bridge-acp:test:      ↓ rejects thread/start without an ACP launch spec
@bb/provider-bridge-acp:test:      ↓ does not show what an agent says before its first prompt, and does not open a turn that would block the prompt
@bb/provider-bridge-acp:test:      ↓ says so when the agent ends a prompted turn without sending anything, and stays quiet when it replied
@bb/provider-bridge-acp:test:      ↓ opens a turn for unprompted output and closes it after a quiet window
@bb/provider-bridge-acp:test:      ↓ keeps the agent's turn open while a tool it announced is running, and settles it as interrupted when the user sends a message
@bb/provider-bridge-acp:test:      ↓ runs a steer that arrives during the agent's own turn as a prompt inside that turn
@bb/provider-bridge-acp:test:      ↓ shows a permission request the agent raises with no prompt in flight instead of cancelling it
@bb/provider-bridge-acp:test:      ↓ fails the agent's own turn when the agent exits during it
@bb/provider-bridge-acp:test:      ↓ waits for a busy agent to go quiet and resends the prompt once
@bb/provider-bridge-acp:test:      ↓ fails the turn with the agent's own error when it stays busy
@bb/provider-bridge-acp:test:      ↓ restores a session with session/resume when the agent offers it, without replaying history
@bb/provider-bridge-acp:test:      ↓ reports a session as restorable when the agent offers only session/resume
@bb/provider-bridge-acp:test:      ↓ does not send the instructions again to a session the agent restored
@bb/provider-bridge-acp:test:      ↓ sends the instructions again when the agent could not restore the session
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with max_tokens as completed with a notice
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with refusal as completed with a notice
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with paused_by_vendor as completed with a notice
@bb/provider-bridge-acp:test:      ↓ tells the agent it can ask form questions
@bb/provider-bridge-acp:test:      ↓ shows a form question as a user question and returns typed answers to the agent
@bb/provider-bridge-acp:test:      ↓ folds the 'omp' Other companion into its choice (#6031, #6131)
@bb/provider-bridge-acp:test:      ↓ folds the 'droid' Other companion into its choice (#6031, #6131)
@bb/provider-bridge-acp:test:      ↓ answers a form it cannot show with an error that says why (#6266)
@bb/provider-bridge-acp:test:      ↓ answers a pending question with cancel when the turn is stopped
@bb/provider-bridge-acp:test:      ↓ publishes the agent's slash commands once per distinct list
@bb/provider-bridge-acp:test:      ↓ publishes the session's own options and leaves the model and reasoning to bb's pickers
@bb/provider-bridge-acp:test:      ↓ lists the agent's options on every model before any thread exists, whichever way the models were found
@bb/provider-bridge-acp:test:      ↓ asks the agent for its models and options in the workspace bb names
@bb/provider-bridge-acp:test:      ↓ deletes the session it opened to read an agent's options when the agent can delete sessions
@bb/provider-bridge-acp:test:      ↓ deletes its discovery session through opencode's own CLI when the agent cannot delete sessions over ACP
@bb/provider-bridge-acp:test:      ↓ publishes no session options for an agent whose only options are its model and thought level
@bb/provider-bridge-acp:test:      ↓ applies requested session options before the prompt and does not repeat a value the session already has
@bb/provider-bridge-acp:test:      ↓ never sends a value the option does not offer
@bb/provider-bridge-acp:test:      ↓ warns and keeps the agent's value when the agent rejects a requested option
@bb/provider-bridge-acp:test:      ↓ spells out bb skill commands the agent did not advertise, wherever they appear, so the agent does not swallow them as unknown commands
@bb/provider-bridge-acp:test:      ↓ publishes nothing for an agent with no commands or options
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  FAIL  |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts > acp bridge > hands a live process-owned fork to the target without losing history (resume failure: false)
@bb/provider-bridge-acp:test: AssertionError: expected { code: -32000, …(1) } to be undefined
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: - Expected:
@bb/provider-bridge-acp:test: undefined
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: + Received:
@bb/provider-bridge-acp:test: {
@bb/provider-bridge-acp:test:   "code": -32000,
@bb/provider-bridge-acp:test:   "message": "Source session is not quiescent in this process",
@bb/provider-bridge-acp:test: }
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ❯ src/bridge/bridge.test.ts:4165:32
@bb/provider-bridge-acp:test:     4163|         ).toBe(false);
@bb/provider-bridge-acp:test:     4164|       } else {
@bb/provider-bridge-acp:test:     4165|         expect(response.error).toBeUndefined();
@bb/provider-bridge-acp:test:        |                                ^
@bb/provider-bridge-acp:test:     4166|         const forkedId = providerThreadIdOf(response);
@bb/provider-bridge-acp:test:     4167|         bbThreadIdByProviderThreadId.set(forkedId, "thread-owned-fork"…
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  FAIL  |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts > acp bridge > hands a live process-owned fork to the target without losing history (resume failure: true)
@bb/provider-bridge-acp:test: AssertionError: expected 'Source session is not quiescent in th…' to contain 'Session cannot be acquired'
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: Expected: "Session cannot be acquired"
@bb/provider-bridge-acp:test: Received: "Source session is not quiescent in this process"
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ❯ src/bridge/bridge.test.ts:4153:41
@bb/provider-bridge-acp:test:     4151|       const response = await waitForResponse(forkId);
@bb/provider-bridge-acp:test:     4152|       if (failResume) {
@bb/provider-bridge-acp:test:     4153|         expect(response.error?.message).toContain("Session cannot be a…
@bb/provider-bridge-acp:test:        |                                         ^
@bb/provider-bridge-acp:test:     4154|         expect(
@bb/provider-bridge-acp:test:     4155|           loggedAcpRequests(targetLog).some(
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  Test Files  1 failed (1)
@bb/provider-bridge-acp:test:       Tests  2 failed | 207 skipped (209)
@bb/provider-bridge-acp:test:    Start at  14:18:15
@bb/provider-bridge-acp:test:    Duration  1.53s (transform 762ms, setup 0ms, import 1.10s, tests 273ms, environment 0ms)
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ELIFECYCLE  Test failed. See above for more details.
@bb/provider-bridge-acp#test:  ERROR  command ($CHECKOUT_1/packages/provider-bridge-acp) /usr/local/bin/pnpm run test src/bridge/bridge.test.ts -t hands a live process-owned fork exited (1)

 Tasks:    2 successful, 3 total
Cached:    0 cached, 3 total
  Time:    2.753s 
Failed:    @bb/provider-bridge-acp#test

 ERROR  run failed: command  exited (1)
Second clean trusted-base regression run
   • turbo 2.11.10
   • Packages in scope: @bb/provider-bridge-acp
   • Running test in 1 package
   • Remote caching disabled, using shared worktree cache

//:ensure-native-modules: cache bypass, force executing 7d52cb8f2b2f4d70
@bb/process-utils:generate:profile-worker: cache hit, replaying logs cf0095c46d1e0d2c
@bb/process-utils:generate:profile-worker: 
@bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker $CHECKOUT_1/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: > bb@ ensure-native-modules $CHECKOUT_2
//:ensure-native-modules: > node scripts/ensure-native-modules.mjs
//:ensure-native-modules: 
@bb/provider-bridge-acp:test: cache miss, executing 234ff883af86b683
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: > @bb/provider-bridge-acp@0.0.1 test $CHECKOUT_2/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: > vitest run --config vitest.config.ts "src/bridge/bridge.test.ts" "-t" "hands a live process-owned fork"
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  RUN  v4.1.12 $CHECKOUT_2/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (node:PID) ExperimentalWarning: SQLite is an experimental feature and might change at any time
@bb/provider-bridge-acp:test: (Use `node --trace-warnings ...` to show where the warning was created)
@bb/provider-bridge-acp:test:  ❯ |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts (209 tests | 2 failed | 207 skipped) 254ms
@bb/provider-bridge-acp:test:      ↓ answers initialize and lists grouped models without spawning an agent
@bb/provider-bridge-acp:test:      ↓ answers a minimal model/list (no params) with the synthetic default
@bb/provider-bridge-acp:test:      ↓ uses the CLI model list before ACP-native session discovery when both are present
@bb/provider-bridge-acp:test:      ↓ lets the 'omp' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ lets the 'opencode' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ lets the 'acp' dialect name each model's route provider
@bb/provider-bridge-acp:test:      ↓ uses Cursor CLI variants as reasoning metadata for bare ACP models
@bb/provider-bridge-acp:test:      ↓ discovers ACP-native models and per-model reasoning from session configOptions
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a stale-once reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a stale reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a missing-model reply
@bb/provider-bridge-acp:test:      ↓ attributes native reasoning only to a confirmed model after a missing-value reply
@bb/provider-bridge-acp:test:      ↓ keeps probing reasoning for later models after one model's probe fails
@bb/provider-bridge-acp:test:      ↓ advertises Cursor's parameterized model picker during discovery
@bb/provider-bridge-acp:test:      ↓ applies Cursor model parameters and maps 'default' to fast='false'
@bb/provider-bridge-acp:test:      ↓ applies Cursor model parameters and maps 'fast' to fast='true'
@bb/provider-bridge-acp:test:      ↓ omits additionalDirectories for agents without the capability
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/new' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/fork' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/load' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards additional workspace write roots on 'session/resume' when advertised
@bb/provider-bridge-acp:test:      ↓ forwards updated roots when a later turn changes them
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/start session construction
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/resume session construction
@bb/provider-bridge-acp:test:      ↓ translates a legacy Cursor model for thread/fork session construction
@bb/provider-bridge-acp:test:      ↓ fails session construction when an advertised Fast selection is rejected
@bb/provider-bridge-acp:test:      ↓ leaves service tier untouched when the agent advertises no Fast option
@bb/provider-bridge-acp:test:      ↓ discovers ACP-native models from session models state
@bb/provider-bridge-acp:test:      ↓ advertises launch-time reasoning CLI levels on ACP-native models
@bb/provider-bridge-acp:test:      ↓ authenticates before ACP-native model discovery
@bb/provider-bridge-acp:test:      ↓ probes per-model reasoning across large catalogs instead of falling back
@bb/provider-bridge-acp:test:      ↓ leaves unprobed models unknown when a large native catalog exceeds the discovery budget
@bb/provider-bridge-acp:test:      ↓ discovers only the selected late model without rescanning a large catalog or requiring metadata
@bb/provider-bridge-acp:test:      ↓ keeps selected reasoning unknown after probe error
@bb/provider-bridge-acp:test:      ↓ keeps selected reasoning unknown after probe timeout
@bb/provider-bridge-acp:test:      ↓ isolates individual model probe failures so later models still discover reasoning
@bb/provider-bridge-acp:test:      ↓ times out hung ACP-native discovery, kills the child, and reports the timeout
@bb/provider-bridge-acp:test:      ↓ reports the agent's own error when it cannot open a session to list models, instead of a placeholder model
@bb/provider-bridge-acp:test:      ↓ fails model/list with a clear error when the agent itself is missing
@bb/provider-bridge-acp:test:      ↓ tells a signed-out user how to sign in when listing models, with the agent's terminal command
@bb/provider-bridge-acp:test:      ↓ serves ACP-native discovered models from cache within the TTL and re-discovers after it
@bb/provider-bridge-acp:test:      ↓ falls back to the synthetic model when ACP-native session discovery has no model option
@bb/provider-bridge-acp:test:      ↓ fails model/list with a clear error when the list command is missing
@bb/provider-bridge-acp:test:      ↓ fails model/list when the list command reports ACP auth is required
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command exits unsuccessfully without a cached catalog
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command prints no models without a cached catalog
@bb/provider-bridge-acp:test:      ↓ fails model/list when the configured command times out without a cached catalog
@bb/provider-bridge-acp:test:      ↓ keeps the last good CLI catalog when the same command later fails
@bb/provider-bridge-acp:test:      ↓ keeps CLI reasoning on the resolved model variant instead of ACP config
@bb/provider-bridge-acp:test:      ↓ sets native question availability only for 'opencode' sessions
@bb/provider-bridge-acp:test:      ↓ sets native question availability only for 'acp' sessions
@bb/provider-bridge-acp:test:      ↓ launches OpenCode with a permission policy that follows the thread's permission mode
@bb/provider-bridge-acp:test:      ↓ gives agents other than OpenCode no OpenCode permission policy
@bb/provider-bridge-acp:test:      ↓ launches ACP agents with a configured reasoning CLI flag
@bb/provider-bridge-acp:test:      ↓ launches full-mode ACP agents with configured permission CLI args
@bb/provider-bridge-acp:test:      ↓ does not apply full-mode permission CLI args in workspace-write mode
@bb/provider-bridge-acp:test:      ↓ uses modelCli only for model selection when reasoningCli owns effort
@bb/provider-bridge-acp:test:      ↓ switches ACP-native models A to B to A when setters return no state ('model config option')
@bb/provider-bridge-acp:test:      ↓ switches ACP-native models A to B to A when setters return no state ('session models state')
@bb/provider-bridge-acp:test:      ↓ applies a queued steer's changed ACP-native model before its prompt
@bb/provider-bridge-acp:test:      ↓ restores the requested ACP-native model after the agent switches itself
@bb/provider-bridge-acp:test:      ↓ tracks an acknowledged ACP-native model when a later tier update fails
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models with session/set_config_option before the first prompt
@bb/provider-bridge-acp:test:      ↓ returns the model config option's own error and never calls an unadvertised session/set_model
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models from session models state (config error: false)
@bb/provider-bridge-acp:test:      ↓ selects ACP-native models from session models state (config error: true)
@bb/provider-bridge-acp:test:      ↓ applies a changed ACP-native model before a follow-up prompt ('model config option')
@bb/provider-bridge-acp:test:      ↓ applies a changed ACP-native model before a follow-up prompt ('session models state')
@bb/provider-bridge-acp:test:      ↓ applies changed ACP-native reasoning and service tier before a follow-up prompt
@bb/provider-bridge-acp:test:      ↓ rejects a follow-up turn whose ACP-native model the agent refuses
@bb/provider-bridge-acp:test:      ↓ rebuilds the agent with the current turn's model selection
@bb/provider-bridge-acp:test:      ↓ relaunches a CLI-selected ACP agent when a follow-up changes its model
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'model' changes (restorable=false)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'reasoning' changes (restorable=false)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'model' changes (restorable=true)
@bb/provider-bridge-acp:test:      ↓ preserves the session across CLI 'reasoning' changes (restorable=true)
@bb/provider-bridge-acp:test:      ↓ selects ACP-native reasoning with session/set_config_option before the first prompt
@bb/provider-bridge-acp:test:      ↓ leaves the live agent effort untouched when execution omits reasoning
@bb/provider-bridge-acp:test:      ↓ applies configured native reasoning when the ACP agent does not advertise thought_level
@bb/provider-bridge-acp:test:      ↓ confirms ACP-native models without thought_level have no selectable reasoning
@bb/provider-bridge-acp:test:      ↓ lists an ACP-native model's own thought levels when none of them are standard levels
@bb/provider-bridge-acp:test:      ↓ shows configured native reasoning for ACP-native models without thought_level
@bb/provider-bridge-acp:test:      ↓ preserves Electron Node mode for the dynamic-tool MCP process only
@bb/provider-bridge-acp:test:      ↓ warns and launches the family id when a reasoning variant is missing
@bb/provider-bridge-acp:test:      ↓ starts a session and runs a prompt turn end to end
@bb/provider-bridge-acp:test:      ↓ rebuilds the agent with environment from a later turn
@bb/provider-bridge-acp:test:      ↓ authenticates ACP sessions with cached tokens when advertised
@bb/provider-bridge-acp:test:      ↓ prefers xAI API-key auth when XAI_API_KEY is available
@bb/provider-bridge-acp:test:      ↓ lets agents surface their own error for unsupported advertised auth methods
@bb/provider-bridge-acp:test:      ↓ tells the user how to sign in, from the methods the agent advertised
@bb/provider-bridge-acp:test:      ↓ keeps a non-auth session failure untyped when the agent advertises a login bb cannot perform
@bb/provider-bridge-acp:test:      ↓ keeps an agent exit during session/new untyped when the agent advertises a login bb cannot perform
@bb/provider-bridge-acp:test:      ↓ approves Cursor session MCP servers for the session lifetime (#2018)
@bb/provider-bridge-acp:test:      ↓ forwards ACP dynamic tool calls through the runtime tool-call contract
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after socket-close
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after provider-exit
@bb/provider-bridge-acp:test:      ↓ cancels the runtime tool request after turn-end
@bb/provider-bridge-acp:test:      ↓ keeps the dynamic-tool TCP server alive after a client reset on initialize
@bb/provider-bridge-acp:test:      ↓ lists skills/configure roots in canonical session instructions
@bb/provider-bridge-acp:test:      ↓ prepends instructions to the first prompt only
@bb/provider-bridge-acp:test:      ↓ auto-allows permission requests in full mode
@bb/provider-bridge-acp:test:      ↓ forwards permission requests to the runtime in ask mode
@bb/provider-bridge-acp:test:      ↓ presents an external-directory write permission as a file-change approval
@bb/provider-bridge-acp:test:      ↓ answers session-grant decisions with the allow_always option
@bb/provider-bridge-acp:test:      ↓ acknowledges fs add writes
@bb/provider-bridge-acp:test:      ↓ acknowledges fs update writes
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/start' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'accept-edits' -> 'full' on 'turn/steer' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/start' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: false, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: false, load: true)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: true, load: false)
@bb/provider-bridge-acp:test:      ↓ reconciles 'full' -> 'accept-edits' on 'turn/steer' (CLI: true, load: true)
@bb/provider-bridge-acp:test:      ↓ rejects simultaneous starts while reconciling unchanged permissions
@bb/provider-bridge-acp:test:      ↓ preserves stacked steers across permission CLI rebuilds
@bb/provider-bridge-acp:test:      ↓ reports a permission-changing steer whose replacement fails to start
@bb/provider-bridge-acp:test:      ↓ denies client fs writes outside the workspace in accept-edits mode
@bb/provider-bridge-acp:test:      ↓ allows canonical accept-edits writes into a configured extra write root
@bb/provider-bridge-acp:test:      ↓ keeps partial output from the cancelled prompt then continues
@bb/provider-bridge-acp:test:      ↓ rebuilds a stuck agent after a steer cancellation error (session/load=0)
@bb/provider-bridge-acp:test:      ↓ rebuilds a stuck agent after a steer cancellation error (session/load=1)
@bb/provider-bridge-acp:test:      ↓ delivers stacked steers on the same turn
@bb/provider-bridge-acp:test:      ↓ closes a command left open by a steered-away prompt as interrupted
@bb/provider-bridge-acp:test:      ↓ cancels a stacked steer prompt that also hangs
@bb/provider-bridge-acp:test:      ↓ runs the builtin /compact command as compaction, not as a prompt
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn legibly when the agent rejects the request
@bb/provider-bridge-acp:test:      ↓ does not report an ACP refusal as successful compaction
@bb/provider-bridge-acp:test:      ↓ does not apply OMP compaction prose to 'generic' ACP
@bb/provider-bridge-acp:test:      ↓ does not apply OMP compaction prose to 'OpenCode' ACP
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn when the agent reports the failure in an end-turn message
@bb/provider-bridge-acp:test:      ↓ completes a no-op compaction turn without reporting a compacted context
@bb/provider-bridge-acp:test:      ↓ keeps classifying a no-op compaction when the agent rewords its prose
@bb/provider-bridge-acp:test:      ↓ fails the compaction turn when the failure report is reworded or preceded by other text
@bb/provider-bridge-acp:test:      ↓ accepts turn input only after the prompt carrying it goes out
@bb/provider-bridge-acp:test:      ↓ never accepts a queued steer the stopped turn did not send
@bb/provider-bridge-acp:test:      ↓ rejects steers when no turn is active
@bb/provider-bridge-acp:test:      ↓ cancels the active turn on thread/stop
@bb/provider-bridge-acp:test:      ↓ settles the interrupted turn itself when the agent ignores session/cancel
@bb/provider-bridge-acp:test:      × hands a live process-owned fork to the target without losing history (resume failure: false) 135ms
@bb/provider-bridge-acp:test:      × hands a live process-owned fork to the target without losing history (resume failure: true) 117ms
@bb/provider-bridge-acp:test:      ↓ forks an advertised ACP session with the target cwd and MCP servers
@bb/provider-bridge-acp:test:      ↓ rejects a checkpoint fork before session/fork
@bb/provider-bridge-acp:test:      ↓ rejects a fork result that reuses the source session id
@bb/provider-bridge-acp:test:      ↓ rejects fork before session/fork when the agent omits the capability
@bb/provider-bridge-acp:test:      ↓ emits session.reset after identity at every construction (start, resume, fork)
@bb/provider-bridge-acp:test:      ↓ surfaces Grok context window size and prompt usage from session _meta
@bb/provider-bridge-acp:test:      ↓ ignores Grok-shaped session _meta on other ACP dialects
@bb/provider-bridge-acp:test:      ↓ holds an agent update written with the session/new response until thread/identity is out, and leaves out what the agent said before any prompt
@bb/provider-bridge-acp:test:      ↓ holds an agent update written with the session/fork response until the fork's thread/identity is out
@bb/provider-bridge-acp:test:      ↓ forwards context usage reported during session/load
@bb/provider-bridge-acp:test:      ↓ ignores load-time context usage for a different session
@bb/provider-bridge-acp:test:      ↓ discards load-time context usage when session/load fails
@bb/provider-bridge-acp:test:      ↓ re-applies ACP-native reasoning after session/load resume
@bb/provider-bridge-acp:test:      ↓ falls back to a fresh session with a warning when load is unsupported
@bb/provider-bridge-acp:test:      ↓ reports unexpected agent exits as a single provider error
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='0', failLoad='0', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='0', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='1', active=false)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='0', failLoad='0', active=true)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='0', active=true)
@bb/provider-bridge-acp:test:      ↓ recovers after an external agent exit (load='1', failLoad='1', active=true)
@bb/provider-bridge-acp:test:      ↓ fails the interrupted turn and accepts the next message while an exited agent's process tree is still being cleaned up
@bb/provider-bridge-acp:test:      ↓ releases a session still under construction: the agent is reaped and the pending thread/start fails
@bb/provider-bridge-acp:test:      ↓ lets a retried thread/start supersede a construction still in flight for the same thread
@bb/provider-bridge-acp:test:      ↓ fails thread/start with a clear error when the agent command is missing
@bb/provider-bridge-acp:test:      ↓ rejects thread/start without an ACP launch spec
@bb/provider-bridge-acp:test:      ↓ does not show what an agent says before its first prompt, and does not open a turn that would block the prompt
@bb/provider-bridge-acp:test:      ↓ says so when the agent ends a prompted turn without sending anything, and stays quiet when it replied
@bb/provider-bridge-acp:test:      ↓ opens a turn for unprompted output and closes it after a quiet window
@bb/provider-bridge-acp:test:      ↓ keeps the agent's turn open while a tool it announced is running, and settles it as interrupted when the user sends a message
@bb/provider-bridge-acp:test:      ↓ runs a steer that arrives during the agent's own turn as a prompt inside that turn
@bb/provider-bridge-acp:test:      ↓ shows a permission request the agent raises with no prompt in flight instead of cancelling it
@bb/provider-bridge-acp:test:      ↓ fails the agent's own turn when the agent exits during it
@bb/provider-bridge-acp:test:      ↓ waits for a busy agent to go quiet and resends the prompt once
@bb/provider-bridge-acp:test:      ↓ fails the turn with the agent's own error when it stays busy
@bb/provider-bridge-acp:test:      ↓ restores a session with session/resume when the agent offers it, without replaying history
@bb/provider-bridge-acp:test:      ↓ reports a session as restorable when the agent offers only session/resume
@bb/provider-bridge-acp:test:      ↓ does not send the instructions again to a session the agent restored
@bb/provider-bridge-acp:test:      ↓ sends the instructions again when the agent could not restore the session
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with max_tokens as completed with a notice
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with refusal as completed with a notice
@bb/provider-bridge-acp:test:      ↓ ends a turn that stops with paused_by_vendor as completed with a notice
@bb/provider-bridge-acp:test:      ↓ tells the agent it can ask form questions
@bb/provider-bridge-acp:test:      ↓ shows a form question as a user question and returns typed answers to the agent
@bb/provider-bridge-acp:test:      ↓ folds the 'omp' Other companion into its choice (#6031, #6131)
@bb/provider-bridge-acp:test:      ↓ folds the 'droid' Other companion into its choice (#6031, #6131)
@bb/provider-bridge-acp:test:      ↓ answers a form it cannot show with an error that says why (#6266)
@bb/provider-bridge-acp:test:      ↓ answers a pending question with cancel when the turn is stopped
@bb/provider-bridge-acp:test:      ↓ publishes the agent's slash commands once per distinct list
@bb/provider-bridge-acp:test:      ↓ publishes the session's own options and leaves the model and reasoning to bb's pickers
@bb/provider-bridge-acp:test:      ↓ lists the agent's options on every model before any thread exists, whichever way the models were found
@bb/provider-bridge-acp:test:      ↓ asks the agent for its models and options in the workspace bb names
@bb/provider-bridge-acp:test:      ↓ deletes the session it opened to read an agent's options when the agent can delete sessions
@bb/provider-bridge-acp:test:      ↓ deletes its discovery session through opencode's own CLI when the agent cannot delete sessions over ACP
@bb/provider-bridge-acp:test:      ↓ publishes no session options for an agent whose only options are its model and thought level
@bb/provider-bridge-acp:test:      ↓ applies requested session options before the prompt and does not repeat a value the session already has
@bb/provider-bridge-acp:test:      ↓ never sends a value the option does not offer
@bb/provider-bridge-acp:test:      ↓ warns and keeps the agent's value when the agent rejects a requested option
@bb/provider-bridge-acp:test:      ↓ spells out bb skill commands the agent did not advertise, wherever they appear, so the agent does not swallow them as unknown commands
@bb/provider-bridge-acp:test:      ↓ publishes nothing for an agent with no commands or options
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  FAIL  |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts > acp bridge > hands a live process-owned fork to the target without losing history (resume failure: false)
@bb/provider-bridge-acp:test: AssertionError: expected { code: -32000, …(1) } to be undefined
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: - Expected:
@bb/provider-bridge-acp:test: undefined
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: + Received:
@bb/provider-bridge-acp:test: {
@bb/provider-bridge-acp:test:   "code": -32000,
@bb/provider-bridge-acp:test:   "message": "Source session is not quiescent in this process",
@bb/provider-bridge-acp:test: }
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ❯ src/bridge/bridge.test.ts:4165:32
@bb/provider-bridge-acp:test:     4163|         ).toBe(false);
@bb/provider-bridge-acp:test:     4164|       } else {
@bb/provider-bridge-acp:test:     4165|         expect(response.error).toBeUndefined();
@bb/provider-bridge-acp:test:        |                                ^
@bb/provider-bridge-acp:test:     4166|         const forkedId = providerThreadIdOf(response);
@bb/provider-bridge-acp:test:     4167|         bbThreadIdByProviderThreadId.set(forkedId, "thread-owned-fork"…
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  FAIL  |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts > acp bridge > hands a live process-owned fork to the target without losing history (resume failure: true)
@bb/provider-bridge-acp:test: AssertionError: expected 'Source session is not quiescent in th…' to contain 'Session cannot be acquired'
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: Expected: "Session cannot be acquired"
@bb/provider-bridge-acp:test: Received: "Source session is not quiescent in this process"
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ❯ src/bridge/bridge.test.ts:4153:41
@bb/provider-bridge-acp:test:     4151|       const response = await waitForResponse(forkId);
@bb/provider-bridge-acp:test:     4152|       if (failResume) {
@bb/provider-bridge-acp:test:     4153|         expect(response.error?.message).toContain("Session cannot be a…
@bb/provider-bridge-acp:test:        |                                         ^
@bb/provider-bridge-acp:test:     4154|         expect(
@bb/provider-bridge-acp:test:     4155|           loggedAcpRequests(targetLog).some(
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  Test Files  1 failed (1)
@bb/provider-bridge-acp:test:       Tests  2 failed | 207 skipped (209)
@bb/provider-bridge-acp:test:    Start at  14:19:38
@bb/provider-bridge-acp:test:    Duration  1.61s (transform 838ms, setup 0ms, import 1.20s, tests 254ms, environment 0ms)
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  ELIFECYCLE  Test failed. See above for more details.
@bb/provider-bridge-acp#test:  ERROR  command ($CHECKOUT_2/packages/provider-bridge-acp) /usr/local/bin/pnpm run test src/bridge/bridge.test.ts -t hands a live process-owned fork exited (1)

 Tasks:    2 successful, 3 total
Cached:    1 cached, 3 total
  Time:    2.862s 
Failed:    @bb/provider-bridge-acp#test

 ERROR  run failed: command  exited (1)
Existing fork control tests
   • turbo 2.11.10
   • Packages in scope: @bb/provider-bridge-acp
   • Running test in 1 package
   • Remote caching disabled

//:ensure-native-modules: cache bypass, force executing 02e85b863427567f
@bb/process-utils:generate:profile-worker: cache miss, executing 1a85815fa19e8826
@bb/process-utils:generate:profile-worker: 
@bb/process-utils:generate:profile-worker: > @bb/process-utils@0.0.1 generate:profile-worker $CHECKOUT_1/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: > bb@ ensure-native-modules $CHECKOUT_1
//:ensure-native-modules: > node scripts/ensure-native-modules.mjs
//:ensure-native-modules: 
@bb/provider-bridge-acp:test: cache miss, executing 6e267827a4c5a5a0
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: > @bb/provider-bridge-acp@0.0.1 test $CHECKOUT_1/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: > vitest run --config vitest.config.ts "src/bridge/bridge.test.ts" "-t" "forks an advertised|rejects a fork|rejects fork before"
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: (!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
@bb/provider-bridge-acp:test:   - `__dirname` (vitest.config.ts:10:15). Use `import.meta.dirname` instead
@bb/provider-bridge-acp:test: Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  RUN  v4.1.12 $CHECKOUT_1/packages/provider-bridge-acp
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test: (node:PID) ExperimentalWarning: SQLite is an experimental feature and might change at any time
@bb/provider-bridge-acp:test: (Use `node --trace-warnings ...` to show where the warning was created)
@bb/provider-bridge-acp:test: acp bridge: built "bb-bridge" session MCP config for thread "thread-fork" (1 tools)
@bb/provider-bridge-acp:test:  ✓ |@bb/provider-bridge-acp:isolated| src/bridge/bridge.test.ts (209 tests | 206 skipped) 264ms
@bb/provider-bridge-acp:test: 
@bb/provider-bridge-acp:test:  Test Files  1 passed (1)
@bb/provider-bridge-acp:test:       Tests  3 passed | 206 skipped (209)
@bb/provider-bridge-acp:test:    Start at  14:20:52
@bb/provider-bridge-acp:test:    Duration  1.64s (transform 845ms, setup 0ms, import 1.20s, tests 264ms, environment 0ms)
@bb/provider-bridge-acp:test: 

 Tasks:    3 successful, 3 total
Cached:    0 cached, 3 total
  Time:    2.929s 

Additional verification commands: git fetch origin main, git rev-parse HEAD, git diff --check, git diff --numstat origin/main, and read-only GitHub issue/PR metadata queries. No production instance or real-provider account was accessed.