Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.128.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
VS Code Integrated Terminal over WSL VS Code 1.117.0 Commit 10c8e557c8b9f9ed0a87f61f1c9a44bde731c409 x64
What issue are you seeing?
In Codex CLI 0.128.0, Alt+Enter no longer inserts a newline when running inside the VS Code integrated terminal over WSL.
This used to work in previous versions. Enter submitted the message, while Alt+Enter inserted a newline in the composer.
The new /keymap command exists, but remapping newline to combinations such as Ctrl+Alt+J or Ctrl+Alt+X did not work in the VS Code integrated terminal. The same newline behavior works in the Ubuntu WSL.
What steps can reproduce the bug?
- Open VS Code connected to WSL.
- Open the VS Code integrated terminal.
- Run
codex. - Confirm the version is
codex-cli 0.128.0. - Type text in the composer.
- Press Alt+Enter.
- Observe that a newline is not inserted.
Optional:
- Open
/keymap. - Try mapping
editor.insert_newlineto Ctrl+Alt+J or Ctrl+Alt+X. - Return to the composer.
- Press the configured key combination.
- Observe that the newline still does not work in the VS Code integrated terminal.
What is the expected behavior?
Alt+Enter should insert a newline in the composer when running Codex CLI in the VS Code integrated terminal over WSL.
Enter alone should continue submitting the prompt.
Additional information
This appears related to the keymap changes introduced after the previous composer behavior.
In older behavior, Enter with modifiers could fall through to the textarea logic and insert a newline. In 0.128.0, editor.insert_newline is controlled by the default runtime keymap, but the default bindings include Ctrl+J, Ctrl+M, plain Enter, and Shift+Enter, while Alt+Enter is not included.
A minimal fix appears to be adding Alt+Enter to the default editor.insert_newline bindings and adding a regression test that verifies KeyCode::Enter with KeyModifiers::ALT inserts a newline and does not submit the composer.
Activity
fcoury-oai commentedon Apr 30, 2026
@rafael-agenticca this is a true regression. Can you add this to your
~/.codex/config.tomluntil 0.129.0 is released:And let me know if it works for you.
Thank you for reporting!
rafael-agenticca commentedon Apr 30, 2026
@fcoury-oai thanks for confirming.
Unfortunately I won’t be able to test this reliably anymore because I already worked around the issue in my local environment. I removed/remapped the VS Code shortcuts that were intercepting
Alt+Enter, so the original failure no longer reproduces for me here.That said, it would be useful if someone else who is still experiencing the issue could test the proposed config workaround:
This would help confirm whether the issue can be resolved only by adding alt-enter to ~/.codex/config.toml, without changing VS Code keybindings.
Thanks again for looking into it.
NickSdot commentedon May 1, 2026
+1, macOS, Apple Terminal, codex-cli 0.128.0. Had to manually re-add key bindings for "alt-enter".
garyfpga commentedon May 1, 2026
I confrim this fix is working
gh640 commentedon May 1, 2026
I also bumped into this issue while using Codex CLI 0.128.0 on macOS. I was able to temporarily fix it with the keymap settings @fcoury-oai shared ↓ . Thanks!
fcoury-oai commentedon May 1, 2026
Thanks for confirming it works for you, this way we can reference this issue until we have the fix out.
14 remaining items
fix(tui): restore alt-enter newline alias (openai#20535)
fix(tui): restore alt-enter newline alias (#20535)
fix(tui): restore alt-enter newline alias (openai#20535)
fix(tui): restore alt-enter newline alias (#20535)