Standalone installer ignores ZDOTDIR and leaves codex off PATH in new Zsh sessions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- shell, zsh
- Domain
- developer-experience
Research direction
The profile selection logic is in scripts/install/install.sh around lines 576-593, where the installer picks the Zsh startup file it appends PATH to. Start there and change the choice to honor ZDOTDIR before falling back to HOME. Done means the reproduction in the issue prints the custom ZDOTDIR marker and finds codex in a fresh interactive zsh -ic session.
Written by the indexing model from the issue text.
Description
With an exported ZDOTDIR, a successful standalone install adds its PATH block to ~/.zshrc. Linux Zsh reads $ZDOTDIR/.zshrc instead. The installer's instruction to open a new terminal and run codex then fails.
Steps to reproduce On Linux with Zsh, start in the Codex checkout. This uses a disposable home and starts with the installation directory off PATH.
installer="$PWD/scripts/install/install.sh"
d=$(mktemp -d)
mkdir -p "$d/home/.config/zsh"
printf 'export CUSTOM_ZSHRC_LOADED=yes\n' > "$d/home/.config/zsh/.zshrc"
env HOME="$d/home" ZDOTDIR="$d/home/.config/zsh" PATH=/usr/bin:/bin \
SHELL=/bin/zsh CODEX_HOME="$d/codex-home" CODEX_INSTALL_DIR="$d/bin" \
CODEX_NON_INTERACTIVE=1 sh "$installer"
env HOME="$d/home" ZDOTDIR="$d/home/.config/zsh" PATH=/usr/bin:/bin \
/bin/zsh -ic 'echo "$CUSTOM_ZSHRC_LOADED"; command -v codex || echo missing'
test -x "$d/bin/codex"
Observed On Linux x86_64 with Zsh 5.9, the checkout's offline release fixture ran the installer at de83e7674a69b9ae18544dd1fbf53f31bfe8c640 to completion. It reported adding PATH to $HOME/.zshrc. A fresh interactive Zsh printed yes and missing, even though the installed executable existed.
Expected A new Zsh session that reads the user's configured startup directory should find the installed CLI.
Suggested fix Use ${ZDOTDIR:-$HOME} when choosing the Zsh startup file. Exercise the startup-file selection with a real interactive Zsh and an exported nondefault ZDOTDIR. Profile selection
- Dominant language
- Rust
- Stars
- 135k
- Forks
- 21.4k
- Avg merge
- 1m
- Merged PRs (30d)
- 997
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textOpenbug imagen skills
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
gitDiffToRemote fails on an unpushed topic branch when the remote default branch contains a slashOpenapp-server bug CLI
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug CLI skills
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug imagen skills
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug CLI tool-calls
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
bug UI
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
wardian-app/Wardian#1746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jlcodes99/cockpit-tools#3125 ·
Maintainers usually reply within 2 days
-
bug user-sprint
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Vondor/KassenSturz#967 ·
Maintainers usually reply within 1 day
-
area/ci
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[BUG] Incremental sync warns "no stored highest_uid" on every round for folders with no new mailOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
rustmailer/bichon#411 ·