[codex-cli error after upgrading to 0.121.0] Error: thread/start failed during TUI bootstrap
Resolved 💬 7 comments Opened Apr 16, 2026 by fengxin-zhxx Closed Apr 16, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.121.0
What subscription do you have?
pro
Which model were you using?
gpt-5.4
What platform is your computer?
linux x64
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
Everything works correctly with version 0.118.0.
After upgrading to 0.121.0, running codex in the terminal fails with the following error:
Error: thread/start failed during TUI bootstrap
What steps can reproduce the bug?
npm install -g @openai/codex@0.121.0
codex
What is the expected behavior?
_No response_
Additional information
_No response_
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I'd normally ask you to use
/feedbackto upload your logs, but if it crashes at launch, that's not possible. You can look at the logs yourself, and it might give you a clue as the cause of the crash. Look at the contents of~/.codex/log/codex-tui.log. It's possible that there's some corrupt state in the~/.codexdirectory. You could try temporarily renaming it and see if you can launch without crashing.I investigated this with Codex and found the root cause.
In 0.121.0, Codex calls
flock()on~/.codex/installation_idduring TUI bootstrap. In my environment,~/.codexis stored on a mounted workspace path rather than a local disk path, and that storage does not supportflock(), so it returnsENOSYSand causesError: thread/start failed during TUI bootstrap.I verified that 0.121.0 works again if I either move
~/.codexto a local filesystem, or keep~/.codexwhere it is but makeinstallation_ida symlink to a file on a local filesystem.still see this issue from 120.0 onwards, ~/.codex/installation_id is local for me
In my case, I do mount the .codex folder in WSL environment to make environment consistent with Codex App.
same problem here in a dev container
In my case I was able to fix it by chown recursive of the .codex folder