Getting `Error: account/read failed during TUI bootstrap` error during codex start

Open 💬 7 comments Opened Apr 14, 2026 by distributedlock
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.120.0

What subscription do you have?

API Key

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.12.68-92.122.amzn2023.x86_64 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

Error: account/read failed during TUI bootstrap shows up during codex launch only to be fixed by a logout and login.

What steps can reproduce the bug?

Just simply run codex.

What is the expected behavior?

To start normally per prior versions.

Additional information

_No response_

View original on GitHub ↗

7 Comments

etraut-openai contributor · 3 months ago

Did this happen only once? You mentioned that logging out and logging back in fixed it. Do you have a repro?

colin4k · 2 months ago

I met this same problem.
✘  ~/.hermes  codex
Error: account/read failed during TUI bootstrap

xpfo-go · 2 months ago

same problem.

xpfo-go · 2 months ago

I deleted ~/.codex is working fine now

xpfo-go · 2 months ago

I hit this when using a custom provider with env_key but also setting requires_openai_auth = true.

That setting makes the TUI call account/read during bootstrap. account/read reads Codex's stored
auth state (~/.codex / credential store), not the custom provider env key. In my case codex login
status
showed Logged in using ChatGPT, so startup depended on an old ChatGPT auth cache. If that
cache is stale or missing account details, TUI exits with:

Error: account/read failed during TUI bootstrap

Deleting ~/.codex worked because it removed the stale ChatGPT auth cache.

For custom OpenAI-compatible providers that use env_key, the workaround is to remove
requires_openai_auth = true or set it to false:

  [model_providers.my-provider]
  base_url = "..."
  wire_api = "responses"
  env_key = "MY_PROVIDER_API_KEY"
  # requires_openai_auth = false

Then provide MY_PROVIDER_API_KEY in the shell environment.

So this looks like a stale Codex auth state + requires_openai_auth = true interaction. The TUI/logging
could still be improved because the visible error does not show the real inner account/read failure.

@etraut-openai

RayneYael · 2 months ago
I deleted ~/.codex is working fine now

Thanks, this works but all session logs will be deleted. Is there a more elegant way to deal with this?

949869228 · 2 months ago

Just

rm ~/.codex/auth.json

Then you can re-auth