You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex doesn't work properly after resuming from being sent to suspend #26564
What terminal emulator and version are you using (if applicable)?
gnome terminal, kitty
Codex doctor report
What issue are you seeing?
When I login to a machine and start codex, I often need to check something on the terminal. i send suspend to send codex to the background. when i bring it to the foreground it comes unresponsive or just broken unprocessed ANSI escape codes:
f^[[102;1:3ug^[[103;1:3u
sometimes it detects my kill signal, otherwise i need to login again and kill it.
From local tracing, the cause seems to be that recent Codex versions run the TUI on a spawned codex-main thread, but the Ctrl-Z path uses kill(0, SIGTSTP). On Linux, that process-directed stop can be delivered to another thread, allowing the TUI thread to continue and reapply terminal modes before the process is actually suspended. Using raise(SIGTSTP) from the TUI suspend path fixes the issue locally.
Activity
github-actions commentedon Jun 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
LC43 commentedon Jun 5, 2026
no, i dont have extra hooks and i dont use IME
clayg commentedon Jun 5, 2026
ran into this problem after upgrading to
codex-cli 0.137.0terminal suspend/resume used to work like #3464 cc @Nintorac
now it doesn't work
workaround for me was downgrade to known good version:
sudo npm install -g @openai/codex@0.130codex-cli 0.134.0is also workingclayg commentedon Jun 9, 2026
I accidentally managed to get
codex-cli 0.138.0installed to~/.local/bin/codexand this problem came back.I'm now back on
codex-cli 0.136.0from/usr/bin/codexinstalled viasudo npm install -g @openai/codex@0.136and that seems to be working.gkoundry commentedon Jun 10, 2026
v0.139.0 was just released and it still has this issue.
GuyEP-Modulate commentedon Jun 11, 2026
I am also experiencing this issue as of 0.137.0+ on Gentoo Linux. I don't experience it on macOS 15.7.7 (24G720) with the same version (or later).
garybernhardt commentedon Jun 11, 2026
I'm seeing this inside of Linux containers, but not on the Mac host. Versions:
Setting
CODEX_TUI_DISABLE_KEYBOARD_ENHANCEMENT=1seems to reduce the problem significantly.djnz00 commentedon Jun 15, 2026
interactive shell suspend/resume broke within the past couple of weeks
kamou commentedon Jun 16, 2026
this patch fixes the problem: kamou@e09ac2f
kamou commentedon Jun 16, 2026
From local tracing, the cause seems to be that recent Codex versions run the TUI on a spawned
codex-mainthread, but the Ctrl-Z path useskill(0, SIGTSTP). On Linux, that process-directed stop can be delivered to another thread, allowing the TUI thread to continue and reapply terminal modes before the process is actually suspended. Usingraise(SIGTSTP)from the TUI suspend path fixes the issue locally.fix(tui): restore TUI after suspend (#28342)
garybernhardt commentedon Jun 16, 2026
Thank you @kamou and @fcoury-oai!
fcoury-oai commentedon Jun 16, 2026
You're welcome! One less destoyed software!
fix(tui): restore TUI after suspend (openai#28342)
Sync upstream rust-v0.142.0 (#104)
fix(tui): restore TUI after suspend (openai#28342)
Sync upstream rust-v0.142.0 to main (#130)