Standalone updater is unavailable when CODEX_HOME differs from the install home
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.149.1
What subscription do you have?
Not relevant to installation detection.
Which model were you using?
Not applicable.
What platform is your computer?
Darwin 25.5.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Not applicable; this reproduces in a non-interactive shell.
Codex doctor report
Relevant paths are replaced with $STATE_HOME and $INSTALL_HOME:
{
"codexVersion": "0.149.1",
"checks": {
"installation": {
"status": "ok",
"details": {
"install context": "other (package $INSTALL_HOME/packages/standalone/releases/0.149.1-aarch64-apple-darwin)"
}
},
"updates.status": {
"status": "warning",
"details": {
"update action": "manual or unknown"
}
}
}
}
What issue are you seeing?
When CODEX_HOME points to a directory other than the home that owns an official standalone installation, install detection reports other even though the canonical executable resolves inside packages/standalone/releases/<release>.
As a result, codex update exits with:
Error: Could not detect the Codex installation method. Please update manually: https://developers.openai.com/codex/cli/
The installation itself is intact; only its provenance and update action are misclassified.
What steps can reproduce the bug?
- Install Codex with the official standalone installer.
- Confirm that the executable resolves into the standalone release tree.
- Run Codex with a different home:
STATE_HOME="$(mktemp -d)"
CODEX_HOME="$STATE_HOME" codex doctor --json
CODEX_HOME="$STATE_HOME" codex update
The doctor report shows install context: other, and the update command cannot select the standalone updater.
What is the expected behavior?
Codex should identify the official standalone installation from the canonical executable layout and update that same installation, independently of the runtime CODEX_HOME value.
Additional information
The detector currently validates the canonical release directory against the active CODEX_HOME. The standalone installer also uses CODEX_HOME to select its package root, so changing detection alone would make the updater target the runtime home instead of the existing installation.
A minimal fix has two parts:
- validate the release path against the active CODEX_HOME
+ derive the install home from packages/standalone/releases/<release>
+ pass the derived install home as CODEX_HOME to the standalone installer child only
Regression coverage should verify both classification with a different runtime home and the installer child's target. A local implementation passes the 423 tests in codex-install-context and codex-cli.
Contributor 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.
Research direction
Start by reading the standalone installation detector and updater/installer path, then run the codex-install-context and codex-cli tests. Verify classification when CODEX_HOME differs from the runtime home and confirm that the standalone installer child targets the derived installation home; done means both regression cases pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100