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
Updated the exec flow to inherit stdin whenever escalated shell runs are requested so password prompts can be satisfied while still capturing output. codex-rs/core/src/exec.rsL350-L387
Added a dedicated stdio policy that pipes stdout/stderr but leaves stdin attached to the terminal for interactive shell commands. codex-rs/core/src/spawn.rsL25-L115
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 #6108 and #3646 can also be closed (cc @etraut-openai since I saw you already have closed out some of the older related issues, eg #5560 and #6146)
FWIW I have a workaround for this. I created a skill markdown that tells Codex to create a new tmux window named sudo in the active tmux session and then send keys for a sudo -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.
Activity
[-]asd[/-][+]bug: asking for password is broken[/+]xl-openai commentedon Oct 20, 2025
chatgpt-codex-connector commentedon Oct 20, 2025
Summary
Testing
View task →
Patrick-Erichsen commentedon Feb 18, 2026
This appears to be resolved as of
v0.104.0.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 #6108 and #3646 can also be closed (cc @etraut-openai since I saw you already have closed out some of the older related issues, eg #5560 and #6146)
0xdeafbeef commentedon Feb 26, 2026
joshua-oss commentedon Feb 28, 2026
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?
KeganHollern commentedon Jul 12, 2026
its july. this needs fixed. makes the codex harness unusable for administrative tasks.
joshua-oss commentedon Jul 15, 2026
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.
KeganHollern commentedon Aug 9, 2026
I have been asking codex to use my polkit to prompt for password - its unwieldy