openai / openai/codex-plugin-cc
Codex plugin commands fail with command not found: node on Mac App
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
When using the Codex plugin in Claude Code on macOS, all !-pattern commands (/codex:status, /codex:result, /codex:cancel) and lifecycle hooks fail with:
(eval):1: command not found: node
Root cause: The plugin's !-pattern commands and hooks invoke node without an absolute path. The shell environment used for !-commands and hooks does not load shell init files (.zshenv, .zshrc), so only the minimal system PATH (/usr/bin:/bin:/usr/sbin:/sbin) is available. On macOS, Node.js is typically installed in /usr/local/bin or /opt/homebrew/bin, neither of which is in that minimal PATH.
Affected files:
commands/status.md, commands/result.md, commands/cancel.md — !-commands use bare node
hooks/hooks.json — all three hooks (SessionStart, SessionEnd, Stop) use bare node
Workaround: Replace node with /usr/local/bin/node in all affected files and update allowed-tools: Bash(node:) to Bash(/usr/local/bin/node:). This fix is lost on plugin updates since the files live in the plugin cache.
Suggested fix: Use an absolute path, #!/usr/bin/env node, or resolve the node binary path at plugin install time. Alternatively, ensure the !-command shell inherits a reasonable PATH (e.g. by sourcing ~/.zshenv).
Contributor guide
No contributing guide indexed for this repository
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 reproducing the failure on macOS, then inspect commands/status.md, commands/result.md, commands/cancel.md, and hooks/hooks.json for bare node invocations and matching allowed-tools entries. Compare the proposed path, shebang, install-time resolution, and PATH approaches; done means all affected commands and lifecycle hooks work without shell init files and their permissions match the invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100