Codex is uninstalling after every use

Resolved 💬 3 comments Opened Jan 6, 2026 by pzep1 Closed Jan 6, 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.78.0

What subscription do you have?

plus

Which model were you using?

gpt 5.2

What platform is your computer?

mac os

What issue are you seeing?

codex keeps uninstalling after every use!

i install with npm.

What steps can reproduce the bug?

❯ npm i -g @openai/codex

changed 1 package in 11s
❯ codex --version
codex-cli 0.78.0
❯ codex
╭──────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.78.0) │
│ │
│ model: gpt-5.2-codex high /model to change │
│ directory: ~/CodeProjects │
╰──────────────────────────────────────────────────╯

Tip: NEW! Try shell snapshotting to make your Codex faster. Enable in /experimental!

⚠ MCP startup interrupted. The following servers were not initialized: XcodeBuildMCP
❯
❯
❯ codex
╭──────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.78.0) │
│ │
│ model: gpt-5.2-codex high /model to change │
│ directory: ~/CodeProjects │
╰──────────────────────────────────────────────────╯

Tip: Paste an image with Ctrl+V to attach it to your next message.
❯codex
zsh: correct 'codex' to '_code' [nyae]? n
zsh: command not found: codex
❯ which codex
codex not found

What is the expected behavior?

stay installed

Additional information

no

View original on GitHub ↗

3 Comments

etraut-openai contributor · 7 months ago

This issue is likely specific to your shell environment and shell initialization files. You'll probably need to do some debugging yourself to figure it out.

Alternatively, you could see if using the HomeBrew installer for Codex works better for you.

pzep1 · 7 months ago

Okay, ill have a poke around and update the issue if i find something. Thanks for the pointer!

pzep1 · 7 months ago

spot on, lazy load NVM was removing it from paht