You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Multiple external command prompt windows pop up when running Codex CLI in PyCharm terminal on Windows #49431
On Windows, when I run Codex CLI inside the PyCharm integrated terminal and start a conversation, it repeatedly spawns multiple external command prompt (CMD/PowerShell) popup windows. These extra windows steal focus and seriously interrupt the workflow.
From the codex doctor report, I noticed some critical anomalies:
The terminal is incorrectly identified as "Apple Terminal" on Windows (terminal.env -> terminal: Apple Terminal).
The terminal height is only 16 rows (recommended >= 24), which might trigger unexpected TUI redrawing logic.
The console code page is 936 (GBK), which might cause encoding issues.
What steps can reproduce the bug?
Open PyCharm on Windows.
Open the built-in Terminal (set to PowerShell or CMD).
Run codex to start the CLI.
Initiate a conversation (e.g., type a prompt or let it execute a command).
Observe that multiple external command prompt windows pop up on the screen.
What is the expected behavior?
Codex CLI should run entirely within the PyCharm terminal without spawning any external/separate command prompt windows. Any background command execution should be handled silently or within the same terminal context.
Additional information
The issue might be related to how Codex CLI spawns sub-processes on Windows when the terminal environment is misidentified as "Apple Terminal". It seems to be missing the CREATE_NO_WINDOW flag or equivalent when spawning child processes on Windows under this specific misidentified environment.
Activity
github-actions commentedon Sep 30, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
zdd commentedon Sep 30, 2026
This is simply terrible. You can't input anything on the CLI at all. You guys should fix this problem as soon as possible.