Skip to content

[Bug]: hermes doctor prints the codex CLI import hint under MiniMax OAuth #27975

@worlldz

Description

@worlldz

Bug Description

I ran into a misleading hermes doctor output in the Auth Providers section.

When OpenAI Codex auth is not logged in and the codex CLI is not installed, doctor shows the optional codex CLI not installed import hint after the MiniMax OAuth line.

That makes the output read like MiniMax-related guidance, even though the hint is only relevant to Codex auth and importing an existing Codex CLI login.

What I expected instead was for that hint to appear directly under OpenAI Codex auth, so the remediation is attached to the correct provider.

Steps to Reproduce

  1. Use a setup where OpenAI Codex auth is not logged in.
  2. Make sure the codex CLI is not installed on PATH.
  3. Run hermes doctor.
  4. Look at the Auth Providers section.
  5. Notice that the optional codex CLI not installed import hint is printed after the MiniMax OAuth line, which makes it read like MiniMax-related guidance.

Expected Behavior

The optional Codex CLI import hint should appear directly under OpenAI Codex auth, since that is the only place where it is relevant.

Actual Behavior

hermes doctor prints the codex CLI not installed hint after the MiniMax OAuth line in the Auth Providers section.

That makes the output read like MiniMax remediation, even though the hint is only about importing an existing Codex CLI login for OpenAI Codex auth.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Report     https://paste.rs/SDdk1
agent.log  https://paste.rs/O6poM

Operating System

Ubuntu on WSL2 (Windows 11)

Python Version

Python 3.12.3

Hermes Version

Hermes Agent v0.14.0 (2026.5.16)

Additional Logs / Traceback (optional)

Relevant doctor output looked like this:

⚠ OpenAI Codex auth (not logged in)
  → No Codex credentials stored. Run `hermes auth` to authenticate.
⚠ Google Gemini OAuth (logged in, ...)
⚠ MiniMax OAuth (not logged in)
  → codex CLI not installed (optional — only required to import tokens from an existing Codex CLI login)

The hint is visually attached to MiniMax even though it belongs to the Codex auth check.

Root Cause Analysis (optional)

In hermes_cli/doctor.py, the codex CLI not installed info line is emitted as a standalone block after all auth-provider status lines have already been printed.

That means it ends up visually attached to the next auth item in the section, which in my repro was MiniMax OAuth.

I prepared a fix that moves this optional hint directly under the OpenAI Codex auth warning when Codex auth is not logged in and the codex CLI is missing.

Proposed Fix (optional)

Attach the optional codex CLI not installed import hint directly to the OpenAI Codex auth warning instead of printing it as a standalone line later in the Auth Providers section.

I also added regression coverage to make sure the hint stays attached to Codex auth and does not appear under MiniMax.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardprovider/minimaxMiniMax (Anthropic transport)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions