Repository navigation
Description
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 : 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
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
Activity
github-actions commentedon Nov 2, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
tfriedel commentedon Nov 4, 2025
I also observed this issue. Very annoying!
I also don't understand why it should get sudo permissions at all.
If I manually run sudo before, programs will not ask for sudo password for some time. I though this could be a workaround.
But then I see this:
Seems like it's running in some container as root?
InfinityZ25 commentedon Feb 20, 2026
just ran into this in ubuntu, really annoying
sstklen commentedon Feb 24, 2026
SuperJMN commentedon Mar 16, 2026
It's happening to me. Whenever I want codex run some "sudo" command, it doesn't allow me to type the password, so it's always stuck on some tasks, like debugging driver problems.
xyehya commentedon Apr 4, 2026
A workaround for linux users:
Run sudo visudo to edit the sudoers file
Add a line for your user:
your_username_here ALL=(ALL) NOPASSWD: ALL
Note: This has significant security implications and should ideally be restricted to specific commands like
NOPASSWD: /usr/bin/apt-get)
ichi4096 commentedon Sep 16, 2026
https://gtfobins.org/gtfobins/apt-get/#shell