Skip to content

[Bug] clink "codex: command not found" when Codex CLI is installed globally via nvm + npm #442

Description

@haozhou-wong

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

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions