Skip to content

fix(codex): pin Node runtime for npm launcher hooks - #213

Open
hxy91819 wants to merge 2 commits into
vincentkoc:mainfrom
hxy91819:fix/codex-hook-node-runtime
Open

fix(codex): pin Node runtime for npm launcher hooks#213
hxy91819 wants to merge 2 commits into
vincentkoc:mainfrom
hxy91819:fix/codex-hook-node-runtime

Conversation

@hxy91819

Copy link
Copy Markdown
Contributor

Summary

  • Pin the current Node executable when the installed tokenjuice launcher resolves to JavaScript, while retaining the stable package-manager launcher path.
  • Make Codex doctor validate both paths in node tokenjuice codex-post-tool-use commands.
  • Add regression coverage for a misleading PATH, legacy launcher-only hooks, and missing launchers.

Why

Codex hooks may run from a non-login app-server environment with a minimal PATH. An npm launcher that relies on #!/usr/bin/env node can therefore select an unintended or stale system Node runtime, causing PostToolUse to terminate without a usable exit status.

Test plan

  • pnpm exec vitest run test/hosts/codex.test.ts test/hosts/shared/hook-command.test.ts
  • env -u TOKENJUICE_NO_OMISSION pnpm verify

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants