Allow DYLD_* in codex's shell
Resolved 💬 2 comments Opened Dec 23, 2025 by amonks Closed Feb 23, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.77.0
What subscription do you have?
usage tier 5
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Darwin 25.1.0 arm64 arm
What issue are you seeing?
I'm working on something where I need to set DYLD_* environment variables. It looks like the process hardening crate prevents this.
What steps can reproduce the bug?
- prompt
! DYLD_TEST=yes env | grep DYLD_TEST - with
shell_environment_policy.set = { DYLD_TEST = "yes" }, prompt! echo $DYLD_TEST
What is the expected behavior?
in both cases, I expect to see DYLD_TEST set to "yes", but it is unset.
Additional information
I understand not allowing DYLD_* (or LD_PRELOAD or whatever) in codex's own processes, but not allowing them in the shell seems unreasonable. Lots of tasks depend on these tools.
2 Comments
Thank you @amonks this issue has a bigger surface area than this and I'm glad some others are starting to file reports too.
Original PR that introduced the problem:
b8e1fe60c5af4439c7e159a49ba11a0ef3f7eb7cWhy the original rationale was incorrect:
This is not a new feature request. It is a request to restore the previous opt-in behavior from commit
0dd49683, which was reverted by commitb8e1fe60.This feature request hasn't received enough upvotes, so I'm closing it.