Skip to content

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

Open

Description

@plakhin

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

Activity

  1. added
    app
    on Mar 6, 2026
  2. added
    bug
    on Mar 6, 2026
  3. mehmetozguldev commented on Mar 22, 2026

    @mehmetozguldev

    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.

  4. added
    terminal
    on Apr 25, 2026
  5. arnodirlam commented on Apr 29, 2026

    @arnodirlam

    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](https://github.com/openai/codex/issues/12478)
    
    * [Desktop: stale 'Running N terminals' shown after all processes are already dead #12321](https://github.com/openai/codex/issues/12321)
    
    * [Terminal process stopped but not showing in App #12796](https://github.com/openai/codex/issues/12796)
    
    * [Frequently shows `Waiting for background terminal` even after background terminal has terminated #12033](https://github.com/openai/codex/issues/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugterminal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions