Skip to content

Thread closes when PowerShell integrated terminal exits (Windows native agent) #15568

@PratikCreates

Description

@PratikCreates

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

26.313.5234.0

What subscription do you have?

Pro/Go

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

In the Codex Windows app using the Windows native agent environment with PowerShell as the integrated terminal shell, executing exit in the terminal closes the entire thread. The thread lifecycle appears coupled to the shell process, causing the chat session to terminate when PowerShell exits.

What steps can reproduce the bug?

Configuration:
Agent environment: Windows native
Terminal: Integrated terminal
Shell: PowerShell

Steps to Reproduce:
Open Codex Windows app
Open any project
Start or continue a thread
Open the integrated terminal within the thread
Run exit in the terminal (PowerShell or other shell)

What is the expected behavior?

Expected behavior:
Exiting PowerShell should terminate only the shell process. The thread should persist with full chat history and remain usable.

Actual behavior:
The entire thread closes immediately after exit, and the UI resets to a new thread.

Screenshots explanation
First image:
Shows the integrated PowerShell terminal inside an active Codex thread. The command exit is executed (PS ... > exit). This demonstrates the exact trigger condition within the correct environment (Windows native agent + PowerShell).
Image

Second image:
Immediately after running exit, the interface resets to the “New thread” screen. The prior conversation context is no longer visible or recoverable, confirming that the thread lifecycle is terminated alongside the shell process.
Image

Additional information

Impact:

Loss of active context
Interrupts development workflow
Forces recreation of threads
Unexpected binding between agent shell lifecycle and thread lifecycle

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingterminalIssues related to the in-app terminalwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions