Skip to content

Codex subscription login fails under Node 26.0.0 with JSON parse error #4652

@fitchmultz

Description

@fitchmultz

What happened?

ChatGPT Plus/Pro Codex subscription login fails when I launch pi with Node 26.0.0.

Failed to login to ChatGPT Plus/Pro (Codex Subscription): Unexpected token ', "d�5��"... is not valid JSON

Same pi install and same OAuth flow work with Node 26.1.0.

Steps to reproduce

  1. Launch pi with Node 26.0.0 explicitly:
    /path/to/node-26.0.0/bin/node "$(command -v pi)"
  2. Run /login.
  3. Select Use a subscription.
  4. Select ChatGPT Plus/Pro (Codex Subscription).
  5. Complete the browser login.
  6. pi shows the JSON parse error above.

Control:

/path/to/node-26.1.0/bin/node "$(command -v pi)"

Repeating the same /login flow with Node 26.1.0 succeeds and saves credentials.

Expected behavior

Codex subscription login should complete successfully, or pi should show a clear runtime-specific diagnostic for affected Node versions.

Version

  • pi: 0.75.0
  • also observed with pi 0.74.1 before narrowing this to Node 26.0.0
  • failing runtime: Node v26.0.0, process.versions.undici=8.0.2
  • working runtime: Node v26.1.0, process.versions.undici=8.2.0
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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