#7040 · Approval authority after steering
November 4, 2026 · trusted main 783a6062bd6f485597e66450a149069402780868
Verdict: PARTIALLY REPRODUCED · Root-cause confidence: high for the verified routing mechanism; the installed historical events and live Codex behavior remain unverified.
1. TL;DR
An incoming message can carry a different permission-escalation setting even when the visible permission mode remains accept-edits. The current runtime installs those options while steering, and a later approval request is denied without reaching the interaction callback when escalation is deny. A boundary-level reproduction demonstrates that suppression twice, using a scripted provider that emits an approval after the steer is accepted. However, the current Codex bridge interrupts and replaces the native turn when permission settings change: the tested native policies are on-request, then never, not a persistently stale on-request policy. Therefore the historical policy mismatch is not reproduced on current main; the remaining informational-input authority question needs a product/security decision, not an automatic permission relaxation.
2. Claims vs findings
| Claim | Finding | Evidence and limits |
|---|---|---|
| Non-user input resolves to deny. | Verified | The existing server permission matrix passes for user, agent and system initiators. The server send path computes escalation before preparing a submit command, including steer submissions. |
| Steering can replace the active runtime escalation gate. | Verified at runtime boundary | Both cases start with accept-edits/ask and a held turn. An accepted ask steer reaches the callback; an accepted deny steer returns Denied without a callback. |
| Current Codex leaves native on-request unchanged after an ask-to-deny steer. | Refuted for the tested successful transition on main | The actual bridge sends one native interrupt, then a new turn/start with never. It sends no native turn/steer for this permission change. |
| A denial can bypass interaction persistence. | Verified callback suppression; persistence consequence follows from source | The runtime directly encodes a denial before invoking onInteractiveRequest. The host registers interactions from that callback. No server database was exercised in this reproduction. |
| The reported historical native results were caused by this branch. | Unverified | No historical installation, native recordings, or user runtime data were read. No real commands were replayed. |
| The complete current live workflow still stalls under an actual Codex process. | Unverified | The runtime test deliberately emits a late approval through a scripted bridge. The native-policy test uses the real BB Codex bridge with a fake native app-server. These are complementary boundary tests, not a combined live-provider reproduction. |
3. Environment
- Trusted get-bb/bb origin/main:
783a6062bd6f485597e66450a149069402780868. Remote main was checked again after testing; it was unchanged. - Linux x86_64 (gVisor), Node 22.19.0, pnpm 9.15.0, Vitest 4.1.1.
- Two new detached checkouts at exactly the same trusted base, called A and B. Both were clean before applying the investigator-authored reproduction patch.
- Each test creates its own temporary workspace; the test bridge launch creates separate temporary plugin data. No app server, public listener, live provider account, browser, or user instance was used. No ports were opened.
- Only test files and an existing test-only scripted-provider fixture were changed. No production files or dependencies were changed.
4. Minimal reproduction
Use a fresh checkout at the recorded base. All code below is investigator-authored from trusted repository APIs, not copied from the issue. The fixture emits a synthetic command-approval request; it does not launch that command.
- Install and build using the normal frozen workflow:
pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build build:types --filter=@get-bb/plugin-sdk pnpm exec turbo run build
The first full build in checkout A exposed a missing built Plugin SDK prerequisite in the GitHub plugin. Building the SDK explicitly and repeating the full build succeeded: 73/73 tasks. This setup error is not counted as a product reproduction. - Save the complete patch in Appendix A as
reproduction.patch, then apply it:git apply reproduction.patch
The fixture change only makes the existing test provider capable of sending an approval after acknowledging an injected input. It does not implement approval policy. - Run these three commands independently; the first intentionally exits 1:
pnpm exec turbo run test --filter=@bb/agent-runtime -- src/issue-7040.approval.test.ts --silent=false pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/bridge/issue-7040.policy.test.ts --silent=false pnpm exec turbo run test --filter=@bb/server -- test/permissions/permission-matrix.test.ts
Expected versus actual
Hypothesis being tested: if the incoming deny-valued input is informational, a human-authorized active turn should retain visible approval routing. That proposed invariant expects one callback in both runtime cases. The runtime API has no informational-versus-revocation signal here; an explicit revocation is indistinguishable at this boundary. The failing assertion alone therefore does not establish that preserving ask would be safe.
Actual output, identically observed in A and B (Turbo prefixes and timing omitted):
{"permissionEscalation":"ask","acceptedSteer":true,"interactionCallbacks":1,"denied":false}
{"permissionEscalation":"deny","acceptedSteer":true,"interactionCallbacks":0,"denied":true}
AssertionError: expected [] to have a length of 1 but got +0
Tests 1 failed | 1 passed (2)
{"nativePolicies":["on-request","never"],"interrupts":1,"nativeSteers":0}
Tests 1 passed (1)The deny case also waits for the scripted agent message Denied before asserting the callback count, so this is not merely a timing race or a missing provider response. The ask control establishes that the callback and test provider are working.
5. Root cause
- Server initiator policy maps any non-user initiator to deny. The send path resolves that policy, and the submit payload carries it onward.
- steerTurn records the incoming options before waiting for the provider command to complete. recordThreadExecutionOptions replaces the thread configuration options; it does not preserve a separate initiator-authorized active-turn snapshot. This happens even before successful acknowledgement, a source observation not separately fault-injected here.
- Interactive routing reads the current thread configuration options. The runtime gate returns an encoded denial if a runtime-enforced approval policy denies escalation, or if the callback is absent. The gate predicate is exactly
permissionEscalation === "deny". - Host interaction registration lives in onInteractiveRequest. The early-denial branch does not call it and has no denial-provenance logging call of its own.
- Codex declares runtime-enforced approvals. But its current steer handler compares native settings, interrupts and waits for settlement, then starts a replacement native turn when those settings differ. User-reviewed escalation mapping maps deny to never. Thus the normal successful ask-to-deny transition now synchronizes native policy instead of silently leaving it on-request.
Historical scope: trusted main history attributes the native permission-changing steer repair to cd12e7a9dfb372432cd748eafcd73d142e15c16f (October 2, 2026; #4794). GitHub release metadata identifies desktop-v0.48.1 as published October 30, 2026 at e003e9510cbfd3bb6c26a28630b46ffb1c242a44, and GitHub compare confirms that fix commit is an ancestor. That establishes source inclusion, not an executed verification of an installed release or a remedy for informational-input authority.
6. Proposed fix and safety disposition
No production fix or pull request is attempted. Automatically retaining ask for every steer could weaken explicit revocations or non-user-started turns; the existing API does not express the distinction. A maintainer must first define an authorized, server-owned transition contract distinguishing informational input from a permission change. Any resulting design must keep native and runtime policy transitions consistent, preserve revocations and lifecycle cancellation, and avoid host-side inference of product authority. Separately, pre-callback denials should be observable through a privacy-safe reason/provenance event; no command contents are needed.
Autopilot simple-fix gate: failed. The unresolved repair changes permission/authorization semantics and needs a product decision. Those conditions disqualify it regardless of line count. No fix branch was created or pushed. GitHub cross-reference metadata and an open-PR search for 7040 showed no linked open PR at the time of this investigation.
7. Verification
The same agent repeated the reproduction in a second clean detached checkout B at 783a6062bd6f485597e66450a149069402780868. B had a fresh frozen install and its own generated test bridge, temporary workspaces and plugin data; the exact same reproduction patch was applied. The three commands in the Minimal reproduction section ran again with cache misses for the test tasks.
| Check | A | B |
|---|---|---|
| Runtime ask control | 1 callback; passes | 1 callback; passes |
| Runtime deny continuation hypothesis | 0 callbacks, Denied; expected assertion failure | 0 callbacks, Denied; same expected assertion failure |
| Codex permission-changing steer | 1 pass; on-request → never | 1 pass; on-request → never |
| Server permission matrix | 57 pass | 57 pass |
Additional existing tests in A: runtime.interactive-requests.test.ts, 13 pass; bridge.session-signature.test.ts, 12 pass. git diff --check passes. No binary changes, production patch, generated file, lockfile change, or added dependency forms part of the reproduction patch.
Report correction: the stale-native-policy claim is limited to history, not current main. Current main demonstrably restarts the native turn with never. The remaining result is explicitly a runtime-boundary reproduction, not proof that real Codex emits a later approval in that state. The two runs are repeat checks by the same agent, not independent review.
8. Related work
#4794 is relevant because trusted main history identifies it as the original native-steer synchronization change. No linked open PR was found for #7040. Other reports were not used as evidence that this path is fixed.
9. Evidence and trust limits
Issue text and comments were treated only as untrusted claims. Their instructions were ignored; no issue-provided command, patch, URL, branch, binary, or test was run or fetched. All executed repository code came from the recorded trusted main, plus this investigator-authored test patch. No real denied commands were replayed. The public report contains synthetic fixture IDs only; raw execution logs and the patch are retained outside this public report repository. Its repository policy requires reproduction code and selected output to be inline, so there are no downloadable raw log/test artifacts.
Appendix A. Complete reproducible patch
Copy this entire block into reproduction.patch in a clean checkout. It includes both complete test files and the test-only fixture extension. All additions total 225 text lines across three test-related files; this is evidence, not a proposed production fix.
diff --git a/packages/agent-runtime/src/issue-7040.approval.test.ts b/packages/agent-runtime/src/issue-7040.approval.test.ts
new file mode 100644
index 0000000000..7e0123b711
--- /dev/null
+++ b/packages/agent-runtime/src/issue-7040.approval.test.ts
@@ -0,0 +1,97 @@
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { expect, it } from "vitest";
+import type { PendingInteractionCreate, ThreadEvent } from "@bb/domain";
+import { promptTextInput } from "./test/prompt-input.js";
+import {
+ createScriptedEchoRuntime,
+ fullRuntimeOptions,
+ waitForThreadAgentMessageText,
+ waitForThreadTurnCompleted,
+ waitForThreadTurnStarted,
+} from "./test/runtime-test-harness.js";
+
+it.each(["ask", "deny"] as const)(
+ "human accept-edits start followed by an accepted %s steer",
+ async (permissionEscalation) => {
+ const workspacePath = mkdtempSync(join(tmpdir(), "bb-7040-"));
+ const events: ThreadEvent[] = [];
+ const requests: PendingInteractionCreate[] = [];
+ const options = {
+ ...fullRuntimeOptions,
+ permissionMode: "accept-edits",
+ permissionScope: "workspace",
+ approvalReviewer: "user",
+ permissionEscalation: "ask",
+ } as const;
+ const runtime = createScriptedEchoRuntime({
+ runtime: {
+ workspacePath,
+ onEvent: (event) => events.push(event),
+ onInteractiveRequest: async (request) => {
+ requests.push(request);
+ return { decision: "allow_once", grantedPermissions: null };
+ },
+ },
+ });
+ try {
+ await runtime.startThread({
+ environmentId: "env-1",
+ threadId: "t1",
+ projectId: "p1",
+ providerId: "fake",
+ options,
+ });
+ await runtime.runTurn({
+ clientRequestId: "creq_23456789ab",
+ threadId: "t1",
+ input: [promptTextInput({ text: "hold_turn" })],
+ options,
+ });
+ const { turnId } = await waitForThreadTurnStarted({
+ events,
+ providerId: "fake",
+ runtime,
+ threadId: "t1",
+ });
+ await expect(
+ runtime.steerTurn({
+ threadId: "t1",
+ expectedTurnId: turnId,
+ clientRequestId: "creq_23456789ac",
+ input: [promptTextInput({ text: "approve:command continuation" })],
+ options: { ...options, permissionEscalation },
+ }),
+ ).resolves.toEqual({ status: "steered" });
+ await waitForThreadAgentMessageText({
+ events,
+ providerId: "fake",
+ runtime,
+ threadId: "t1",
+ text:
+ permissionEscalation === "deny"
+ ? "Denied"
+ : "Response to: approve:command continuation",
+ });
+ await waitForThreadTurnCompleted({
+ events,
+ providerId: "fake",
+ runtime,
+ threadId: "t1",
+ });
+ console.log(
+ JSON.stringify({
+ permissionEscalation,
+ acceptedSteer: true,
+ interactionCallbacks: requests.length,
+ denied: permissionEscalation === "deny",
+ }),
+ );
+ expect(requests).toHaveLength(1);
+ } finally {
+ await runtime.shutdown();
+ rmSync(workspacePath, { recursive: true, force: true });
+ }
+ },
+);
diff --git a/plugins/provider-codex/src/bridge/issue-7040.policy.test.ts b/plugins/provider-codex/src/bridge/issue-7040.policy.test.ts
new file mode 100644
index 0000000000..e461674346
--- /dev/null
+++ b/plugins/provider-codex/src/bridge/issue-7040.policy.test.ts
@@ -0,0 +1,107 @@
+import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { expect, it, vi } from "vitest";
+import { experimental_createBridgeJsonRpcTestHarness as createHarness } from "@get-bb/plugin-sdk/provider-bridge/testing";
+import { z } from "zod";
+import { handleLine } from "./bridge.js";
+import { stubFakeCodexAppServer } from "./fake-codex-app-server-harness.js";
+
+it("synchronizes accept-edits ask-to-deny before accepting the steer", async () => {
+ const workspacePath = mkdtempSync(join(tmpdir(), "bb-7040-native-"));
+ const scriptPath = join(workspacePath, "script.json");
+ const requestLogPath = join(workspacePath, "requests.jsonl");
+ writeFileSync(scriptPath, JSON.stringify({ requestLogPath }));
+ stubFakeCodexAppServer(scriptPath);
+ const harness = createHarness(handleLine);
+ const options = {
+ permissionMode: "accept-edits",
+ permissionScope: "workspace",
+ approvalReviewer: "user",
+ permissionEscalation: "ask",
+ } as const;
+ try {
+ harness.sendRequest(1, "thread/start", {
+ threadId: "thr_7040native",
+ cwd: workspacePath,
+ instructionMode: "append",
+ options,
+ });
+ const started = await harness.waitForResponse(1);
+ expect(started.error).toBeUndefined();
+ const { providerThreadId } = z
+ .object({ providerThreadId: z.string() })
+ .parse(started.result);
+ harness.sendRequest(2, "turn/start", {
+ threadId: "thr_7040native",
+ providerThreadId,
+ clientRequestId: "creq_23456789ab",
+ input: [{ type: "text", text: "/wait-for-interrupt", mentions: [] }],
+ options,
+ });
+ expect((await harness.waitForResponse(2)).error).toBeUndefined();
+ await vi.waitFor(() =>
+ expect(harness.messages).toContainEqual(
+ expect.objectContaining({
+ method: "thread/delta",
+ params: expect.objectContaining({
+ deltas: expect.arrayContaining([
+ expect.objectContaining({ kind: "turn.open" }),
+ ]),
+ }),
+ }),
+ ),
+ );
+ harness.sendRequest(3, "turn/steer", {
+ threadId: "thr_7040native",
+ providerThreadId,
+ expectedTurnId: "turn-fx-1",
+ clientRequestId: "creq_23456789ac",
+ input: [{ type: "text", text: "continue", mentions: [] }],
+ options: { ...options, permissionEscalation: "deny" },
+ });
+ expect((await harness.waitForResponse(3)).error).toBeUndefined();
+ const requests = readFileSync(requestLogPath, "utf8")
+ .trim()
+ .split("\n")
+ .map((line) =>
+ z
+ .object({
+ method: z.string(),
+ params: z.record(z.string(), z.unknown()),
+ })
+ .parse(JSON.parse(line)),
+ );
+ const starts = requests.filter(
+ (request) => request.method === "turn/start",
+ );
+ expect(starts.map((request) => request.params.approvalPolicy)).toEqual([
+ "on-request",
+ "never",
+ ]);
+ expect(
+ requests.filter((request) => request.method === "turn/interrupt"),
+ ).toHaveLength(1);
+ expect(
+ requests.filter((request) => request.method === "turn/steer"),
+ ).toHaveLength(0);
+ console.log(
+ JSON.stringify({
+ nativePolicies: starts.map((request) => request.params.approvalPolicy),
+ interrupts: 1,
+ nativeSteers: 0,
+ }),
+ );
+ } finally {
+ harness.sendRequest(99, "thread/stop", {
+ threadId: "thr_7040native",
+ providerThreadId: "cleanup",
+ intent: "release",
+ activeTurnId: null,
+ });
+ await harness.waitForResponse(99).catch(() => undefined);
+ harness.restore();
+ vi.unstubAllEnvs();
+ rmSync(workspacePath, { recursive: true, force: true });
+ }
+}, 30_000);
diff --git a/tests/scripted-echo-provider/src/provider-bridge.ts b/tests/scripted-echo-provider/src/provider-bridge.ts
index a14107a5e2..5207563805 100644
--- a/tests/scripted-echo-provider/src/provider-bridge.ts
+++ b/tests/scripted-echo-provider/src/provider-bridge.ts
@@ -1135,6 +1135,27 @@ const handlers: Record<string, RequestHandler> = {
};
if (options.steerResponseDelayMs === undefined) {
acceptSteer();
+ const plan = parseTurnPlan(promptText(parsed.data.input));
+ if (plan.approvalKind !== null) {
+ const requestId = sendRequest(
+ BRIDGE_INBOUND_REQUEST_METHODS.interactionRequest,
+ {
+ providerThreadId: session.providerThreadId,
+ threadId: session.threadId,
+ turnId: providerTurnId,
+ payload: approvalPayload(
+ plan.approvalKind,
+ `approval-${providerTurnId}`,
+ ),
+ },
+ );
+ pendingReplies.set(requestId, {
+ kind: "approval",
+ threadId: session.threadId,
+ responseText: plan.responseText,
+ delayMs: plan.delayMs,
+ });
+ }
return;
}
setTimeout(acceptSteer, options.steerResponseDelayMs);
Runtime test as a standalone file
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { expect, it } from "vitest";
import type { PendingInteractionCreate, ThreadEvent } from "@bb/domain";
import { promptTextInput } from "./test/prompt-input.js";
import {
createScriptedEchoRuntime,
fullRuntimeOptions,
waitForThreadAgentMessageText,
waitForThreadTurnCompleted,
waitForThreadTurnStarted,
} from "./test/runtime-test-harness.js";
it.each(["ask", "deny"] as const)(
"human accept-edits start followed by an accepted %s steer",
async (permissionEscalation) => {
const workspacePath = mkdtempSync(join(tmpdir(), "bb-7040-"));
const events: ThreadEvent[] = [];
const requests: PendingInteractionCreate[] = [];
const options = {
...fullRuntimeOptions,
permissionMode: "accept-edits",
permissionScope: "workspace",
approvalReviewer: "user",
permissionEscalation: "ask",
} as const;
const runtime = createScriptedEchoRuntime({
runtime: {
workspacePath,
onEvent: (event) => events.push(event),
onInteractiveRequest: async (request) => {
requests.push(request);
return { decision: "allow_once", grantedPermissions: null };
},
},
});
try {
await runtime.startThread({
environmentId: "env-1",
threadId: "t1",
projectId: "p1",
providerId: "fake",
options,
});
await runtime.runTurn({
clientRequestId: "creq_23456789ab",
threadId: "t1",
input: [promptTextInput({ text: "hold_turn" })],
options,
});
const { turnId } = await waitForThreadTurnStarted({
events,
providerId: "fake",
runtime,
threadId: "t1",
});
await expect(
runtime.steerTurn({
threadId: "t1",
expectedTurnId: turnId,
clientRequestId: "creq_23456789ac",
input: [promptTextInput({ text: "approve:command continuation" })],
options: { ...options, permissionEscalation },
}),
).resolves.toEqual({ status: "steered" });
await waitForThreadAgentMessageText({
events,
providerId: "fake",
runtime,
threadId: "t1",
text:
permissionEscalation === "deny"
? "Denied"
: "Response to: approve:command continuation",
});
await waitForThreadTurnCompleted({
events,
providerId: "fake",
runtime,
threadId: "t1",
});
console.log(
JSON.stringify({
permissionEscalation,
acceptedSteer: true,
interactionCallbacks: requests.length,
denied: permissionEscalation === "deny",
}),
);
expect(requests).toHaveLength(1);
} finally {
await runtime.shutdown();
rmSync(workspacePath, { recursive: true, force: true });
}
},
);
Native-policy test as a standalone file
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { expect, it, vi } from "vitest";
import { experimental_createBridgeJsonRpcTestHarness as createHarness } from "@get-bb/plugin-sdk/provider-bridge/testing";
import { z } from "zod";
import { handleLine } from "./bridge.js";
import { stubFakeCodexAppServer } from "./fake-codex-app-server-harness.js";
it("synchronizes accept-edits ask-to-deny before accepting the steer", async () => {
const workspacePath = mkdtempSync(join(tmpdir(), "bb-7040-native-"));
const scriptPath = join(workspacePath, "script.json");
const requestLogPath = join(workspacePath, "requests.jsonl");
writeFileSync(scriptPath, JSON.stringify({ requestLogPath }));
stubFakeCodexAppServer(scriptPath);
const harness = createHarness(handleLine);
const options = {
permissionMode: "accept-edits",
permissionScope: "workspace",
approvalReviewer: "user",
permissionEscalation: "ask",
} as const;
try {
harness.sendRequest(1, "thread/start", {
threadId: "thr_7040native",
cwd: workspacePath,
instructionMode: "append",
options,
});
const started = await harness.waitForResponse(1);
expect(started.error).toBeUndefined();
const { providerThreadId } = z
.object({ providerThreadId: z.string() })
.parse(started.result);
harness.sendRequest(2, "turn/start", {
threadId: "thr_7040native",
providerThreadId,
clientRequestId: "creq_23456789ab",
input: [{ type: "text", text: "/wait-for-interrupt", mentions: [] }],
options,
});
expect((await harness.waitForResponse(2)).error).toBeUndefined();
await vi.waitFor(() =>
expect(harness.messages).toContainEqual(
expect.objectContaining({
method: "thread/delta",
params: expect.objectContaining({
deltas: expect.arrayContaining([
expect.objectContaining({ kind: "turn.open" }),
]),
}),
}),
),
);
harness.sendRequest(3, "turn/steer", {
threadId: "thr_7040native",
providerThreadId,
expectedTurnId: "turn-fx-1",
clientRequestId: "creq_23456789ac",
input: [{ type: "text", text: "continue", mentions: [] }],
options: { ...options, permissionEscalation: "deny" },
});
expect((await harness.waitForResponse(3)).error).toBeUndefined();
const requests = readFileSync(requestLogPath, "utf8")
.trim()
.split("\n")
.map((line) =>
z
.object({
method: z.string(),
params: z.record(z.string(), z.unknown()),
})
.parse(JSON.parse(line)),
);
const starts = requests.filter(
(request) => request.method === "turn/start",
);
expect(starts.map((request) => request.params.approvalPolicy)).toEqual([
"on-request",
"never",
]);
expect(
requests.filter((request) => request.method === "turn/interrupt"),
).toHaveLength(1);
expect(
requests.filter((request) => request.method === "turn/steer"),
).toHaveLength(0);
console.log(
JSON.stringify({
nativePolicies: starts.map((request) => request.params.approvalPolicy),
interrupts: 1,
nativeSteers: 0,
}),
);
} finally {
harness.sendRequest(99, "thread/stop", {
threadId: "thr_7040native",
providerThreadId: "cleanup",
intent: "release",
activeTurnId: null,
});
await harness.waitForResponse(99).catch(() => undefined);
harness.restore();
vi.unstubAllEnvs();
rmSync(workspacePath, { recursive: true, force: true });
}
}, 30_000);
Fixture extension alone
diff --git a/tests/scripted-echo-provider/src/provider-bridge.ts b/tests/scripted-echo-provider/src/provider-bridge.ts
index a14107a5e2..5207563805 100644
--- a/tests/scripted-echo-provider/src/provider-bridge.ts
+++ b/tests/scripted-echo-provider/src/provider-bridge.ts
@@ -1135,6 +1135,27 @@ const handlers: Record<string, RequestHandler> = {
};
if (options.steerResponseDelayMs === undefined) {
acceptSteer();
+ const plan = parseTurnPlan(promptText(parsed.data.input));
+ if (plan.approvalKind !== null) {
+ const requestId = sendRequest(
+ BRIDGE_INBOUND_REQUEST_METHODS.interactionRequest,
+ {
+ providerThreadId: session.providerThreadId,
+ threadId: session.threadId,
+ turnId: providerTurnId,
+ payload: approvalPayload(
+ plan.approvalKind,
+ `approval-${providerTurnId}`,
+ ),
+ },
+ );
+ pendingReplies.set(requestId, {
+ kind: "approval",
+ threadId: session.threadId,
+ responseText: plan.responseText,
+ delayMs: plan.delayMs,
+ });
+ }
return;
}
setTimeout(acceptSteer, options.steerResponseDelayMs);
Appendix B. Additional validation commands
pnpm exec turbo run test --filter=@bb/agent-runtime -- src/runtime.interactive-requests.test.ts pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/bridge/bridge.session-signature.test.ts git diff --check
> AGENT GENERATED