codex - 💡(How to fix) Fix Regression: VS Code sendSequence Shift+Enter workaround no longer inserts newline [1 comments, 2 participants]

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…
GitHub stats
openai/codex#21353Fetched 2026-05-07 03:41:23
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3closed ×1commented ×1

Fix Action

Fix / Workaround

The important distinction here is that this is not only about a terminal's native Shift+Enter behavior. It is a common VS Code workaround that explicitly sends ESC + LF via workbench.action.terminal.sendSequence, and that sequence used to work with Codex CLI.

Code Example

{
  "key": "shift+enter",
  "command": "workbench.action.terminal.sendSequence",
  "args": { "text": "\u001B\u000A" },
  "when": "terminalFocus"
}

---

{
     "key": "shift+enter",
     "command": "workbench.action.terminal.sendSequence",
     "args": { "text": "\u001B\u000A" },
     "when": "terminalFocus"
   }
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.128.0

What subscription do you have?

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

Which model were you using?

Not model-specific.

What platform is your computer?

Darwin 25.4.0 arm64 arm

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

VS Code integrated terminal:

  • VS Code 1.119.0
  • Commit 8b640eef5a6c6089c029249d48efa5c99adf7d51
  • TERM_PROGRAM=vscode
  • TERM=xterm-256color
  • No tmux/zellij/screen involved

What issue are you seeing?

A VS Code integrated terminal keybinding that previously let Shift+Enter insert a newline in the Codex TUI no longer works on the latest published CLI version, 0.128.0.

The keybinding sends ESC + LF to the terminal:

{
  "key": "shift+enter",
  "command": "workbench.action.terminal.sendSequence",
  "args": { "text": "\u001B\u000A" },
  "when": "terminalFocus"
}

Previously, pressing Shift+Enter with this VS Code binding inserted a newline in the composer. Now it no longer inserts a newline.

What steps can reproduce the bug?

  1. Add this keybinding to VS Code keybindings.json:

    {
      "key": "shift+enter",
      "command": "workbench.action.terminal.sendSequence",
      "args": { "text": "\u001B\u000A" },
      "when": "terminalFocus"
    }
  2. Open the VS Code integrated terminal.

  3. Run codex.

  4. Type text in the composer.

  5. Press Shift+Enter.

What is the expected behavior?

The ESC + LF sequence sent by VS Code should be treated as a modified Enter / newline insertion sequence, so Shift+Enter inserts a newline in the composer instead of failing to create a new line.

Additional information

This looks related to the recent TUI keymap/input handling regressions around modified Enter sequences:

  • #20501
  • #20555
  • #20580

It may also be related to the C0 normalization work in #20798, which appears merged but is not yet included in the latest npm release (0.128.0 at the time of filing).

The important distinction here is that this is not only about a terminal's native Shift+Enter behavior. It is a common VS Code workaround that explicitly sends ESC + LF via workbench.action.terminal.sendSequence, and that sequence used to work with Codex CLI.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING