Codex CLI takes around 10 seconds to exit after /exit

Open 💬 2 comments Opened Mar 10, 2026 by XiaoPengYouCode
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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?

  1. Open a terminal on Linux.
  2. Run codex.
  3. Wait for the interactive UI to finish loading.
  4. Type /exit and press Enter.
  5. 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:

  • context7
  • langchain-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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • ##13928

Powered by Codex Action

coderZoe · 3 months ago

same