-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Open
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIbugSomething isn't workingSomething isn't workingtool-callsIssues related to tool callingIssues related to tool calling
Description
Summary
Even with YOLO/full-access, Codex CLI executes tool commands in a non-interactive login shell (e.g. bash -lc / zsh -lc). If env setup is only in ~/.zshrc, it is not applied. This causes rbenv shims to be missing and the wrong Ruby to be used inside Codex.
Version
Codex CLI v0.73.0 (npm @openai/codex)
Platform
macOS (login shell: /bin/zsh)
Steps to reproduce
- Put rbenv init only in
~/.zshrc(not~/.zprofile). - Run Codex with YOLO/full-access (no sandbox/approvals).
- Ask Codex to run:
which ruby/ruby -v.
Actual
Codex resolves /usr/bin/ruby (or another non-rbenv Ruby) because the login shell doesn’t source ~/.zshrc.
This reproduces outside Codex with:
zsh -lc 'which ruby; ruby -v'
Expected
YOLO/full-access should use the same shell env as the user’s interactive shell, or at least load the login profile so rbenv shims are available.
Notes / Workaround
- Move rbenv init to
~/.zprofile, or - Set
shell_environment_policy.experimental_use_profile = true
Metadata
Metadata
Assignees
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIbugSomething isn't workingSomething isn't workingtool-callsIssues related to tool callingIssues related to tool calling