@openai/codex-sdk install docs/package metadata omit runtime CLI dependency

Open 💬 0 comments Opened Jun 1, 2026 by bar-d

What happened?

The TypeScript SDK README says to install only the SDK package:

npm install @openai/codex-sdk

The quickstart then constructs new Codex(). However, the SDK runtime resolves the CLI package with:

moduleRequire.resolve("@openai/codex/package.json")

and throws if @openai/codex and its optional platform dependencies are not installed:

Unable to locate Codex CLI binaries. Ensure @openai/codex is installed with optional dependencies.

The SDK package metadata currently has no dependencies, peerDependencies, or optionalDependencies entry for @openai/codex, so installing @openai/codex-sdk alone appears insufficient for the README quickstart.

Expected behavior

Either the SDK package should declare the required runtime CLI dependency relationship, or the README installation section should explicitly tell users to install @openai/codex alongside @openai/codex-sdk before using new Codex().

Additional context

I searched open issues and PRs for terms including Unable to locate Codex CLI binaries, @openai/codex-sdk dependency, and related install/package metadata queries, and did not find an existing open item that appears to cover this SDK install mismatch.

View original on GitHub ↗