Files
codex/codex-rs
Eric Traut 7a8a9456e9 Reuse and prewarm the WSL clipboard text reader (#52967)
## 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
2026-10-10 19:22:11 +00:00
..
…
…