Delete / DEL key immediately ends session

Resolved 💬 4 comments Opened Jan 27, 2026 by aehlke Closed Apr 3, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.91.0

What subscription do you have?

Pro

Which model were you using?

_No response_

What platform is your computer?

macOS

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

_No response_

What issue are you seeing?

Sometimes I accidentally press the 'delete' key when I have nothing in the prompt, and it immediately ends my session. Very frustrating and unusual behavior!

What steps can reproduce the bug?

macOS, iTerm2

What is the expected behavior?

Do nothing in response to delete key being pressed when prompt is empty!

Additional information

_No response_

View original on GitHub ↗

4 Comments

etraut-openai contributor · 7 months ago

Is this behavior new? I'm wondering if you suspect that it's a recent regression.

I'm not able to repro in the macOS Terminal. Perhaps this is specific to iTerm2 or your terminal configuration?

aehlke · 7 months ago

@etraut-openai no it's been bothering me for several weeks. at first I thought it was an iTerm2 issue but it definitely seems unique to Codex, I can't repro in other TUIs... I tried disabling the "delete" key in iTerm2 by adding a shortcut that does nothing because it also seems to sometimes close a tab, but that didn't solve this problem - it still kills sessions. Please try to repro with iTerm2 if you're able to. I can try another time on other machines but don't have easy access at the moment. thank you!

etraut-openai contributor · 4 months ago

I'm not able to repro this problem with the latest Codex and iTerm2. Perhaps it was fixed, or perhaps this is specific to your terminal configuration. Do you have custom keyboard mappings for the delete key?

aehlke · 4 months ago

@etraut-openai thank you for investigating. I ended up setting a mapping to entirely disable the delete key in iterm2 because I couldn't figure out what was causing this, sorry. it's still an issue if I don't override the delete key to do nothing.