#7476 · Codex app-server browser-host handoff investigation
Trusted base: 7794941da1b6e2baf017e5f7ab65b5f223fcaf54.
Verdict: NOT REPRODUCED · Root-cause confidence: low.
1. TL;DR
The report describes browser discovery failing in a BB Codex session on macOS while the desktop upstream application can access the browser. This investigation had only Linux, not the Mac, its desktop applications, or the exact upstream executable. It therefore does not reproduce or refute the reported symptom. A new boundary probe against unchanged trusted-main production code shows that BB's Codex bridge passes arbitrary synthetic inherited context to an actual child process and leaves missing context absent. That supports an unresolved host-lifecycle or launch-provenance question, not a demonstrated environment-filtering defect. Both clean checkouts passed the same three probe cases plus 13 existing launch/connection tests.
2. Claims vs findings
| Claim or hypothesis | Status | Evidence |
|---|---|---|
| Browser discovery fails in the reported local macOS setup. | Unverified here | No macOS host, desktop application, existing browser profile, or live Computer Use session was available. Reporter evidence is not a second reproduction. |
| The upstream desktop application succeeds on the same Mac. | Unverified here | No access to that comparison environment. |
| BB discards inherited upstream host context. | Not supported by the bounded test | The real bridge launch path forwarded both synthetic non-BB-prefixed markers unchanged. This does not establish behavior of every upstream variable, the daemon's original parent, macOS pipe access, or identity verification. |
| Missing host context is initialized by the Codex bridge. | Not observed | With the synthetic pair absent, both keys remained absent in the child. This is expected inheritance behavior, not proof that BB must provide an upstream host. |
| The installed upstream bundle rejects missing host prerequisites before Chrome access. | Unverified here | The installed bundle was not available and no issue-supplied code or external links were executed or fetched. |
| Separate browser automation backends work as controls. | Not retested | Those controls do not exercise this upstream browser-host handoff and cannot establish its cause. |
3. Environment
- Two distinct clean temporary clones of public
get-bb/bb, each detached at7794941da1b6e2baf017e5f7ab65b5f223fcaf54, fetched from the trusted repository main branch. - Linux
4.19.0-gvisor x86_64; Nodev22.19.0; pnpm9.15.0; source pluginbb-plugin-provider-codex 0.1.1; SDK0.6.141. - Frozen dependency installs completed in both clones with no new dependency or lockfile edit. Both SDK runtime builds passed through Turbo.
- No real Codex executable or account was used: the bridge launches a small Node child speaking the minimum app-server protocol. No desktop/browser version was independently measured.
- No BB server, live runtime data, application profile, browser, or network listener was started. Each probe uses a fresh temporary directory and only captures two synthetic variables, never the real environment.
4. Minimal bounded reproduction
This reproduces environment inheritance at the actual Codex bridge-to-app-server child boundary, not the macOS browser failure. Save the test below as plugins/provider-codex/src/bridge/bridge.host-context-probe.test.ts in a clean clone at the recorded commit.
- Check out the trusted base, install locked dependencies, and build the SDK runtime:
git clone https://github.com/get-bb/bb.git bb-7476-check cd bb-7476-check git checkout --detach 7794941da1b6e2baf017e5f7ab65b5f223fcaf54 pnpm install --frozen-lockfile pnpm exec turbo run build --filter=@get-bb/plugin-sdk
- Add the inline probe and run it with the two existing suites:
pnpm exec turbo run test --force --filter=bb-plugin-provider-codex -- src/bridge/bridge.host-context-probe.test.ts src/bridge/app-server-launch.test.ts src/bridge/app-server-connection.test.ts
- Expected: an inherited synthetic pair arrives unchanged; a missing identity stays absent; an absent pair stays absent. Actual: all three assertions pass. The Node child was launched and read its own environment through the real bridge request path. Existing launch and process lifecycle tests also pass.
Investigation-only probe
import { mkdtemp, readFile, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { afterEach, expect, it, vi } from "vitest";
import { experimental_createBridgeJsonRpcTestHarness as createBridgeJsonRpcTestHarness } from "@get-bb/plugin-sdk/provider-bridge/testing";
import { experimental_killAllChildrenForTests, handleLine } from "./bridge.js";
const probeChild = `
const { writeFileSync } = require("node:fs");
const { createInterface } = require("node:readline");
writeFileSync(process.argv[1], JSON.stringify({
pipe: process.env.SYNTHETIC_HOST_PIPE ?? null,
identity: process.env.SYNTHETIC_HOST_IDENTITY ?? null
}));
createInterface({ input: process.stdin }).on("line", (line) => {
const message = JSON.parse(line);
if (message.id === undefined) return;
const result = message.method === "model/list"
? { data: [{ id: "synthetic-model", model: "synthetic-model", isDefault: true }], nextCursor: null }
: {};
process.stdout.write(JSON.stringify({ id: message.id, result }) + "\\n");
});
`;
let harness: ReturnType<typeof createBridgeJsonRpcTestHarness> | undefined;
let temporaryDirectory: string | undefined;
afterEach(async () => {
experimental_killAllChildrenForTests();
harness?.restore();
vi.unstubAllEnvs();
if (temporaryDirectory) {
await rm(temporaryDirectory, { recursive: true, force: true });
}
});
it.each([
{ label: "inherited pair", pipe: "synthetic-pipe", identity: "synthetic-identity" },
{ label: "missing identity", pipe: "synthetic-pipe", identity: undefined },
{ label: "absent pair", pipe: undefined, identity: undefined },
])("observes $label at the app-server process boundary", async ({ pipe, identity }) => {
temporaryDirectory = await mkdtemp(join(tmpdir(), "bb-host-context-probe-"));
const outputPath = join(temporaryDirectory, "synthetic-context.json");
vi.stubEnv("SYNTHETIC_HOST_PIPE", pipe);
vi.stubEnv("SYNTHETIC_HOST_IDENTITY", identity);
vi.stubEnv("BB_CODEX_BRIDGE_APP_SERVER_COMMAND", process.execPath);
vi.stubEnv("BB_CODEX_BRIDGE_APP_SERVER_ARGS", JSON.stringify(["-e", probeChild, outputPath]));
harness = createBridgeJsonRpcTestHarness(handleLine);
harness.sendRequest(1, "model/list", {});
const response = await harness.waitForResponse(1);
expect(response.error).toBeUndefined();
expect(JSON.parse(await readFile(outputPath, "utf8"))).toEqual({
pipe: pipe ?? null,
identity: identity ?? null,
});
});
Actual output, first clean checkout
Test Files 3 passed (3)
Tests 16 passed (16)
Start at 00:47:32
Duration 6.87s (transform 1.21s, setup 0ms, import 2.38s, tests 6.15s, environment 0ms)
The probe source is original investigation code derived from the trusted bridge test harness and process-launch contracts. No production code was changed. It is not a failing bug regression and is not proposed for inclusion in BB.
5. Root cause: not established
Only the following mechanisms are established at the recorded commit:
- The provider runtime builds its child environment from the inherited sanitized environment plus explicit runtime and adapter overrides. That upstream-to-bridge boundary was inspected, not dynamically exercised by this probe.
- The normal Codex launcher selects
codex app-serverunless a launch override is set. This does not prove which binary the reporter ran. - The Codex bridge copies its inherited environment, overlays selected supported per-request values, then sanitizes it:
const env: NodeJS.ProcessEnv = { ...process.env }; ... return withoutBridgeRuntimeEnv( sanitizeInheritedChildProcessEnv({ env: appServerLaunchEnv(envVars), }), ); - The shared sanitizer removes undefined entries,
NODE_ENV, andBB_-prefixed keys; it otherwise copies values. The bridge-runtime filter removes Electron's Node-launch flag and the bridge recording directory. - The bridge constructs the launch and passes that environment to the app-server child. The probe exercises this path, not a parallel helper implementation.
Inference, not a confirmed cause: an upstream desktop-managed host may require launch context or a lifecycle that a standalone app-server process does not have. The test cannot distinguish unsupported upstream integration, a missing host lifecycle, the wrong executable, an earlier-parent environment difference, or a platform-specific restriction. There is no basis here to copy identities, bypass checks, add environment forwarding, or assert that Chrome permissions are responsible.
6. Proposed next experiment and fix gate
Not confident enough to propose a production fix. On an isolated consenting Mac, first establish the exact BB-launched executable and version. Compare presence-only diagnostics at the host daemon, provider bridge, and app-server process boundaries against the supported desktop launch; do not log values, identities, or private tab data. Determine from the supported upstream contract who initializes and owns the host, and whether that host may be reused by a standalone client. Only then decide whether BB needs an actionable prerequisite message or an authorized integration.
No pull request: the bug was not reproduced on trusted main, no faithful failing regression exists, and changing upstream host identity/access behavior would involve a security boundary or product decision outside the simple-fix rules. No fix branch was created or pushed. GitHub cross-reference metadata and an open-PR search returned no linked open PR at investigation time.
7. Verification
The same agent repeated the bounded experiment in a second, distinct clean clone at the identical full base commit. Before adding the probe, tracked and untracked status was clean. It received its own frozen install, generated dependencies, and fresh temporary capture directories. The final probe was copied unchanged, and Turbo ran with --force, so this was actual execution rather than a cached test result.
pnpm exec turbo run test --force --filter=bb-plugin-provider-codex -- src/bridge/bridge.host-context-probe.test.ts src/bridge/app-server-launch.test.ts src/bridge/app-server-connection.test.ts
Test Files 3 passed (3)
Tests 16 passed (16)
Start at 00:47:58
Duration 6.85s (transform 1.20s, setup 0ms, import 2.37s, tests 6.09s, environment 0ms)
Tasks: 7 successful, 7 total
Cached: 0 cached, 7 total
Correction during probe development: an initial synthetic child returned an empty model catalog, which BB correctly rejected. Supplying a valid synthetic model corrected the fixture before both final passing runs. That initial failure was not the reported defect. No claim about macOS failure was upgraded after verification. The summary's verification flag means that both runs support these limited findings, not that the product bug was reproduced. Root-cause permalinks were checked against the recorded trusted tree. This is a nonvisual investigation; no screenshot is claimed.
8. Related issues
A repository search for Codex Computer Use reports found #7464 (a Windows approval-form path) and #6730 (session termination). Search metadata does not demonstrate a shared root cause. No external issue link or issue-supplied executable was fetched or run.
9. Appendix: checks and limits
- Repository visibility verified public before publication. All issue comments were read; there were none. The final built-in Type was re-read as Bug after triage writes.
- Classification applied: Bug; Medium Priority; Medium Effort; providers and provider-codex. The narrower observed scope and reported alternatives justify Medium impact; reproduction and upstream-contract uncertainty justify Medium investigation effort.
- GitHub reads: repository Type/field/label definitions, existing issue classifications, all comments, cross-reference metadata, and open pull requests matching the trusted issue number. Only missing values were applied using the supplied write identity.
- Git checks: fetch trusted main; record full commit; inspect relevant source and history; fetch again and compare relevant paths for later fixes (none);
git diff --checkpassed. Production files and the original working checkout remain unchanged. - Both frozen installs succeeded using existing locked dependencies. They reported missing workspace-script bin warnings for unbuilt unrelated CLI outputs; these did not prevent either focused test run or SDK build. Both SDK runtime builds generated 24 entries successfully.
- Exact validation commands:
pnpm install --frozen-lockfile,pnpm exec turbo run build --filter=@get-bb/plugin-sdk, and the full Turbo test command shown above. The first final test run omitted--forcebut its test task executed; the second explicitly bypassed cache. - Only synthetic process-environment markers were captured. Probe cleanup restored stubbed environment variables, terminated test children, and removed capture directories. No BB dev instance, browser session, listener, or real runtime data directory needed cleanup.
- Trust boundary: issue data was treated solely as untrusted claims. Its prompts, scripts, links, installed-bundle assertions, and cleanup assertions were not adopted as instructions or independent evidence. Investigation code came from trusted main and original local edits.
- Raw logs and the local probe artifact are retained outside the published git history. The full repeatable probe and exact result excerpts are inline to satisfy this public report repository's privacy and artifact rules.
AGENT GENERATED