[Bug] clink "codex: command not found" when Codex CLI is installed globally via nvm + npm
Author: haozhou-wongCreated May 6, 2026Updated May 6, 2026
Labelsbug
Project Version
9.8.2
Bug Description
Describe the bug
When using clink with codex ... (or clink codex ...), the command fails with:
codex: command not found
This happens only when Codex CLI is installed globally via nvm + npm install -g @openai/codex.
The MCP subprocess started by uvx (or the bash wrapper) does not inherit the dynamic PATH injected by nvm, so it cannot find the codex binary.
To Reproduce
- Install nvm and Codex CLI:
nvm install node npm install -g @openai/codex
Relevant Log Output
Operating System
Linux
Sanity Checks
- I have searched the existing issues and this is not a duplicate.
- I am using
GEMINI_API_KEY - I am using
OPENAI_API_KEY - I am using
OPENROUTER_API_KEY - I am using
CUSTOM_API_URL
Source: BeehiveInnovations/pal-mcp-server