#7886 · Unicode separator transport checks
Verdict: NOT REPRODUCED. Root-cause confidence: low — the reported timeout's cause is not established. Confidence that the tested source preserves both Unicode separators on this runtime is high.
1. TL;DR
The issue describes a side-chat fork timing out and attributes it to Unicode separators splitting a valid provider response. On unchanged trusted main, the actual connection successfully receives both U+2028 and U+2029, including responses with 10,000,000 padding characters and a separator's UTF-8 bytes split across writes. A direct Node readline probe also returns exactly one record per response, not three fragments. The same agent repeated the checks in a second clean checkout with caching bypassed; all ten investigation cases and seven existing connection tests passed. This does not disprove the reported installed-macOS timeout: that environment and its original provider traffic were unavailable.
2. Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| Unicode separators inside JSON strings necessarily split readline input. | Not observed on tested runtime. | Both direct framing cases produce one valid JSON record; all eight connection cases resolve with exact original text. |
| The source uses readline and ignores invalid JSON lines. | Verified by source inspection. | Connection lines 97–107 and 257–265. |
| Splitting a separator across UTF-8 chunks causes this timeout. | Not observed. | Four connection cases split the first separator after its first UTF-8 byte, delaying the remaining bytes by 25 ms. |
| A large returned history causes the installed fork failure. | Original occurrence unverified. | Only synthetic transport responses were used; large text passed locally, but no installed app or real Codex history was exercised. |
| A fork parameter change preserves inherited history. | Not tested. | No construction parameter was changed; there is no demonstrated framing failure to mitigate here. |
3. Environment
- Public target: get-bb/bb, trusted origin/main commit
351cb84dc6391d3c6d16295e66578fe97232a25e. - Linux x86_64; Node v22.19.0; pnpm 9.15.0; Vitest 4.1.12.
- Two newly created detached checkouts at the same base; only the authored investigation test was added. Production connection files remained byte-identical to the base.
- No real Codex CLI, model, credentials, production application, network listener, persistent data directory, or private conversation was used.
- The reported installed macOS/Node-v24 environment was not available. Results are scoped to the runtime above.
4. Minimal reproduction
- Clone the public repository into a fresh directory and select the recorded base:
git clone https://github.com/get-bb/bb.git bb-separator-check cd bb-separator-check git checkout --detach 351cb84dc6391d3c6d16295e66578fe97232a25e pnpm install --frozen-lockfile --prefer-offline
- Save the complete authored test below as
plugins/provider-codex/src/bridge/framing-investigation.test.ts. It uses existing repository dependencies only. - Run the actual connection with a synthetic child process:
pnpm exec turbo run test --filter=bb-plugin-provider-codex --force -- src/bridge/framing-investigation.test.ts src/bridge/app-server-connection.test.ts
Expected if the reported mechanism occurs: the direct framing checks find multiple records, and the corresponding connection request rejects after its 2,000 ms test deadline. Actual: one record per direct probe; exact text returned for all connection requests before their deadlines.
First checkout: ✓ src/bridge/framing-investigation.test.ts (10 tests) 969ms Test Files 1 passed (1) Tests 10 passed (10) Second checkout, --force: ✓ src/bridge/framing-investigation.test.ts (10 tests) 917ms ✓ src/bridge/app-server-connection.test.ts (7 tests) 5775ms Test Files 2 passed (2) Tests 17 passed (17)
Matrix: two code points × contiguous or fragmented output × zero or 10,000,000 padding characters. These are investigation tests, not a failing-before/passing-after regression; no production fix was made.
Complete authored test
import { createInterface } from "node:readline";
import { Readable } from "node:stream";
import { describe, expect, it } from "vitest";
import { z } from "zod";
import { createCodexAppServerConnection } from "./app-server-connection.js";
const cases = [0x2028, 0x2029].flatMap((codePoint) =>
[false, true].flatMap((fragmented) =>
[0, 10_000_000].map((padding) => ({ codePoint, fragmented, padding })),
),
);
describe("provider stdout separator investigation", () => {
it.each([0x2028, 0x2029])(
"keeps U+%i inside a single JSON record",
async (codePoint) => {
const text = `before${String.fromCodePoint(codePoint)}middle${String.fromCodePoint(codePoint)}after`;
const response = { id: 7, result: { text } };
const lines: string[] = [];
for await (const line of createInterface({
input: Readable.from([Buffer.from(`${JSON.stringify(response)}\n`)]),
terminal: false,
})) {
lines.push(line);
}
expect(lines).toHaveLength(1);
expect(JSON.parse(lines[0]!)).toEqual(response);
},
);
it.each(cases)(
"resolves a response with $codePoint, fragmented=$fragmented, padding=$padding",
async ({ codePoint, fragmented, padding }) => {
const text = `before${String.fromCodePoint(codePoint)}middle${String.fromCodePoint(codePoint)}after${"x".repeat(padding)}`;
const childScript = [
`const text = "before" + String.fromCodePoint(${codePoint}) + "middle" + String.fromCodePoint(${codePoint}) + "after" + "x".repeat(${padding});`,
'process.stdin.once("data", (chunk) => {',
"const request = JSON.parse(chunk.toString());",
'const wire = Buffer.from(JSON.stringify({jsonrpc:"2.0", id:request.id, result:{text}}) + "\\n");',
`if (${fragmented}) {`,
`const boundary = wire.indexOf(Buffer.from(String.fromCodePoint(${codePoint}))) + 1;`,
"process.stdout.write(wire.subarray(0, boundary));",
"setTimeout(() => process.stdout.write(wire.subarray(boundary)), 25);",
"} else { process.stdout.write(wire); }",
"});",
].join("");
const connection = createCodexAppServerConnection({
command: process.execPath,
args: ["-e", childScript],
cwd: process.cwd(),
env: process.env,
recordThreadId: null,
onNotification: () => undefined,
onRequest: () => undefined,
onExit: () => undefined,
});
try {
const response = await connection.request({
method: "fixture/response",
params: {},
resultSchema: z.object({ text: z.string() }),
timeoutMs: 2_000,
});
expect(response.text).toBe(text);
} finally {
await connection.kill();
}
},
);
});
5. Root cause assessment
No cause of the reported installed fork timeout has been established. The hypothesized separator-framing mechanism does not occur in the tested source/runtime. The loaded Node implementation uses this line-ending expression, which does not match either Unicode separator:
const lineEnding = /\r?\n|\r(?!\n)/g;
The real connection reads stdout through readline at lines 257–265. It does ignore JSON parse failures, but that fact alone does not demonstrate malformed framing. An unfulfilled request eventually produces the generic request deadline error; that error is not diagnostic of a Unicode cause.
A replay-helper comment also asserts Unicode splitting. It is not runtime evidence and was not treated as proof. The tests above exercise the production connection directly.
6. Proposed next test
No speculative fix or pull request is safe: the required regression does not fail on unchanged main. Repeat this exact harness using the installed application's actual JavaScript runtime and the reported Node-v24 runtime. If only that environment fails, record the runtime version, emitted stdout record count, framing bytes around a separator, and whether the matching request ID reaches the connection. Use fresh synthetic payloads rather than private conversation content. A runtime-specific reproducer or a sanitized raw transport boundary capture is needed before changing framing or fork construction.
7. Verification
The same agent created a second clean detached checkout at the recorded commit, performed a fresh frozen install, and successfully built the SDK using pnpm exec turbo run build --filter=@get-bb/plugin-sdk. The exact authored harness was then copied into it. The test command in section 4 used --force to bypass Turbo result caching. All ten investigation tests and seven existing connection tests passed. No production source change was present in either checkout. This is a repeated check by the same agent, not independent verification.
Report correction: the initial hypothesis of inevitable separator splitting was not retained after execution contradicted it. The installed user-facing failure remains unverified, and confidence in its root cause remains low.
8. Related issues and pull requests
No open linked pull request was returned by the issue's closing references, its cross-reference timeline, or the open-PR search for the trusted numeric issue ID at investigation time. No pull request branch or issue-supplied code was checked out or run. Similar issue search was used only for classification context; no duplicate was established.
9. Appendix and limitations
Additional direct built-in framing probe output:
{"codePoint":"U+2028","records":1,"roundTrip":true}
{"codePoint":"U+2029","records":1,"roundTrip":true}
The first checkout's frozen install passed. The initial unfiltered pnpm exec turbo run build stopped in the existing GitHub plugin because SDK runtime output was not yet built:
bb-plugin-github:build: "@get-bb/plugin-sdk/process" is installed for this plugin but its dist is not built bb-plugin-github:build: "@get-bb/plugin-sdk/host" is installed for this plugin but its dist is not built
The focused Turbo test built the SDK dependency and passed; the second checkout's filtered SDK build also passed. No full application build or installed desktop validation is claimed, and the unrelated build configuration was not changed. Raw logs and the local reproduction test remain outside the public report repository; the complete reproduction source and relevant exact result lines are inline above.
Trust boundary: all issue content, links, code blocks, and suggestions were treated as untrusted claims. No issue-provided script, patch, branch, linked external page, or private data was executed or retrieved. The harness was authored from trusted repository connection code and its existing test patterns.