Skip to content

Shift+Enter does not work in Codex inside tmux #16121

@antonme

Description

@antonme

What version of Codex CLI is running?

codex-cli 0.117.0

What subscription do you have?

Business/Team

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin 25.3.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

Shift+Enter does not insert a newline in Codex when Codex is running inside tmux.

The same Shift+Enter shortcut works:

  • in Codex outside tmux over the same SSH connection
  • in other apps inside the same tmux session, including fish and Claude

So this appears to be specific to Codex running under tmux, not a general terminal or tmux key handling problem.

What steps can reproduce the bug?

  1. SSH into a remote machine.
  2. Start a tmux session.
  3. Launch Codex inside tmux.
  4. Focus the prompt input and press Shift+Enter.

I also verified tmux extended keys are enabled:

set -s extended-keys on
set -s extended-keys-format csi-u
set -as terminal-features ",xterm-256color:extkeys"

After reloading and reattaching, tmux reports:

  • version: 3.6a
  • client term: xterm-256color
  • client features: bpaste,ccolour,clipboard,cstyle,extkeys,focus,RGB,title
  • default terminal: tmux-256color

What is the expected behavior?

Shift+Enter should insert a newline in Codex inside tmux, the same way it does when Codex is run outside tmux.

Additional information

This is reproducible specifically in the ssh -> tmux -> Codex path.

In my setup:

  • ssh -> Codex: Shift+Enter works
  • ssh -> tmux -> Codex: Shift+Enter does not work
  • inside the same tmux session, Shift+Enter still works in fish and Claude

That suggests Codex is not recognizing the key sequence it receives under tmux, even when tmux extended key support is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions