mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
## Why WSL clipboard reads previously launched PowerShell for every paste. Process creation can hang under WSL and stall the shared clipboard worker. ## What changed - Reuse a persistent PowerShell reader on a dedicated thread, keeping clipboard requests bounded by their deadlines and restarting the reader after errors. - Prewarm the reader at startup when right-click paste is allowed on WSL, without accessing clipboard contents. - Use length-framed UTF-8 responses to preserve whitespace and distinguish consecutive pastes while enforcing message size limits. ## Testing Update the command-reader test to cover consecutive responses from one process, large clipboard text, UTF-8 and whitespace preservation, and read timeouts. GitOrigin-RevId: 36af338097d6b178ab4887faa5918240c47e1515