Skip to content

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

Closed

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

Activity

  1. added
    app
    on Mar 23, 2026
  2. added
    bug
    windows-os
    on Mar 23, 2026
  3. PratikCreates commented on Mar 23, 2026

    @PratikCreates
    Author

    Added screenshot contexts

  4. lifu963 commented on Apr 24, 2026

    @lifu963

    I meet this bug too.

  5. added
    terminal
    on Apr 24, 2026
  6. waltsun commented on Jul 9, 2026

    @waltsun

    similar bug.
    in my case, it will jump to the "new thread" screen, but the prior conversation still exists and is running.

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

    appbugterminalwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions