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
Windows: agent PowerShell commands flash console windows and steal focus #48498
Codex on Windows after a recent update, using PowerShell for agent-run shell commands.
Native Windows sandbox is configured as elevated.
sandbox_private_desktop is not explicitly disabled in the user config.
Steps to reproduce
Start a Codex session on Windows, minimize the main terminal, and work in another application.
Ask the agent to run a harmless PowerShell command such as Write-Output 'Codex terminal check'.
Observe a terminal window briefly appear over the active application and take keyboard focus. This happens repeatedly as the agent runs commands.
A prompt that does not invoke any command does not produce the popup. The flash can appear immediately after submitting a prompt when the agent's first action is a shell command.
Expected behavior
Non-interactive agent commands should run without creating visible console windows or taking focus from the user's current application, even when the main terminal is minimized.
Actual behavior and impact
Console windows flash above other windows and steal focus. This interrupts typing and makes it difficult to use other applications while Codex works. Please give native Windows and PowerShell workflows closer attention in testing. At this point these disruptions make paying for Codex hard to justify: the tool is causing problems instead of helping solve them.
Related reports about visible Windows consoles: #23892, #48059, and #46949. This report adds the command-triggered reproduction and the observation that focus is stolen even when the main terminal is minimized.
Separate status line reminder
Please also revisit the inability to display the current Git branch and PR number in the status line on affected setups. Related open reports: #23968 (branch) and #23473 (PR number).
We're tracking this in #48074, and we're working on a fix. We thought we had it fixed in 0.158.0, but we discovered a few additional code paths that require the same fix.
Activity
github-actions commentedon Sep 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Cooler2 commentedon Sep 26, 2026
Yeah, very annoying. Version downgrading doesn't help. Unusable.
chennqqi commentedon Sep 27, 2026
Can alleviate this problem
winterallen commentedon Sep 28, 2026
no
leike0813 commentedon Sep 28, 2026
Serious bug, Codex is almost unusable on Windows until this bug is fixed.
etraut-openai commentedon Sep 29, 2026
We're tracking this in #48074, and we're working on a fix. We thought we had it fixed in 0.158.0, but we discovered a few additional code paths that require the same fix.