codex
codex copied to clipboard
Repeated "sudo: The 'no new privileges' flag is set" printed before every command
What version of Codex is running?
codex-cli 0.64.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.1-codex-max
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 unknown
What issue are you seeing?
- Any command executed through the Codex CLI prints multiple lines:
sudo: The "no new privileges" flag is set, which prevents sudo from running as root...before the real output. - Example:
pwd→ warning repeats 3x, then/home/orbisuls→ warning repeats 3x, thenapps,Downloads,projects,projects - Shortcut.lnkcodex --version→ warning repeats 3x, thencodex-cli 0.64.0
What steps can reproduce the bug?
- Start a Codex CLI session on WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2).
- Run any simple command (e.g.,
pwd,ls,codex --version). - Observe that three sudo “no new privileges” warnings print before the actual command output.
What is the expected behavior?
- Commands should run normally without sudo warnings when they don’t invoke sudo.
Additional information
The warnings appear even though the commands don’t call sudo explicitly. Environment is WSL2; sandbox mode workspace-write, network restricted.
The flag disappear when running sudo codex
But of course I don't want to run codex as sudo. So I really need help on this one.