Skip to content

Issue: Codex Login Check Fails on Linux (Hardcoded Binary Path & Command Typo) #327

@obriedan

Description

@obriedan

Disclaimer: GeminiCLI wrote the below. The issue is valid, however I am unsure if its assessment of the root cause is, or if its suggested fix is sufficient. -- love the app btw, using it daily.

Description
The application fails to recognize valid Codex CLI login status on Linux
systems. Even after a successful codex login via the terminal, the UI
continues to report that the user is not logged in and prompts an incorrect
login command.

Root Causes
There are two primary issues in the current implementation of the YOKE adapter
layer:

  1. Hardcoded Binary Path: In lib/yoke/index.js, the checkCodex and
    checkInstalled functions use a hardcoded path specifically for the Darwin
    (macOS) ARM64 package (@openai/codex-darwin-arm64). This causes the auth
    check to fail on Linux and other architectures because the binary is never
    found.
  2. Incorrect Login Command: In lib/sdk-bridge.js, the loginCommand provided
    to the UI is hardcoded as codex --login. The correct command for the Codex
    CLI is codex login.

Technical Details

  1. lib/yoke/index.js
    The current check is hardcoded to a Mac-specific path:

1 var codexBin = path.join(__dirname,
"../../node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/
codex/codex");
This should instead use the dynamic findCodexPath() helper already defined in
lib/yoke/codex-app-server.js or fallback to checking the system PATH.

  1. lib/sdk-bridge.js
    The UI prompt uses an invalid flag:

1 loginCommand: session.vendor === "codex" ? "codex --login" : session.vendor
+ " login",

Steps to Reproduce

  1. Install Codex on a Linux environment.
  2. Run codex login and authenticate successfully.
  3. Start a new session in the application and select Codex as the vendor.
  4. The application returns an "Auth Required" error even though the CLI is
    authenticated.
  5. The UI suggests running codex --login, which is an invalid command.

Suggested Fix

  1. Refactor Binary Discovery: Move findCodexPath() to a shared utility or
    export it from codex-app-server.js. Update lib/yoke/index.js to use this
    helper.
  2. Add System Path Fallback: Update checkCodex to also attempt running codex
    login status directly if the node_modules binary isn't found, allowing it
    to work with globally installed versions of the CLI.
  3. Fix Command Typo: Update the loginCommand string in lib/sdk-bridge.js to
    codex login.

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