codex gets stuck at sudo step running on Ubuntu
What version of Codex is running?
codex-cli 0.53.0
What subscription do you have?
Pro
Which model were you using?
gpt 5 codex
What platform is your computer?
Linux 6.8.0-59-generic x86_64 x86_64
What issue are you seeing?
When Codex executes a command requiring sudo privileges, the terminal enters a password prompt state where user keyboard input does not register properly. The prompt appears, but input is either partially displayed or not accepted at all. The session becomes unresponsive to normal keyboard input.
Observed Behavior
Codex runs a command that triggers sudo
Terminal displays password for <user>: prompt
User attempts to type password
Input is not accepted (random characters appear or nothing appears)
Terminal becomes effectively frozen
Pressing Esc repeatedly sometimes restores control, but often fails even if it restore control keyboard input is only taken in partially
In many cases only Ctrl+C works, and sometimes the entire session must be closed
After force-closing, user must run codex resume to continue
it is not clear whether codex is actually working or it is waiting for a password . even if it is waiting for a password we cannot provide it as inout does not work
<img width="2037" height="432" alt="Image" src="https://github.com/user-attachments/assets/e6a941a3-2cbc-4ee2-b7a7-bd566cf34480" />
<img width="1357" height="222" alt="Image" src="https://github.com/user-attachments/assets/29b8a7da-d0c5-453b-876e-2d3c54dcd2bc" />
<img width="876" height="152" alt="Image" src="https://github.com/user-attachments/assets/1fb793e8-7f9d-45c3-88bc-7957ca794ba2" />
What steps can reproduce the bug?
Start a Codex CLI session on Ubuntu
Let it do some trivial stuff
Then let cidex do something that needs a sudo privilege like sudo docker ( does not really matter as long as sudo is involved)
Terminal shows password prompt
User tries to type password
Terminal freezes / does not accept input
Press Escape many times some times it work sometime it does not , if it works try to type anything and whatever you input will not appear on screen fully
What is the expected behavior?
Password input should be accepted normally, or
Codex should detect interactive sudo context and:
Prompt user for password securely, or
Fall back to non-interactive mode with proper guidance
Additional information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗