Issue 23817 runtime transcript Environment: fs-35, Linux x64, Node 26.12.1, real web dev server and node-pty. Current main: 16aaf5ba7d. Existing patch: 9d2e6122e5d187ff193abc7c3674f39bad23529b. Procedure: vp install; vp run dev; browser pairing; terminal.open and terminal.write over authenticated WebSocket RPC (orchestrationProtocol=2). Workload: Python emits ESC ] 52 ; c ; + base64 of 262144 x bytes + BEL, os.write in 4096-byte slices, 2ms between writes. Exact wire sequence 349536 bytes. Instrumentation: increment visits once per iteration of production findStringTerminatorIndex, searches once per invocation; print at completed strings. Temporary instrumentation only, not part of patch. Before: ISSUE23817_RUNTIME {"visits":24417215,"chunks":151,"wireLength":349536} After: ISSUE23817_RUNTIME {"visits":349696,"chunks":163,"wireLength":349653} After trailing control: ISSUE23817_RUNTIME {"visits":33,"chunks":1,"wireLength":349653} PTY chunk boundaries vary; wireLength is full parser input on final chunk and may include trailing shell controls. Visit counts are not elapsed-time or UI-latency claims. Read persisted .t3/userdata/logs/terminals histories as bytes: both contain exactly one copy of the full 349536-byte OSC52 sequence and completion marker ISSUE23817_DONE. Scoped suite on current main plus existing PR: vp test run apps/server/src/terminal/Manager.test.ts: 43/43 passed, 36.85 seconds. Deterministic performance regression: existing Manager.test.ts large chunked OSC52/C1DCS test counts charCodeAt reads on strings longer than a 4096-byte emitted chunk, restores prototype in Effect.ensuring, bound 2 * expected.length =262242. Baseline origin/main16aaf5ba7d: AssertionError expected1368175 to be less than262242. One failed test,42 skipped,5.62s. Patched source:123066 reads;43/43 tests passed5.95s after merging main. Final local head12cf2c95b98c53b6dccd77ae05b9a6d6f85f9427: unchanged production implementation from9d2e612, current main merged, deterministic assertion added.