Codex CLI gets stuck with no welcome message and broken keyboard shortcuts
What version of Codex is running?
codex-cli 0.30.0
Which model were you using?
gpt-5
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What steps can reproduce the bug?
- Run codex from terminal.
- Normally, a welcome message appears, but in this case nothing shows up.
- The CLI appears stuck in this state.
- Keyboard shortcuts stop working properly (e.g., Backspace inserts a space, exit shortcuts don’t work).
What is the expected behavior?
- Codex CLI should show the standard welcome message after running codex.
- Keyboard shortcuts (Backspace, Ctrl+C, etc.) should function normally.
- The user should be able to exit the session cleanly.
What do you see instead?
- No welcome message.
- CLI stuck in an unresponsive mode.
- Backspace becomes Space.
- Exit shortcuts don’t work, so I can’t quit normally.
Instead of responding to arrow keys, the CLI outputs raw escape sequences:
Additional information
Issue happens randomly, not always. Restarting the terminal doesn’t fix it. Reinstalling Codex CLI also doesn’t solve the problem. I also experienced this bug in a previous version of Codex CLI.
Is there a clean repro way? this will help a lot.
I had a similar issue! The problem was permission-related - Codex couldn't create session files due to directory ownership issues.
Quick fix to try: sudo chown -R $USER:$USER ~/.codex/sessions/
What to check:
- Look at ~/.codex/log/codex-tui.log for "Permission denied" errors
- Check if ~/.codex/sessions/ directories have correct ownership
This happens when session directories get created with root permissions, preventing Codex from writing rollout files. The ownership fix usually resolves the stuck startup and keyboard issues.
Is there a clean repro way? this will help a lot.
I don’t have a clean reproducible way yet — the issue happens randomly. Sometimes codex starts normally, other times it gets stuck (screenshot above). Restarting the terminal doesn’t help, reinstalling CLI also doesn’t help.
The only thing that consistently fixes it (at least temporarily) is restarting Windows.
I’ll keep monitoring to see if I can find a consistent trigger.
I had a similar issue! The problem was permission-related - Codex couldn't create session files due to directory ownership issues.
Quick fix to try: sudo chown -R $USER:$USER ~/.codex/sessions/
What to check:
- Look at ~/.codex/log/codex-tui.log for "Permission denied" errors
- Check if ~/.codex/sessions/ directories have correct ownership
This happens when session directories get created with root permissions, preventing Codex from writing rollout files. The ownership fix usually resolves the stuck startup and keyboard issues.
Thanks for the tip! I do see a .codex folder on Windows as well. The CLI isn’t stuck right now, but if the bug happens again I’ll check the log/codex-tui.log and try looking into the sessions directory permissions. Will update here if I find anything.
I encountered the same issue in the Windows environment, but in my case this problem occurs consistently. The codex-tui.log shows no exception logs at all - it doesn't even output any logs. Only when I rolled back the codex version to 0.22.0 did it work normally.
I have the same issue with verison 0.34.0. Successfully logged in using subscription plan, no welcome message, Ctrl-C don't work, I should write prompts, on Enter is no response and I can write another prompt. /status shows no tokens send or received. Downgrade to 0.22.0 helps
Do either of you have MCP servers, by chance?
Do either of you have MCP servers, by chance?
I don't use mcp server
Do either of you have MCP servers, by chance?
I didn't use MCP either
The latest version 0.36.0 is working again
0.36.0 has the same issue for me, but I have resolved the issue!
As suggested in another thread with the same problem (affecting both CLI and the Codex extension for VS Code), I disabled the execution of bash.exe via the Windows security policy (gpedit).
After doing this, Codex CLI now uses powershell and works perfectly – no more issues with being stuck or broken keyboard shortcuts.