Skip to content

Regression: Shift+Enter / Alt+Enter no longer insert newline in TUI prompt #20580

Closed as duplicate

Description

@timur-nocodia

What version of Codex CLI is running?

codex-cli 0.128.0

Which model were you using?

Not model-specific; this is a TUI input handling issue.

What platform is your computer?

macOS / Darwin 25.4.0 arm64

Terminal environment:

  • TERM_PROGRAM=vscode
  • TERM=xterm-256color

What steps can reproduce the bug?

  1. Open Codex CLI in the VS Code integrated terminal.
  2. Type a multi-line prompt draft.
  3. Press Shift+Enter or Alt+Enter to insert a newline.

What is the expected behavior?

Shift+Enter and/or Alt+Enter should insert a newline in the prompt, matching common chat/editor behavior.

At minimum, modified Enter key sequences should not submit the prompt accidentally.

What do you see instead?

The prompt is submitted instead of inserting a newline.

The current visible workaround is Ctrl+J, but this is easy to miss and differs from the expected behavior in most chat/editor UIs.

Additional information

This looks related to existing TUI input regressions / requests:

This report is for the current CLI version 0.128.0 and specifically includes both Shift+Enter and Alt+Enter in the VS Code integrated terminal on macOS.

Activity

  1. added
    bug
    CLI
    TUI
    on May 1, 2026
  2. github-actions commented on May 1, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. zanhk commented on May 1, 2026

    @zanhk

    Same, using old version for now

    npm install -g @openai/[email protected]

  4. semiautomatix-pf commented on May 4, 2026

    @semiautomatix-pf

    Yep, here too. Painful

  5. smith558 commented on Jun 12, 2026

    @smith558

    Shift+Enter doesn't work, but Alt+Enter does

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