Ctrl+M is the newline shortcut in Codex CLI's TUI
If you're using Codex CLI and want to insert a newline in the prompt box without submitting, Shift+Enter won't work. Ctrl+J works with old versions but not recent ones, now, you have to use Ctrl+M instead.
Ctrl+J is the ASCII control character for line feed (\n). Many terminal TUI libraries interpret it as "insert newline" rather than "submit," which is exactly what Codex CLI's input component does. Unfortunately, in the recent version they changed to Ctrl+M instead.
Shift+Enter looks like the right key (it works in browser-based chat UIs), but whether it inserts a newline or submits depends entirely on how the TUI library handles raw key events — and Codex CLI's library doesn't treat it as a newline.
So: Ctrl+JCtrl+M to insert a newline, Enter to submit.