codex icon indicating copy to clipboard operation
codex copied to clipboard

Bug: Codex cannot resume a section after switching login methods (Plus → API Key)

Open damtt opened this issue 3 months ago • 37 comments

What version of Codex is running?

0.39

Which model were you using?

GPT-5 Codex hight / GPT-5 hight

What platform is your computer?

Macbook M1 Max (Darwin 24.5.0 arm64 arm)

What steps can reproduce the bug?

Steps to Reproduce

  1. Log in to Codex with a ChatGPT Plus account.
  2. Work in a section until rate limit is reached.
  3. Log out.
  4. Log back in using an OpenAI API key (different auth method).
  5. Attempt to resume the same section (continue run/stream).

What is the expected behavior?

Section resumes/streams normally after re-authentication, regardless of login method.

What do you see instead?

Streaming fails with HTTP 400 Bad Request and an encryption verification error.

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "The encrypted content gAAA...dQ== could not be verified.",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

Additional information

No response

damtt avatar Sep 19 '25 19:09 damtt

I can nonfirm same behavior on: codex-cli 0.38.0 with WSL(Ubuntu 24.x)

Also i have been using chat gpt plus account with codex-cli and have reached limit. Than I have switched to API key and after trying to resume session i got the same error as damtt.

xylik avatar Sep 21 '25 16:09 xylik

Same exact setup and issue here as @xylik

dissorial avatar Sep 21 '25 22:09 dissorial

I can confirm this with Windows 11 Pro / Ubuntu 24 WSL2 and Codex CLI 0.39.0.

wbdb avatar Sep 22 '25 21:09 wbdb

For me it is switching from API key to chatGPT Plus.

After upgrading to 0.40 I could finally login using chatGPT Plus. Was able to complete a code review without problem. Then this issue happened when asking a follow-up regarding the CR.

I did start with 'codex resume' and picked a session ended few days back.

Windows 11 Pro / Ubuntu 24 WSL2 / Codex CLI 0.40

tm65 avatar Sep 24 '25 01:09 tm65

I had the same issue on MacBook Air M1, using the VSCode Codex extension (version 0.4.14).

Initially, I was using GPT Plus.

When the weekly limit was reached, I tried logging in using an API Key and also using a different Plus account.

Both attempts resulted in the same error:

stream error: stream disconnected before completion: You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors

Suggestion for Plus users: If your limit is reached while using the Codex extension, you can still continue using the Codex web version without quota issues.

charanduggina avatar Sep 24 '25 12:09 charanduggina

It seems the problem comes from sharing the same conversation between different accounts or between the API and an account. If I start a new session from API key, that won't be a problem. Please fix this. I wanna sharing the same conversation.

Hucent avatar Sep 26 '25 01:09 Hucent

It works fine on 0.42

Hucent avatar Sep 28 '25 06:09 Hucent

I am seeing this problem in 0.45

paulpv avatar Oct 09 '25 11:10 paulpv

Problem still exists in 0.46.0

stef4ik avatar Oct 10 '25 22:10 stef4ik

+1 It's really frustrating this issue

Nacho-Larreta avatar Oct 28 '25 00:10 Nacho-Larreta

It also happens when I switch between API keys.

RW21 avatar Oct 28 '25 06:10 RW21

today happening when switching FROM api key to normal account

realtebo avatar Dec 09 '25 16:12 realtebo

This issue is very critical, it can't let me use codex normally, I don't know why it happened, I don't even do anything, it's like it's run for a small while, and it failed with that error fix this as soon as possible

vxtls avatar Dec 16 '25 18:12 vxtls

Same problem here, happened just now

zeronycs avatar Dec 16 '25 18:12 zeronycs

the same

mironnn avatar Dec 16 '25 18:12 mironnn

same problem, just started happening to me

tthrelk93 avatar Dec 16 '25 18:12 tthrelk93

I'm being affected by the same issue now

rcanepa avatar Dec 16 '25 18:12 rcanepa

same prob just now. Is it the server problem that some people get this prob at one time?

Bailuer avatar Dec 16 '25 18:12 Bailuer

same

pelloempire1 avatar Dec 16 '25 18:12 pelloempire1

the same

sharkwedy avatar Dec 16 '25 19:12 sharkwedy

Something broke on the OpenAI side of things; I tested different keys and tools; same response everywhere

rcanepa avatar Dec 16 '25 19:12 rcanepa

it was working since last 0200 am so idk

pelloempire1 avatar Dec 16 '25 19:12 pelloempire1

Something broke on the OpenAI side of things; I tested different keys and tools; same response everywhere

Image

vxtls avatar Dec 16 '25 19:12 vxtls

just gotta wait it out :D

MoFusion01 avatar Dec 16 '25 19:12 MoFusion01

Thanks for reporting. We're aware of the problem, and the team is actively investigating. We're using #8120 to track this problem. I'll post updates there as they become available.

etraut-openai avatar Dec 16 '25 19:12 etraut-openai

Its not working for me as well:

{
  "error": {
    "message": "The encrypted content gAAA...fQ== could not be verified.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_encrypted_content"
  }
}

kyle-mcr avatar Dec 16 '25 19:12 kyle-mcr

It seems more stable now; the error no longer occurs frequently [update EST 15:31] still have error

vxtls avatar Dec 16 '25 20:12 vxtls

Facing the same issue!

dheeraj07 avatar Dec 16 '25 20:12 dheeraj07

can users facing this issue get some kind of compensation?

itsAR-VR avatar Dec 16 '25 20:12 itsAR-VR

■ { "error": { "message": "The encrypted content gAAA...iD0= could not be verified.", "type": "invalid_request_error", "param": null, "code": "invalid_encrypted_content" } } Im now updating maybe fix is already there 0.73

luboda avatar Dec 16 '25 20:12 luboda