openai / openai/codex-plugin-cc

/codex:setup returns 401 "OAuth token has expired" despite fresh ChatGPT login

Open
#41 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Codex CLI works fine from terminal (v0.117.0, auth mode: chatgpt).
Auth.json at ~/.codex/auth.json is populated with valid tokens.
codex launches and runs normally from terminal.

But all plugin commands inside Claude Code (v2.1.88) return:
API Error: 401 - authentication_error - "OAuth token has expired"

This happens even after:

  • Fresh codex login from terminal
  • /reload-plugins in Claude Code
  • pkill -f codex to clear background processes
  • Starting a new Claude Code session

macOS, Apple Silicon, Node v25.6.1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with /codex:setup after a fresh terminal login, then inspect ~/.codex/auth.json and the plugin's authentication handoff to Claude Code. Verify the behavior with the listed Codex CLI and Claude Code versions on macOS; done means plugin commands authenticate successfully without the 401 expired-token error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
authentication, cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.