[Bug]: Terminal panel won't automatically close on exit

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

What version of the Codex App are you using (From “About Codex” dialog)?

26.305.950 (863)

What subscription do you have?

Plus

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

When exiting shell with exit command the terminal panel stays open with inactive session. One needs to close/open the panel to activate a new session. It would be nice to automatically close the terminal panel.

What steps can reproduce the bug?

Open terminal panel. Type exit and press Enter key. Or press ^D.

What is the expected behavior?

Shell exits, terminal panel automatically closes.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 5 months ago

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

  • #12478
  • #12321
  • #12796
  • #12033

Powered by Codex Action

mehmetozguldev · 5 months ago

I'm having the same issue. It also shows "Error" indicator instead of closing the terminal, if you try to type something after the exit command - which is not intuitive.

arnodirlam · 4 months ago

Just wanted to chime in here and stress, how much of a quality-of-life improvement this would be at such a small complexity of implementation (assumably). For me, it's just muscle memory by now to close terminals via Ctrl+D and I've configured all my terminals to mirror that and close when the process (shell) inside exits, e.g. Ghotty's quit-after-last-window-closed iTerm2's Quit when all windows are closed. Although, in this case, it's each Terminal tab that should close when its process exits, and the Terminal panel as a whole when the last tab closes (not Codex as a whole, of course).

Potential duplicates detected. Please review them and close your issue if it is a duplicate. Click Stop on running terminals in Codex app does not close them out #12478 Desktop: stale 'Running N terminals' shown after all processes are already dead #12321 Terminal process stopped but not showing in App #12796 Frequently shows Waiting for background terminal even after background terminal has terminated #12033

I've also checked the duplicate issue candidates, and found that none of them is a duplicate, because all of them refer to the little banner about agent-controlled terminals still running, and none is about the user-controlled Terminal panel or tabs.