fix readme install instructions causing EEXIST error#97
Conversation
📝 WalkthroughWalkthroughreadme.md updated to replace openai codex cli package references with codex-multi-auth. installation steps and command examples changed from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| ### Option A: Standard install | ||
|
|
||
| ```bash | ||
| npm i -g @openai/codex | ||
| npm i -g codex-multi-auth | ||
| ``` |
There was a problem hiding this comment.
no windows filesystem / token safety context — org policy violation
per our merge policy, every change to oc-chatgpt-multi-auth must explain how it defends against windows filesystem concurrency bugs and token leakage. this pr removes the separate @openai/codex install step, which directly affects how the codex binary lands on disk. on windows, having two npm globals race to write the same binary path is exactly the kind of concurrency footgun we track — the eexist fix is correct, but the pr description and docs should explicitly state:
- bundling removes the binary race on windows (no concurrent
npm iworkers writing the same path) - no token files are created or moved by this install change
- no regression test covers the eexist scenario under windows file locking
please add a sentence in the pr body (or a code comment in the relevant install script) covering these points before merge.
Rule Used: What: Every code change must explain how it defend... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 50-54
Comment:
**no windows filesystem / token safety context — org policy violation**
per our merge policy, every change to oc-chatgpt-multi-auth must explain how it defends against windows filesystem concurrency bugs and token leakage. this pr removes the separate `@openai/codex` install step, which directly affects how the `codex` binary lands on disk. on windows, having two npm globals race to write the same binary path is exactly the kind of concurrency footgun we track — the eexist fix is correct, but the pr description and docs should explicitly state:
- bundling removes the binary race on windows (no concurrent `npm i` workers writing the same path)
- no token files are created or moved by this install change
- no regression test covers the eexist scenario under windows file locking
please add a sentence in the pr body (or a code comment in the relevant install script) covering these points before merge.
**Rule Used:** What: Every code change must explain how it defend... ([source](https://app.greptile.com/review/custom-context?memory=637a42e6-7a78-40d6-9ef8-6a45e02e73b6))
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
No issues found across 1 file
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 77-81: Add a docs regression test that parses the README command
snippets and asserts they match the CLI usage output from printUsage in
lib/codex-manager.ts (call printUsage/programmatic usage generator and compare
expected tokens like "codex auth login", "codex auth status", "codex auth
check", "codex auth forecast --live"); place the test under the docs/tests suite
and fail CI when mismatches occur. Also update the README install flow around
the global install steps to include a short Windows stale-shim note explaining
how to run where codex, remove stale global shims from PATH, and re-run npm i -g
to avoid path collisions. Ensure the test references printUsage() explicitly and
the README update points to the same command strings validated by the test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ca0ebb9d-197b-493c-ad63-b0414b347416
📒 Files selected for processing (1)
README.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Greptile Review
🔇 Additional comments (1)
README.md (1)
77-81: good switch tocodex auth statusand package install guidance.this matches the actual cli command routing and help text in
lib/codex-manager.ts:1-50andlib/codex-manager.ts:1-30. concurrency risk: none here because this is docs-only.Also applies to: 96-100
| 1. Install global package: | ||
| - `npm i -g codex-multi-auth` | ||
| 2. Run first login flow with `codex auth login` | ||
| 3. Validate state with `codex auth list` and `codex auth check` | ||
| 3. Validate state with `codex auth status` and `codex auth check` | ||
| 4. Confirm routing with `codex auth forecast --live` |
There was a problem hiding this comment.
add a small docs regression guard and a windows stale-shim note.
please add a regression test that validates README command snippets against the CLI usage surface (for example against printUsage output in lib/codex-manager.ts:1-30). also add a windows edge-case note for stale global shims/path collisions (e.g., where codex and cleanup guidance) near this install flow. this avoids recurrence of install-command drift.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 77 - 81, Add a docs regression test that parses the
README command snippets and asserts they match the CLI usage output from
printUsage in lib/codex-manager.ts (call printUsage/programmatic usage generator
and compare expected tokens like "codex auth login", "codex auth status", "codex
auth check", "codex auth forecast --live"); place the test under the docs/tests
suite and fail CI when mismatches occur. Also update the README install flow
around the global install steps to include a short Windows stale-shim note
explaining how to run where codex, remove stale global shims from PATH, and
re-run npm i -g to avoid path collisions. Ensure the test references
printUsage() explicitly and the README update points to the same command strings
validated by the test.
fix readme install instructions causing EEXIST error
hey, saw issue #95 and the problem is pretty clear.
the readme says to install @openai/codex first, but codex-multi-auth also publishes a codex binary so npm throws EEXIST.
also fixed the auth commands - the official codex cli uses auth status now, not auth list.
changes:
tested locally and install works without collision now. let me know if you need anything else!
Summary by cubic
Fix README install steps to avoid npm EEXIST by removing the global
@openai/codexinstall, sincecodex-multi-authalready provides thecodexbinary. Updated command examples to usecodex auth statusinstead ofauth listand simplified verification steps.Written for commit a823684. Summary will update on new commits.
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
this pr fixes the
EEXISTinstall collision (issue #95) by removing the redundantnpm i -g @openai/codexstep and updates several verification commands fromcodex auth listtocodex auth statusacross the readme. the core fix is correct —codex-multi-authbundles its owncodexbinary, so installing@openai/codexseparately causes a binary path conflict.key points:
codex auth list→codex auth statusswap in verification flows is consistent with how the command toolkit table already distinguishes the two commandscodex auth listremains in the command toolkit table (line 119) without a note explaining why it was removed from verification steps — worth a clarifying comment so users don't confuse the two commandsConfidence Score: 3/5
Important Files Changed
@openai/codexinstall step and replacesauth listwithauth statusin verification flows; changes are directionally correct but the pr is missing required windows filesystem / token safety reasoning per org policy, andcodex auth listremains in the command toolkit table without clarification of its relationship toauth statusSequence Diagram
sequenceDiagram participant U as User participant NPM as npm participant CMA as codex-multi-auth (binary) participant FS as ~/.codex/ Note over U,FS: Before this PR (caused EEXIST) U->>NPM: npm i -g @openai/codex NPM->>FS: writes codex binary U->>NPM: npm i -g codex-multi-auth NPM-->>FS: EEXIST — codex binary already exists Note over U,FS: After this PR (single install) U->>NPM: npm i -g codex-multi-auth NPM->>FS: writes codex binary (bundled) U->>CMA: codex auth login CMA->>FS: writes token files U->>CMA: codex auth status CMA-->>U: runtime summary U->>CMA: codex auth check CMA-->>U: health check resultPrompt To Fix All With AI
Last reviewed commit: a823684
(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used: