Use correct install when developer is using volta

Open 💬 3 comments Opened May 28, 2026 by gkiely

What version of Codex CLI is running?

codex-cli 0.134.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Terminal.app

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1779986608s since unix epoch",
  "overallStatus": "fail",
  "codexVersion": "0.134.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/grantkiely/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/grantkiely/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/grantkiely/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/grantkiely/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/grantkiely/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/Users/grantkiely/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/grantkiely/.codex",
        "config.toml": "/Users/grantkiely/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/grantkiely/code",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, memories, hooks, enable_request_compression, multi_agent, apps, tool_suggest, plugins, in_app_browser, browser_use, browser_use_external, computer_use, plugin_sharing, image_generation, skill_mcp_dependency_install, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, prevent_idle_sleep, workspace_dependencies",
        "feature flag overrides": "memories=true, prevent_idle_sleep=true",
        "feature flags enabled": "29",
        "log dir": "/Users/grantkiely/.codex/log",
        "mcp servers": "2",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/Users/grantkiely/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "fail",
      "summary": "npm install -g @openai/codex would update a different install",
      "details": {
        "PATH codex #1": "/Users/grantkiely/.volta/tools/image/node/24.15.0/bin/codex",
        "PATH codex #2": "/Users/grantkiely/.volta/bin/codex",
        "PATH codex #3": "/Users/grantkiely/.volta/bin/codex",
        "PATH codex #4": "/Users/grantkiely/.volta/bin/codex",
        "PATH codex #5": "/Users/grantkiely/.volta/bin/codex",
        "PATH codex entries": "5",
        "current executable": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin/codex",
        "install context": "npm (package /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources none, path /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed package root": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex",
        "npm package root": "/Users/grantkiely/.volta/tools/image/node/24.15.0/lib/node_modules/@openai/codex",
        "running package root": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex"
      },
      "remediation": "Fix PATH or npm prefix so the running package root (/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex) matches the npm global package root (/Users/grantkiely/.volta/tools/image/node/24.15.0/lib/node_modules/@openai/codex).",
      "durationMs": 92
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "2",
        "disabled servers": "0",
        "stdio servers": "2"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 404)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 270
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 641
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin/codex",
        "install method": "npm (package /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources none, path /Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)",
        "platform": "macos-aarch64",
        "version": "0.134.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "Never",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/grantkiely/.codex/tmp/arg0/codex-arg0o67R3F/codex-execve-wrapper",
        "filesystem sandbox": "unrestricted",
        "network sandbox": "enabled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/grantkiely/.codex (dir)",
        "active rollout files": "615 files, 1198717484 total bytes, 1949134 average bytes",
        "archived rollout files": "14 files, 9536122 total bytes, 681151 average bytes",
        "goals DB": "/Users/grantkiely/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/grantkiely/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/grantkiely/.codex/log (dir)",
        "sqlite home": "/Users/grantkiely/.codex (dir)",
        "state DB": "/Users/grantkiely/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 532
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "TERM_PROGRAM": "Apple_Terminal",
        "color output": "disabled (stdout is not a terminal)",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "false",
        "terminal": "Apple Terminal",
        "terminal size": "130x34",
        "terminal version": "455.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "fail",
      "summary": "update would target a different npm install",
      "details": {
        "cached latest version": "0.134.0",
        "check for update on startup": "true",
        "dismissed version": "0.129.0",
        "last checked at": "2026-05-28T01:05:48.956468Z",
        "latest version": "0.134.0",
        "latest version status": "current version is not older",
        "npm package root": "/Users/grantkiely/.volta/tools/image/node/24.15.0/lib/node_modules/@openai/codex",
        "running package root": "/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/Users/grantkiely/.codex/version.json"
      },
      "remediation": "Fix PATH or npm prefix so the running package root (/Users/grantkiely/.volta/tools/image/packages/@openai/codex/lib/node_modules/@openai/codex) matches the npm global package root (/Users/grantkiely/.volta/tools/image/node/24.15.0/lib/node_modules/@openai/codex).",
      "durationMs": 332
    }
  }
}

What issue are you seeing?

Running npm install -g @openai/codex never updates the codex version when developer is using volta

What steps can reproduce the bug?

  1. Install volta
  2. Attempt to update codex

What is the expected behavior?

It should provide the correct command for volta (volta install) or otherwise update as expected.

Additional information

_No response_

View original on GitHub ↗

3 Comments

LiarCoder · 1 month ago

Same here, is there any planning fixtures?

And I found that claude update has the same issue when you use volta to manage your npm.

LiarCoder · 1 month ago

I implemented a fix for this in my fork:

The detection is deliberately strict: it resolves volta which --quiet codex and requires both the expected Volta package layout and that the running package is contained in that resolved package root. If either check fails, it falls back to the existing npm update path.

For verified Volta installations, codex update, the TUI update prompt, and codex doctor now use or display volta install @openai/codex@latest. The change includes install-context, Doctor, and TUI snapshot coverage.

I could not open a PR because this repository currently permits PR creation only for collaborators. If a maintainer is interested, they can create a PR from the fork branch above or cherry-pick the commit.

<img width="2542" height="993" alt="Image" src="https://github.com/user-attachments/assets/039f145d-de36-4376-b0e6-1f76342abe0a" />

ravipinto · 17 days ago

I can reproduce the same codex doctor / update-root mismatch with mise on macOS, even when the invoking shell resolves all three commands through mise.

Environment:

  • Codex CLI: 0.147.0
  • macOS Apple Silicon, zsh
  • mise global tool: node = "22" (resolved to Node 22.23.1)
  • Homebrew Node/npm is also installed at /opt/homebrew/bin

Reproduction:

mise exec node@22 -- which codex
mise exec node@22 -- which node
mise exec node@22 -- which npm
mise exec node@22 -- npm root -g
mise exec node@22 -- codex doctor

Observed before codex doctor:

codex: /Users/<redacted>/.local/share/mise/installs/node/22/bin/codex
node:  /Users/<redacted>/.local/share/mise/installs/node/22/bin/node
npm:   /Users/<redacted>/.local/share/mise/installs/node/22/bin/npm
npm root -g: /Users/<redacted>/.local/share/mise/installs/node/22.23.1/lib/node_modules

But codex doctor reports both install and updates as failed, claiming that its npm global package root is:

/opt/homebrew/lib/node_modules/@openai/codex

while the running package root is:

/Users/<redacted>/.local/share/mise/installs/node/22.23.1/lib/node_modules/@openai/codex

So mise exec node@22 -- codex doctor does not change the failure, despite npm root -g in that same mise context pointing at the expected mise root. Homebrew's global Codex package directory does not exist on this machine, so updating through the root selected by doctor would create a second installation rather than update the running one.

The current upstream implementation in codex-rs/cli/src/doctor.rs calls an unqualified npm root -g in npm_global_root_check(). It would be useful for the detection/update path to preserve the npm executable associated with the launching Node/package-manager environment, or explicitly support mise similarly to the Volta handling proposed here.

---
This issue or PR was generated by LazyCodex.
Tag: lazycodex-generated