Codex CLI takes around 10 seconds to exit after /exit
What version of Codex CLI is running?
codex-cli 0.113.0
What subscription do you have?
Third-party services
Which model were you using?
gpt-5.4 high
What platform is your computer?
Linux 6.17.0-1012-oem x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Ghostty 1.2.3
What issue are you seeing?
After launching codex and then entering /exit, the process does not terminate promptly. In my case, it takes around 10 seconds to exit, and in one reproduction it was still running after 10 seconds.
This makes the CLI feel unresponsive even when I am only trying to leave the session.
What steps can reproduce the bug?
What steps can reproduce the bug?
- Open a terminal on Linux.
- Run
codex. - Wait for the interactive UI to finish loading.
- Type
/exitand press Enter. - Observe that the process does not exit immediately and takes around
10 seconds.
What is the expected behavior?
The interactive Codex CLI should exit almost immediately after /exit, without a long delay.
Additional information
I reproduced this in Ghostty 1.2.3 on Linux.
In this environment, Codex also shows MCP servers configured during startup, including:
context7langchain-docs
This may or may not be related, but I am including it in case the slow shutdown is caused by MCP cleanup or shutdown handling.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗