Skip to content

Codex blocked when launching Nx tests with pnpm (pnpm install prompt not managed) #3915

Closed

Description

@roukmoute

What version of Codex is running?

v0.39.0

Which model were you using?

gpt-5 medium

What platform is your computer?

Linux 6.12.38+deb12-amd64 x86_64 unknown

What steps can reproduce the bug?

When using Codex (v0.39.0) to run tests in an Nx monorepo with pnpm, it gets stuck for hours on the ‘Evaluating pnpm commands’ step.
It seems that the blockage comes from pnpm install, which asks for interactive confirmation ("The modules directories will be removed and reinstalled from scratch. Proceed? (Y/n)") but Codex is unable to handle it correctly.

Result:

  • Codex believes it has selected true (see transcript)
  • The installation does not actually take place
  • Codex then runs pnpm nx run-many -t test --all, but remains stuck in an ‘Evaluating pnpm commands’ state.

Steps to reproduce:

  1. Start Codex (v0.39.0) in an Nx workspace using pnpm.

  2. Run the Run tests command.

  3. Observe the behaviour:

    • Codex installs dependencies with pnpm install.
    • Stuck on interactive prompt (unresolved).
    • Moves to pnpm nx run-many -t test --all and remains indefinitely in the ‘Evaluating pnpm commands’ state.

▌ Run the tests

> I’m going to install workspace deps, then run the frontend unit tests via Nx. If backend tests have an Nx target, I’ll run those next.

• Ran zsh -lc 'rg --files'

• Ran zsh -lc "sed -n '1,200p' package.json"

• Ran zsh -lc "sed -n '1,200p' nx.json"

• Ran zsh -lc "sed -n '1,240p' apps/frontend/project.json"

• Ran zsh -lc "sed -n '1,220p' libs/loquii/project.json"

• Ran zsh -lc "sed -n '1,260p' apps/backend/project.json"

• Ran zsh -lc "sed -n '260,640p' apps/backend/project.json"

• Ran zsh -lc 'pnpm install'

⠧ Running zsh -lc 'pnpm nx run-many -t test --all'

  Evaluating pnpm commands (2h 40m 39s • Esc to interrupt)

Logs/transcript (excerpt):

thinking
Installing dependencies

It looks like I need to install some dependencies first before running tests, which is a bit different from what I usually do. I’ll execute pnpm
install to set everything up. After that, I'll run the Nx tests for the projects that have a test target. It’s important to have everything ready
before diving into the tests! Let's get started on that installation!

$ zsh -lc “pnpm install”
Scope: all 4 workspace projects?
 The modules directories will be removed and reinstalled from scratch. Proceed? (Y/n) ‣ true
   ╭──────────────────────────────────────────╮
   │                                          │
   │   Update available! 10.8.1 → 10.17.0.    │
   │   Changelog: https://pnpm.io/v/10.17.0   │
   │     To update, run: pnpm self-update     │
   │                                          │
   ╰──────────────────────────────────────────╯


✓ • 549ms


thinking
Evaluating pnpm commands

I'm looking into pnpm prompts about removing module directories, but it seems like it auto-selected true since the interface isn't interactive.
The output showed success, but I'm wondering if it actually did anything since the exit code is 0. I think it just printed the prompt without
proceeding. Before diving into checking the version with pnpm -v or node, I'll run pnpm nx run-many -t test --all to see what happens.

Expected behaviour:
Codex should:

  • either detect that an interactive prompt is blocking and find a solution (e.g. add --force or --yes to pnpm install),
  • or warn that the installation cannot be automated, rather than remaining blocked.

Environment:

  • Codex v0.39.0
  • Models tested: gpt-5 medium, other variants
  • Nx + pnpm project

Activity

  1. added
    bug
    on Sep 19, 2025
  2. Ray-kong commented on Oct 11, 2025

    @Ray-kong

    This is sort of fixable by addressing it in agent.MD but it seems like it always get stuck on /review command. it keep defualts to npm test.

    Another thing you can do is to change package.json file so test and coverage always run with --run flag so it only run once.

    "test": "vitest --run", "test:coverage": "vitest --coverage --run",

    Obvisouly this is not the best solution but it works for now.

  3. added
    tool-calls
    on Nov 11, 2025
  4. etraut-openai commented on Jan 17, 2026

    @etraut-openai
    Contributor

    Closing out old bugs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtool-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions