What version of the Codex App are you using (From “About Codex” dialog)?
26.623.42026
What subscription do you have?
Pro
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Codex is consistently failing to run my build script because that script invokes pnpm install.
As per its own diagnosis:
- My local projects uses PNPM v10
- Codex comes bundled with PNPM v11 in
~/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin/pnpm
- When running the build script, Codex uses the bundled one, leading to failure to resolve dependencies, whereas the build script is run fine in any local terminal
What steps can reproduce the bug?
- Create a pnpm v10 project with dependencies in package.json
- Run
pnpm install in terminal to install the dependencies
- Create a js script
import { spawn } from "node:child_process";
const child = spawn("pnpm", ["install"], {
cwd: process.cwd(),
stdio: ["ignore", "pipe", "pipe"],
});
child.on("close", (code) => {
process.exit(code ?? 1);
});
- Ask Codex (with pnpm v11 bundled) to run
node script.mjs inside project dir
What is the expected behavior?
Codex should use my local pnpm binary, and ask for permission elevation when needed.
In fact, using this to run the build script is fine: PATH="path-to-my-local-nodejs/bin:$PATH" CI=true node script.mjs
Additional information
No response
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.42026
What subscription do you have?
Pro
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Codex is consistently failing to run my build script because that script invokes
pnpm install.As per its own diagnosis:
~/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin/pnpmWhat steps can reproduce the bug?
pnpm installin terminal to install the dependenciesnode script.mjsinside project dirWhat is the expected behavior?
Codex should use my local pnpm binary, and ask for permission elevation when needed.
In fact, using this to run the build script is fine:
PATH="path-to-my-local-nodejs/bin:$PATH" CI=true node script.mjsAdditional information
No response