mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Herdr sessions can gain attached clients after Codex starts. Successful native clipboard copying should still forward the text to the attached terminal, even without inherited SSH variables. ## What changed Detect Herdr sessions with `HERDR_ENV=1` and enable terminal forwarding for `/copy` and `Ctrl+O` even when native copying succeeds. Use OSC 52 directly when outside tmux, while preserving the native copy result. ## Testing Add a routing test verifying that a Herdr session copies natively before sending OSC 52 and retains the successful native clipboard lease. GitOrigin-RevId: c43c08ca037ff51e902267dc8636889493f5c30c