Skip to content

[Bug] npm latest 0.2.1 Codex install fails with path undefined; main 0.2.2 succeeds #136

Description

@shubing-joe

Summary

lazycodex-ai@latest (0.2.1) reports a successful Codex installation summary, then fails with a Node path type error. The process still exits with status 0. The same command succeeds from current repository main (0.2.2), so the user-facing npm latest tag appears to be behind the fix.

Environment

  • WSL2, Ubuntu 22.04.5 LTS, x86_64
  • Node.js 24.18.0 / npm 11.16.0
  • Bun 1.3.14
  • Codex CLI 0.144.5
  • lazycodex-ai npm latest: 0.2.1
  • oh-my-openagent: 4.19.0

Reproduction

npx --yes lazycodex-ai@latest install --no-tui --codex-autonomous

Observed tail:

Installation Complete
Codex install failed [!]
Codex install failed: The "path" argument must be of type string. Received undefined
Installation failed.

The command exits with status 0 despite the failure.

Controls and root-cause evidence

  1. Setting CODEX_HOME=$HOME/.codex explicitly does not change the failure.
  2. Executing the same OMO 4.19.0 JS payload directly under Bun succeeds:
bun /path/to/oh-my-openagent@4.19.0/dist/cli/index.js \
  install --platform=codex --no-tui --codex-autonomous
[OK] Codex plugin installed -> ~/.codex/config.toml
  1. Running current LazyCodex main at commit 2a03f45f1bbc1d5d0cbf6c1293888e9df3ccbebf (package.json version 0.2.2) with the same arguments succeeds.
  2. After the successful path, codex plugin list reports omo@sisyphuslabs 4.19.0 installed, enabled, and codex doctor --json parses the configuration successfully.

In the published 0.2.1 path, the packaged OMO binary enters the Codex adapter where the package-root lookup uses import.meta.dir; on this entry path, a downstream path call receives undefined. Current LazyCodex main no longer uses that same launcher path.

Expected behavior

  • lazycodex-ai@latest should use the working 0.2.2 launcher path.
  • If the delegated installer fails, LazyCodex should propagate a non-zero exit status instead of printing both success and failure while exiting 0.

Suggested fix

Publish the current 0.2.2 package to npm and add a smoke test that runs the packaged lazycodex-ai install --no-tui --codex-autonomous entrypoint, asserting both the installed plugin and exit status.


This issue or PR was generated by LazyCodex.
Tag: lazycodex-generated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions