Skip to content

[macOS][CLI 0.157.0] Cmd+C no longer copies selected transcript text in iTerm2 #47996

Closed as not planned

Description

@lvzixun

What version of Codex CLI is running?

codex-cli 0.157.0

What platform is your computer?

Darwin 25.5.0 arm64 arm (macOS)

What terminal emulator and version are you using?

iTerm2 3.7.1

What issue are you seeing?

After upgrading Codex CLI to 0.157.0, selecting part of the CLI transcript with the mouse and pressing Command+C in iTerm2 no longer copies the selection as it did in earlier versions. The user reports that Control+C now copies the selected text instead. This is a surprising regression for the standard macOS copy shortcut and makes it easy to trigger the usual terminal interrupt behavior when trying to copy.

What steps can reproduce the bug?

  1. Run Codex CLI 0.157.0 in iTerm2 on macOS with its default TUI settings.
  2. Produce a response and select part of the output with the mouse.
  3. Press Command+C and try to paste the selection elsewhere.
  4. Compare with pressing Control+C on the same selection.

The user reports that Command+C worked before upgrading to 0.157.0 and that Control+C works in the new interface. I have not independently reproduced the keyboard behavior on this machine.

What is the expected behavior?

Command+C should copy selected transcript text in iTerm2 on macOS, or the CLI should provide a clear way to preserve the terminal's native selection and copy behavior. Control+C should not be required for ordinary copying on macOS.

Additional information

Version 0.157.0 defaults tui.fullscreen_transcript to true and the recent fullscreen transcript implementation handles selection and copying internally. These changes may be relevant, but the exact cause has not been confirmed: https://github.com/openai/codex/blob/rust-v0.157.0/codex-rs/config/src/types.rs and #46732 .

The older scrollback behavior may be available through codex --no-alt-screen or tui.fullscreen_transcript = false; these have not yet been verified as workarounds for this report.

Activity

  1. added
    bug
    CLI
    TUI
    on Sep 25, 2026
  2. AsTonyshment commented on Sep 25, 2026

    @AsTonyshment

    I’m experiencing the same issue after upgrading to Codex CLI v0.157.0. I’m using a terminal on macOS to connect via SSH to a remote Linux server where Codex CLI runs.

    Command+C no longer copies selected transcript text, while Control+C does. Pasting still works with Command+V, making the shortcuts inconsistent. Using Control+C for copying is also concerning because it normally interrupts the running process.

    Before the update, copying with Command+C worked as expected.

  3. xing-stellus-yue commented on Sep 25, 2026

    @xing-stellus-yue

    Additional impact from this regression: the session name/title shown in the fullscreen transcript header cannot be selected or copied either.

    I routinely copy the Codex session name to rename the corresponding VS Code terminal. This is important when several Codex sessions are running at the same time, because the copied name provides a reliable mapping between each session and its terminal.

    Expected behavior: the session name/header should be selectable and copyable with the standard macOS Cmd+C, or the TUI should provide a dedicated “Copy session name” action.

  4. antonsacred commented on Sep 25, 2026

    @antonsacred

    Having the same issue on 0.157.0

  5. antonsacred commented on Sep 25, 2026

    @antonsacred

    Looks connected #47178 #46732

  6. devzons commented on Sep 25, 2026

    @devzons

    Confirmed another reproduction of this regression.

    • Platform: macOS
    • Install: global npm package @openai/codex
    • Affected version: 0.157.0
    • Symptom: normal copy command / Cmd+C did not copy selected Codex transcript text
    • Workaround/result: downgrading to 0.156.1 restored copy behavior immediately

    This strongly suggests a regression introduced in 0.157.0, rather than a general macOS clipboard problem.

  7. devzons commented on Sep 25, 2026

    @devzons

    Additional confirmation from another macOS/iTerm user:

    • Codex CLI: 0.157.0
    • Install method: npm global (@openai/[email protected])
    • Terminal: iTerm
    • Symptom: copy behavior stopped working after updating to 0.157.0
    • Regression check: downgrading to @openai/[email protected] immediately restored copy behavior
    • No project/code changes were needed

    This strongly suggests a 0.157.0 regression rather than an iTerm/macOS clipboard configuration issue.

  8. fcoury commented on Sep 25, 2026

    @fcoury
    Contributor

    Thank you.

    Totally understand that missing cmd-c is hard. Starting on the next release when you select text it will be automatically copied so this annoyance should go away.

    However, you have the option to you can opt-out on 0.157.0 using /tui and selecting Scrollback.

  9. fcoury commented on Sep 25, 2026

    @fcoury
    Contributor

    Additional impact from this regression: the session name/title shown in the fullscreen transcript header cannot be selected or copied either.

    Thank you for reporting!

    I routinely copy the Codex session name to rename the corresponding VS Code terminal. This is important when several Codex sessions are running at the same time, because the copied name provides a reliable mapping between each session and its terminal.

    This is indeed a regression that we should fix. We'll address it. For the time being try using shift+select (or opt+select / fn+select in some terminals) for copying them.

  10. Thomas2792 commented on Sep 25, 2026

    @Thomas2792

    Similar issue on Windows 11 using Codex CLI in WSL Ubuntu: Ctrl + Insert does not copy the selected text anymore. Ctrl + C copies the selected text but using Ctrl + C a second time will close the Codex CLI because no text is selected any more.

  11. abaidalgarni commented on Sep 27, 2026

    @abaidalgarni

    Automatic copying on selection still fails for me on codex-cli 0.157.1, which is the latest stable release at the time of this report (2026-09-27).

    Environment:

    • macOS 27.0, Apple Silicon (Darwin 27.0.0 arm64 arm)
    • iTerm2 3.7.3
    • Codex standalone installation
    • Default fullscreen transcript, with no tui.fullscreen_transcript override when the problem occurred
    • iTerm2 mouse reporting and click/drag reporting enabled
    • Native copy-on-selection works in the same terminal

    Steps and results:

    1. Start or resume Codex and select a few words from a response by dragging normally.
    2. Release the mouse and paste with Command+V, without pressing a copy shortcut. The selected text was not copied.
    3. Repeat while holding Option during the drag. This does copy automatically, and Command+V pastes the selected text.

    The ordinary-selection problem occurred in both the original session and a newly started session. Copy-on-selection works in other CLI agents in the same terminal. The Option-drag workaround was tested successfully here.

    I also tried /raw, which did not resolve the problem. I have since saved tui.fullscreen_transcript = false, but have not yet tested ordinary drag-to-copy in a fresh launch with that setting, so I cannot confirm it as a working fix. No older Codex version was tested.

    Expected behavior: selecting transcript text should copy it automatically when using this workflow, or Codex should offer an equivalent copy-on-selection setting. This may be relevant to the automatic-copy change mentioned above; the Option-drag result suggests a difference between Codex-managed and native terminal selection, but I have not verified the implementation-level cause.

  12. erikpragt-connectid commented on Sep 28, 2026

    @erikpragt-connectid

    Same on Codex CLI 0.157.1, copy and paste doesn't work anymore. Also, please don't implement the idea that selecting text should immediately overwrite my copy buffer, that would be very annoying and counter intuitive.

  13. erikpragt-connectid commented on Sep 28, 2026

    @erikpragt-connectid

    Update: I just learned that ctrl+c copies text, which could be a workaround.

  14. gx-song commented on Sep 28, 2026

    @gx-song

    This breaks a basic terminal convention and creates an unsafe overlap between copy and interrupt.

  15. charleskan commented on Sep 29, 2026

    @charleskan

    Same on Codex CLI 0.157.1, copy and paste doesn't work anymore. Also, please don't implement the idea that selecting text should immediately overwrite my copy buffer, that would be very annoying and counter intuitive.Codex CLI 0.157.1 也有同樣的問題,複製貼上功能失效了。另外,請不要採用「選取文字就立即覆蓋剪貼簿」的做法,那樣會非常令人困擾且不符合直覺。

    +1. Please don’t make text selection overwrite the system clipboard. Selection and copying are two separate actions, and silently replacing whatever the user already has in their clipboard would be extremely surprising and disruptive.

  16. dahu33 commented on Sep 29, 2026

    @dahu33

    This is nuts and driving me insane. Why can't you fix this basic thing?

  17. Enigmauk commented on Sep 29, 2026

    @Enigmauk

    Additional Windows/WSL/RDP reproduction on Codex CLI 0.159.0.

    Environment:

    • Windows 11
    • Windows Terminal
    • Ubuntu 24.04 under WSL2
    • Codex CLI 0.159.0
    • Windows session accessed via Remote Desktop (RDP)

    With the default fullscreen transcript enabled, selecting text and copying it — either with the mouse or keyboard — is recognised by Codex. The TUI displays a message such as:

    Copied 5 characters to clipboard

    However, the Windows clipboard is not actually updated. Pasting into another application returns the previous clipboard contents instead.

    Clipboard redirection itself appears healthy: normal copy/paste works in other Windows applications and in terminal windows outside Codex.

    Setting:

    [tui]
    fullscreen_transcript = false

    immediately restores normal terminal selection/copy behaviour in the same environment.

    So in this case 0.159.0 appears to recognise the copy action successfully, but the copied transcript text does not reach the Windows/RDP host clipboard.

  18. apoorvdarshan commented on Sep 29, 2026

    @apoorvdarshan

    I'm seeing the same Cmd+C symptom in Codex CLI inside cmux on macOS.

    • Codex CLI: 0.158.0
    • cmux: 0.64.25
    • macOS: 27.0.1 (Apple Silicon)

    With fullscreen transcript mode enabled, selecting transcript text and pressing Cmd+C did not copy it. Right-click Copy worked.

    Setting the following in ~/.codex/config.toml and restarting Codex restored normal drag-selection and Cmd+C / Cmd+V for me:

    [tui]
    fullscreen_transcript = false

    I like the fullscreen UI and would prefer to keep it enabled with normal macOS copy shortcuts. There is also a potentially related cmux report about Edit-menu shortcuts intercepting Cmd+C/Cmd+V before they reach a TUI: manaflow-ai/cmux#11228

  19. antonsacred commented on Sep 30, 2026

    @antonsacred

    Being on codex-cli 0.159.2 version on macos - copy works.
    But another issue appeared. Now when you copy something - it copies with markdown formatting, before transcript view it was never the case.

    @fcoury do you know if that approach a bug or feature?

    Case:

    • Codex produced output with markdown (example on screen)
    Image
    • Select and copy a "/tmp" (using cmd + C)
    Image
    • Result clipboard is now "`/tmp`" (keeping markdown ``)
    • Before the terminal view it was never the case
  20. apoorvdarshan commented on Sep 30, 2026

    @apoorvdarshan

    are you selecting and it automatically copies or select and copy aka cmd+c

  21. etraut-openai commented on Oct 2, 2026

    @etraut-openai
    Contributor

    This is a limitation of some terminal programs. They do not pass Cmd+C to Codex when running in fullscreen mode. Your options are:

    1. Switch to scrollback mode using /tui. You will forego the functionality provided by fullscreen mode if you do this.
    2. Switch to a different terminal emulator like Kitty or Ghostty that do not have this limitation.
    3. Use copy-on-select or copy-on-right-click to copy rather than Cmd+C.
    4. Use Ctrl+C or some other keybinding of your choosing — one that your terminal program passes to Codex for processing.

    Please refer to this post for additional context.

  22. GeorgeNikitinNV commented on Oct 7, 2026

    @GeorgeNikitinNV

    This is so annoying! Basic key bindings should NEVER change due to version upgrade!!!

  23. fja0217 commented on Oct 22, 2026

    @fja0217

    Fix it like this:

    1.type /tui
    2.Switch the mode to Scrollback

    This puts Codex into the native terminal
    In this mode, you can no longer clear the input box by selecting all and deleting.
    Use Ctrl+C instead to clear the current input.

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

    CLITUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions