codex - 💡(How to fix) Fix Windows Codex App integrated terminal duplicates pasted text across PowerShell, pwsh, and Command Prompt

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Code Example

Write-Host paste-once

---

Write-Host paste-onceWrite-Host paste-once

---

Remove-Module PSReadLine -ErrorAction SilentlyContinue
RAW_BUFFERClick to expand / collapse

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 Codex in 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.1 tested manually inside the Codex App terminal
  • Integrated terminal shell settings tested: PowerShell, Command Prompt

Steps to reproduce

  1. Open Codex App on Windows.

  2. Open the integrated terminal with the shell set to PowerShell.

  3. Paste this text once into the terminal input, without pressing Enter:

    Write-Host paste-once
  4. Observe that the input line becomes:

    Write-Host paste-onceWrite-Host paste-once
  5. Run:

    Remove-Module PSReadLine -ErrorAction SilentlyContinue
  6. Paste another single-line command once.

  7. Observe that the pasted content is still duplicated.

  8. Launch PowerShell 7.6.1 (pwsh) inside the same Codex App integrated terminal and repeat the paste test.

  9. Observe that the pasted content is still duplicated.

  10. Change Codex App Settings -> Integrated Terminal Shell to Command Prompt and open a fresh terminal.

  11. Paste a simple command once.

  12. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Pasting text once should insert exactly one copy of the clipboard text into the terminal input buffer.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows Codex App integrated terminal duplicates pasted text across PowerShell, pwsh, and Command Prompt