Skip to content

[Windows] clipboard paste drops characters, Shift+Enter and Ctrl+Enter insert [13;2u instead of a newline #4401

Closed

Description

@tomasmarekk

What version of Codex is running?

codex-cli 0.42.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Codex is still unusable in the native Windows environment. I reported these bugs here a month ago, and despite a number of great updates, this has not been fixed.

  1. Pasting characters from the clipboard does not work. This is not just backslash, many characters are skipped during paste bursts.
  2. This is a new bug from one of the recent versions, line breaks do not work. Shift+Enter and Ctrl+Enter do not insert a newline, they type the characters [13;2u.

I will not explain how to fix this on Windows, because I already submitted a PR for it and it was ignored despite many thumbs up and interest from two OpenAI developers.

Please fix this, I am tired of tweaking it myself with each new release and rebuilding. Sending love.

Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Activity

  1. added
    bug
    on Sep 28, 2025
  2. huseyingulgen commented on Sep 30, 2025

    @huseyingulgen

    this is very problematic problem and nobody fix it for long time. codex is useless for me. I can not use because of this problem on windows.

  3. alexx-ftw commented on Oct 8, 2025

    @alexx-ftw

    Submitted PR #4975 to keep paste bursts intact on Windows. Enter/Shift+Enter/Ctrl+Enter are treated as newlines during large pastes, and the change adds regression tests to cover that scenario.

  4. etraut-openai commented on Nov 10, 2025

    @etraut-openai
    Contributor

    Thanks for the bug report. Is this still happening for you with the latest version (0.57.0)?

    I tried to repro, and I'm not seeing the behavior described here. Here's what I tried.

    • Open a PowerShell terminal and start codex.
    • Copy a large block of text (I've tried a few lines, a 100-line block, and a multi-K block).
    • Paste into the prompt.

    I've also tried typing Ctrl+Enter and Ctrl+Return both during the paste burst handling and afterward.

    I'm not seeing the [13; 2u] text show up under any of these situations.

    If you're still able to repro, please provide any additional repro steps that I may have missed.

  5. alexx-ftw commented on Nov 11, 2025

    @alexx-ftw

    Thanks for the bug report. Is this still happening for you with the latest version (0.57.0)?

    I tried to repro, and I'm not seeing the behavior described here. Here's what I tried.

    * Open a PowerShell terminal and start codex.
    
    * Copy a large block of text (I've tried a few lines, a 100-line block, and a multi-K block).
    
    * Paste into the prompt.
    

    I've also tried typing Ctrl+Enter and Ctrl+Return both during the paste burst handling and afterward.

    I'm not seeing the [13; 2u] text show up under any of these situations.

    If you're still able to repro, please provide any additional repro steps that I may have missed.

    It happened because Factory CLI edited the Terminal shortcuts, adding [13; 2u] to the Newline shortcut. I fixed by removing said edition in the Terminal shortcuts.

  6. huseyingulgen commented on Nov 11, 2025

    @huseyingulgen

    Copy paste is still not working for me.

    Image
  7. etraut-openai commented on Nov 11, 2025

    @etraut-openai
    Contributor

    @marektomas-cz, do you have Factory CLI installed? Does that explain the problem you're seeing with [13; 2u]?

    @huseyingulgen, I'm not able to repro the "dropped i" behavior that you're showing in that screen shot. Can you provide any repro steps? What shell are you using? Are you able to repro this on other Windows machines? Are there any other configuration settings that we need to know about to repro the problem?

  8. huseyingulgen commented on Nov 11, 2025

    @huseyingulgen

    @etraut-openai Hi, this issue has existed for a long time with different language keyboards. I installed the npm version of Codex in Windows. When I copy and paste any text into Codex, some letters are missing. Because of this, Codex cannot detect the scripts correctly. I stopped using the CLI version a long time ago. I am using Power shell in Windows 11. It default setting in codex. Just installed and used it like that.

  9. tomasmarekk commented on Nov 11, 2025

    @tomasmarekk
    Author

    Thanks for the bug report. Is this still happening for you with the latest version (0.57.0)?

    I tried to repro, and I'm not seeing the behavior described here. Here's what I tried.

    * Open a PowerShell terminal and start codex.
    
    * Copy a large block of text (I've tried a few lines, a 100-line block, and a multi-K block).
    
    * Paste into the prompt.
    

    I've also tried typing Ctrl+Enter and Ctrl+Return both during the paste burst handling and afterward.

    I'm not seeing the [13; 2u] text show up under any of these situations.

    If you're still able to repro, please provide any additional repro steps that I may have missed.

    Yeah, it still isn’t fixed. Backslashes can’t be copied, so I can’t copy paths, or copy and paste from a screenshot.

    I fixed it in Rust, built Codex myself, and it worked for me, the tests passed. I even opened a PR, but it was ignored.

    So I don’t understand where the problem is. This should be an easy fix. It ruins the experience for most Windows users.

    Image

    @etraut-openai And yeah, I have Factory CLI (Droid) installed, but I’m sure I had the same problem before, when I was on a different version of Windows and didn’t have Droid installed. I’ve been using Codex for a long time and I’ve had this problem from the start.

    Copy and paste works fine for me in Claude Code, Gemini CLI, Droid, OpenCode, so I’m sure the issue isn’t on my end.

  10. etraut-openai commented on Nov 11, 2025

    @etraut-openai
    Contributor

    @marektomas-cz, thanks for the details. I'm trying to repro the problem, but I'm not seeing the behavior. I'm guessing it's related to the language or keyboard selection. All of the keyboards I have access to at the moment are English. Are you using a Czech keyboard?

    Is this the PR you're referring to? It looks like you closed it — probably out of frustration because it was ignored for so long. Apologies for that. We received a large number of PRs and fell far behind. We're just now catching up.

  11. tomasmarekk commented on Nov 11, 2025

    @tomasmarekk
    Author

    @etraut-openai oh, you’re right, it’s likely caused by the keyboard layout. I only had Czech installed. I’ve just added the English layout and backslashes now work for me, paradoxically even when I keep the Czech layout selected.

    However, pasting images still doesn’t work. When I take a screenshot and paste it into Codex, nothing happens. As I said, I don’t have this problem in other CLI tools even without English installed, so maybe there’s something that can be tweaked.

    And yes, that’s my PR. With that change everything worked as it should.

  12. added
    windows-os
    TUI
    on Nov 16, 2025
  13. etraut-openai commented on Nov 17, 2025

    @etraut-openai
    Contributor

    @marektomas-cz, I looked at your old PR and used it as inspiration for an updated PR, which I just merged. It will be included in the next release. Sorry this has taken so long to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions