Codex Desktop: closing in-app terminal navigates to blank/new session instead of current thread

Open 💬 1 comment Opened Jun 14, 2026 by brandol52

What variant of Codex are you using?

Codex Desktop App on Windows, using the integrated in-app PowerShell terminal.

Environment

  • OS: Microsoft Windows 11 Pro, version 10.0.26200, 64-bit
  • Codex CLI/runtime: codex-cli 0.139.0 / windows-x86_64
  • Shell in integrated terminal: PowerShell 7.6.2
  • codex doctor --summary: 17 ok, 1 idle, 1 notes, 0 warn, 0 fail

What issue are you seeing?

Closing the integrated in-app terminal appears to navigate away from the current active Codex thread/session and lands on a blank/new session screen. The original thread is not gone, but the user has to use the back arrow to return to the previous chat/session.

This feels like a desktop UI/session-navigation bug: closing the terminal panel should return focus to the current thread or hide the terminal, not navigate the app away from the current conversation.

Steps to reproduce

  1. Open an existing Codex Desktop thread on Windows.
  2. Open the in-app terminal for that thread.
  3. Close the in-app terminal using its close control.
  4. Observe that Codex navigates to a blank/new session screen instead of staying in the current thread.
  5. Use the back arrow to return to the original thread.

Expected behavior

Closing the integrated terminal should only close/hide the terminal panel and leave the current Codex thread/session active and visible.

Actual behavior

Closing the integrated terminal navigates away from the active thread to a blank/new session screen. The thread can be recovered with the back arrow, but this is surprising and makes it easy to think the current chat/session was lost.

Additional information

I checked local config and did not find an exposed setting for terminal close behavior. Relevant config values:

[desktop]
integratedTerminalShell = "powershell"
runCodexInWindowsSubsystemForLinux = false
hotkey-window-projectless-default-enabled = false
followUpQueueMode = "queue"

The terminal itself appears to run normally; this report is specifically about the UI/navigation behavior when closing the terminal panel.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗