The CLI browser bridge converts binary frames and WebSocket payloads into JSON number arrays across Playwright bindings. A 64 MiB binary payload can therefore occupy much more memory across the browser, JSON serialization and Bun copies. The WebSocket event queue also lacks a byte budget.
Raised in #829 (comment). Permission enforcement fixes stay in #829; transport resource budgeting needs a consistent policy across these paths.
- Define byte limits for product protocol frames, WebSocket messages and queued events, accounting for simultaneous connections.
- Reduce binary serialization amplification and reject oversized payloads before avoidable copies where possible.
- Apply backpressure or close a stalled connection when its budget is exhausted.
- Add focused boundary and slow-consumer checks, and document supported limits.
Codex-assisted.
The CLI browser bridge converts binary frames and WebSocket payloads into JSON number arrays across Playwright bindings. A 64 MiB binary payload can therefore occupy much more memory across the browser, JSON serialization and Bun copies. The WebSocket event queue also lacks a byte budget.
Raised in #829 (comment). Permission enforcement fixes stay in #829; transport resource budgeting needs a consistent policy across these paths.
Codex-assisted.