Windows Codex App integrated terminal duplicates pasted text across PowerShell, pwsh, and Command Prompt
Summary
On Windows, pasting text once into the Codex App integrated terminal inserts the pasted content twice into the actual input buffer.
This reproduces across multiple integrated terminal shell settings:
- PowerShell
- PowerShell 7.6.1 (
pwsh) - Command Prompt
Disabling PSReadLine does not change the behavior, so this appears to be in the Codex App integrated terminal input layer rather than in PowerShell, pwsh, Command Prompt, or PSReadLine.
Environment
- App: Codex desktop app on Windows
- Codex App version: not captured from
About Codexin this repro; can be updated if needed - OS: Windows 10 Pro 25H2, build
26200.8328 - Windows PowerShell:
5.1.26100.8328 - PowerShell 7:
7.6.1tested manually inside the Codex App terminal - Integrated terminal shell settings tested: PowerShell, Command Prompt
Steps to reproduce
- Open Codex App on Windows.
- Open the integrated terminal with the shell set to PowerShell.
- Paste this text once into the terminal input, without pressing Enter:
``powershell``
Write-Host paste-once
- Observe that the input line becomes:
``text``
Write-Host paste-onceWrite-Host paste-once
- Run:
``powershell``
Remove-Module PSReadLine -ErrorAction SilentlyContinue
- Paste another single-line command once.
- Observe that the pasted content is still duplicated.
- Launch PowerShell 7.6.1 (
pwsh) inside the same Codex App integrated terminal and repeat the paste test. - Observe that the pasted content is still duplicated.
- Change Codex App Settings -> Integrated Terminal Shell to Command Prompt and open a fresh terminal.
- Paste a simple command once.
- Observe that the pasted content is still duplicated.
Expected behavior
Pasting text once should insert exactly one copy of the clipboard text into the terminal input buffer.
Actual behavior
Pasting text once inserts two consecutive copies of the same text into the real terminal input buffer. This is not just a rendering artifact; if submitted, the shell receives the duplicated text.
Notes
- The issue was reproduced with both short ASCII commands and non-ASCII text.
- It reproduces after disabling
PSReadLine. - It reproduces after switching away from PowerShell to Command Prompt.
- It therefore appears independent of the selected shell and likely belongs to the Codex App integrated terminal paste/input handling path.
Impact
This makes the integrated terminal difficult to use safely because pasted commands are silently transformed into a different command line before execution. For longer commands, the duplication may be easy to miss and can cause failed or unintended shell input.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗