Skip to content

Codex unable to run simple npm commands on the workspace #5925

Closed

Description

@urecio

What version of Codex is running?

codex-cli 0.50.0

What subscription do you have?

Plus

Which model were you using?

gpt-5-codex

What platform is your computer?

MacOS x64 (Ventura)

What issue are you seeing?

I have asked the agent to run commands like "npm run dev", and they always get "failed in sandbox: Operation not permitted"

What steps can reproduce the bug?

Uploaded thread: 019a30d4-ea41-71c1-9cac-fc7e230b6921

What is the expected behavior?

No response

Additional information

No response

Activity

  1. github-actions commented on Oct 29, 2025

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  2. samcharles93 commented on Oct 29, 2025

    @samcharles93

    Having the same issue, using nvm, even in full-approval mode still not able to use npm/node commands or go commands. doesn't ask for approval just fails.

  3. facelezzzz commented on Oct 30, 2025

    @facelezzzz

    Having the same issue, “Operation not permitted” when "mvn -q -DskipTests compile"

  4. Mikkolehtimaki commented on Nov 7, 2025

    @Mikkolehtimaki

    Same here, npm: command not found.

    In fact, no programs installed with npm are available to codex. I've tried different options for [shell_environment_policy] to no avail. Everything works with tools like Copilot and Gemini CLI and Claude Code.

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

    bugSomething isn't workingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions