bug: asking for password is broken
Open 💬 7 comments Opened Oct 19, 2025 by tibo-openai
💡 Likely answer: A maintainer (xl-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.47
What platform is your computer?
MacOS
What issue are you seeing?
See video. Requesting for password is broken.
What steps can reproduce the bug?
Open a new session and ask
Run sudo echo 'hello'
https://github.com/user-attachments/assets/855b0c4f-53f4-4b2e-b12b-1f10f6504e00
7 Comments
<img width="843" height="470" alt="Image" src="https://github.com/user-attachments/assets/2d7703cb-fed7-46e9-b06b-692ba21dcd82" />
@codex please investigate the issue and propose a fix.
Summary
Testing
View task →
This appears to be resolved as of
v0.104.0.<img width="1679" height="796" alt="Image" src="https://github.com/user-attachments/assets/5e3bf3e8-c1bd-40c2-a1b8-d9cf166179bc" />
It's worth noting that codex _does_ inherit parent environment variables, but _does not_ inherit session state, so even sudoing and then starting codex won't allow you to run sudo commands.
I believe https://github.com/openai/codex/issues/6108 and https://github.com/openai/codex/issues/3646 can also be closed (cc @etraut-openai since I saw you already have closed out some of the older related issues, eg https://github.com/openai/codex/issues/5560 and https://github.com/openai/codex/issues/6146)
<img width="3020" height="472" alt="Image" src="https://github.com/user-attachments/assets/e883621c-6275-4669-b14d-d689070b6358" />
not solved on linux
This is still broken on Ubuntu. Makes Codex useless for many daily tasks.
Also, @Patrick-Erichsen can you clarify? The screenshot you posted shows broken behavior. Did you intend to post evidence of the bug being fixed?
its july. this needs fixed. makes the codex harness unusable for administrative tasks.
FWIW I have a workaround for this. I created a skill markdown that tells Codex to create a new tmux window named
sudoin the active tmux session and then send keys for asudo -v. This way, Codex can use that terminal to run the sudo operations until the authentication expires. This has been very reliable for me.I also created helper wrappers as part of sudoers to allow Codex to perform specific well-defined commands as sudo without needing password escalation. For example, systemd start/stop/restart of specific services I'm having it manage. If you copy/paste this comment into Codex it can implement both workarounds for you.