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

Resolved 💬 51 comments Opened Sep 19, 2025 by damtt Closed Mar 13, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

51 Comments

xylik · 10 months ago

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.

dissorial · 10 months ago

Same exact setup and issue here as @xylik

wbdb · 10 months ago

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

tm65 · 10 months ago

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

charanduggina · 9 months ago

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.

Hucent · 9 months ago

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 · 9 months ago

It works fine on 0.42

paulpv · 9 months ago

I am seeing this problem in 0.45

stef4ik · 9 months ago

Problem still exists in 0.46.0

Nacho-Larreta · 8 months ago

+1 It's really frustrating this issue

RW21 · 8 months ago

It also happens when I switch between API keys.

realtebo · 7 months ago

today happening when switching FROM api key to normal account

vxtls · 7 months ago

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

zeronycs · 7 months ago

Same problem here, happened just now

mironnn · 7 months ago

the same

tthrelk93 · 7 months ago

same problem, just started happening to me

rcanepa · 7 months ago

I'm being affected by the same issue now

Bailuer · 7 months ago

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

pelloempire1 · 7 months ago

same

sharkwedy · 7 months ago

the same

rcanepa · 7 months ago

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

pelloempire1 · 7 months ago

it was working since last 0200 am so idk

vxtls · 7 months ago
Something broke on the OpenAI side of things; I tested different keys and tools; same response everywhere

<img width="723" height="644" alt="Image" src="https://github.com/user-attachments/assets/7f878f86-f404-455b-a5c4-b055e02ce9e2" />

MoFusion01 · 7 months ago

just gotta wait it out :D

etraut-openai contributor · 7 months ago

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.

kyle-mcr · 7 months ago

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"
  }
}
vxtls · 7 months ago

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

dheeraj07 · 7 months ago

Facing the same issue!

itsAR-VR · 7 months ago

can users facing this issue get some kind of compensation?

luboda · 7 months ago

■ {
"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

sunitghub · 7 months ago

Seeing it now 0.73.0. Starts happening after a few interactions:

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

rexfng · 7 months ago

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

etraut-openai contributor · 7 months ago

There is an active incident. It's a server-side issue, so upgrading or downgrading the client will not resolve it. The codex team is working on a fix. I'll post updates to #8120 as they become available.

bvalerin · 7 months ago

Already working for me!

vxtls · 7 months ago

it still doesn't work for me

<img width="324" height="319" alt="Image" src="https://github.com/user-attachments/assets/8595fe63-7ad9-4576-9c22-54d144bec695" />

mvlvigo · 7 months ago

Same error here but happy to hear that they are already working on it :trophy:

<img width="491" height="71" alt="Image" src="https://github.com/user-attachments/assets/5523d6f1-aa98-402b-8c8f-08ef9ebc678a" />

Let's have a break!

rcanepa · 7 months ago

It started working for me now

jlliu-sequoia · 7 months ago

same here, the issue at https://github.com/openai/codex/issues/8120 is marked as resolved, but I am still encountering the same error during use. In addition, newly opened conversations also experience the same issue.

ID 019b2a35-2d0e-79b0-b01d-2bde64d4a28c

alc1986 · 6 months ago

This is still an issue, even though it is consistently marked as 'fixed' by @etraut-openai and others.

etraut-openai contributor · 6 months ago

@alc1986, I haven't marked this as "fixed". I've closed other bug reports as duplicates of this one.

Codex was not designed to allow switching between model providers or login methods within the same session. Supporting this presents some difficult technical hurdles.

We are considering whether to disallow this completely (that is, emit an error if you attempt to resume a session with a different model, model provider, or login method). Alternatively, we may be able to support this in certain limited situations.

We recommend that you avoid using a session across model providers or login methods. If you switch login methods, start a new session.

alc1986 · 6 months ago

@etraut-openai It has been marked as resolved numerous times:

Switching from subscription to API always used to work flawlessly. Blocking users from being able to do this doesn't seem like the most sensible fix for the issue. It means that when users hit usage limits they are no longer able to continue working - and spending more money with OpenAI via the API. Instead, it forces them to stop working or switch to Claude or Gemini.

etraut-openai contributor · 6 months ago

@alc1986, we recently add the ability to purchase more credits for your subscription. You can use these credits to extend your usage without upgrading to a more expensive subscription plan or switching to a different login method. Does that meet your needs?

wbdb · 6 months ago

@etraut-openai Please combine the credits and API topics. It can't be right that you have API credit with OpenAI, that you have credit balance, and both pots expire after 12 months, but you can't use them for similar scenarios. That's just not well thought out.

Alternatively, it should be possible to switch smoothly from login to API method or to activate this fallback automatically.

alc1986 · 6 months ago
@alc1986, we recently add the ability to purchase more credits for your subscription. You can use these credits to extend your usage without upgrading to a more expensive subscription plan or switching to a different login method. Does that meet your needs?

@etraut-openai No, unfortunately not. I still have ongoing sessions I paid for using the API, which I am now not able to transfer over to my subscription. Why on earth are you locking people out of their own work? I pay for the usage regardless. This was reported as a bug in December and marked as fixed. It clearly isn't fixed, and now you're saying it's an intended feature. I see no good reason to stop users switching between the API and subscription model at will.

arjun810 · 6 months ago

I just got the same error when switching from API -> plan.

diogovalada · 5 months ago

What is the status of this?

alc1986 · 5 months ago
What is the status of this?

It seems to have been silently fixed.

pirate · 5 months ago

I'm still getting this error with the latest codex-cli 0.101.0 when switching from ChatGPT login -> API key auth and then trying to resume a session.

■ Error running remote compact task: {
  "error": {
    "message": "The encrypted content gAAA...BA== could not be verified. Reason: Encrypted content
organization_id did not match the target organization.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_encrypted_content"
  }
}
nuitsjp · 4 months ago

When I reach the rate limit on my ChatGPT subscription, I use Azure OpenAI API instead.
Although no errors occur, the mutual sessions are not displayed at all via /resume in the first place.

  • codex-cli 0.104.0
mytradetrust · 4 months ago

Any update on this?

Encrypted content organization_id did not match the target organization.", "type": "invalid_request_error", "param": null, "code": "invalid_encrypted_content"

charley-oai contributor · 4 months ago

This should be fixed in the next Responses API deploy! 🎉