Windows Desktop: in-app terminal fails in Windows native mode; WSL terminal opens but errors when closed
What version of the Codex App are you using (From “About Codex” dialog)?
26.527.31.26
What subscription do you have?
ChatGPT Plus / Pro account (please let me know if the exact plan is needed).
What platform is your computer?
Windows 11 x64 with WSL2 enabled.
What issue are you seeing?
I am seeing two related Codex Desktop integrated-terminal failures on Windows. The behavior differs depending on whether Codex Desktop is configured to run in Windows native mode or WSL mode.
Path 1: Windows native mode
Configuration:
Agent environment: Windows native
Integrated terminal: sidebar / in-app terminal
Actual behavior:
- The Codex Desktop sidebar / in-app terminal cannot be opened.
- Clicking the terminal entry/button does not bring up a usable integrated terminal.
- The chat/thread remains visible, but the built-in terminal panel is unavailable.
Expected behavior:
- In Windows native mode, the sidebar / in-app terminal should open normally.
- The integrated terminal should start in the current thread or project working directory and remain independent from the chat thread lifecycle.
Path 2: WSL mode
Configuration:
Agent environment: Windows Subsystem for Linux
Integrated terminal shell: WSL
Actual behavior:
- The sidebar / in-app terminal can be opened successfully in WSL mode.
- However, closing the terminal triggers an error dialog.
- This makes the terminal lifecycle unreliable: WSL mode gets further than Windows native mode, but terminal close/cleanup fails.
Expected behavior:
- In WSL mode, opening and closing the integrated terminal should be clean and error-free.
- Closing the terminal panel should only close the terminal session/panel. It should not produce an error, break the thread, or require restarting Codex Desktop.
Screenshot
<img width="824" height="546" alt="Image" src="https://github.com/user-attachments/assets/9fa1d632-d190-4c63-b0d3-495f2765c294" />
What steps can reproduce the bug?
Reproduction A: Windows native terminal cannot open
- Open Codex Desktop on Windows.
- Configure Codex Desktop to use Windows native mode.
- Open or create a thread/project.
- Try to open the sidebar / built-in integrated terminal.
- Observe that the integrated terminal does not open into a usable terminal session.
Reproduction B: WSL terminal opens but errors on close
- Open Codex Desktop on Windows.
- Configure Codex Desktop to use WSL mode.
- Open or create a thread/project.
- Open the sidebar / built-in integrated terminal.
- Observe that the terminal opens.
- Close the terminal.
- Observe that Codex Desktop shows an error dialog after terminal close.
Why I think these are related
Both symptoms are about Codex Desktop's integrated-terminal lifecycle on Windows:
- Windows native mode fails at terminal startup/open.
- WSL mode succeeds at terminal startup/open but fails during terminal close/cleanup.
This looks like a Windows Desktop terminal lifecycle issue, possibly involving different code paths for native Windows terminal process spawning and WSL terminal process cleanup.
Related issues
These look adjacent but do not seem to cover this exact two-path behavior:
- #25175: AttachConsole failed (Most similar issue).
- #15568: Windows native integrated terminal exit affects thread lifecycle.
- #18506: Windows + WSL integrated terminal/path handling issues.
- #12478: Clicking Stop on running terminals in Codex app does not close them.
- #13756: Terminal panel does not automatically close on shell exit.
- #23189: Windows + WSL project terminal tries to cd into malformed WindowsApps/
\\wsl$path. - #14461: Windows Codex cannot start when WSL mode and
terminalShell=wslare enabled.
Additional information
If helpful, I can provide:
- the current
config.tomldesktop settings, - Codex Desktop logs around the terminal open/close attempts,
- the WSL distro name and version.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗