Codex cli is messing around with my ENV

Resolved 💬 2 comments Opened Sep 25, 2025 by CGQAQ Closed Sep 25, 2025

What version of Codex is running?

codex-cli 0.41.0

Which model were you using?

gpt-5-codex high

What platform is your computer?

Darwin 25.0.0 arm64 arm

What steps can reproduce the bug?

launch codex cli

• Ran which -a gperf

> Both /usr/bin/gperf and /opt/homebrew/bin/gperf are on the path.

▌ run which  gperf

• Ran which  gperf

> which  gperf returns /usr/bin/gperf.

exit codex cli

% which -a gperf
/opt/homebrew/bin/gperf
/usr/bin/gperf

% which gperf
/opt/homebrew/bin/gperf

What is the expected behavior?

The env inside codex cli should be exactly the same as it's outer shell

What do you see instead?

codex cli prepends some PATHs to the $PATH, causing wrong selection of gperf to old version, causing codex cli can not run my test

Additional information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗