[macOS] Background task progress repeatedly brings Codex 26.818 to the foreground
What version of the Codex App are you using (From “About Codex” dialog)?
26.818.41509 (CFBundleVersion 6962)
What subscription do you have?
Not relevant to the reproduction; this is macOS window-activation behavior.
What platform is your computer?
macOS 26.6.2 (build 25G83); Darwin 25.6.0 arm64 arm
What issue are you seeing?
While one or more normal tasks continue running in the background, Codex repeatedly becomes the focused application when background progress updates arrive. This steals focus from whichever other macOS application I am actively using.
The tasks themselves continue running normally. The problem is the unsolicited foreground activation, not a task failure.
What steps can reproduce the bug?
- Start a task in Codex Desktop and leave it running.
- Switch to another macOS application and continue working there.
- Wait for the background task to produce progress updates.
- Observe that Codex becomes the focused application even though there was no click, Dock activation, notification interaction, or explicit request to bring it forward.
- Switch back to the other application. Later progress updates can cause Codex to take focus again.
I reproduced this with Stage Manager disabled. As a control, the local Codex Guardian automatic recovery/keepalive behavior was disabled, Codex was fully restarted, and the focus stealing still reproduced. This makes that local recovery mechanism an unlikely explanation, but does not identify the root cause.
What is the expected behavior?
Background tasks should continue running and delivering progress without changing the current foreground application or keyboard focus on macOS. Pausing or closing background tasks is not an acceptable workaround.
Additional information
Sanitized diagnostic observations:
- App-level diagnostic state showed
rendererWindowFocused=false; roughly one second later, when a background progress update arrived, it changed torendererWindowFocused=true. - Stage Manager was off during reproduction.
- Logs contained periodic Browser Use PiP metadata activity, but I did not observe the fixed
Refreshing managed Computer Use service for PiPrefresh loop described in #37115. - No project content, prompts, thread/account identifiers, host identifiers, full local paths, or credentials are included here.
Related issues and differences:
- #33775 reports a similar focus-stealing symptom on version 26.715, but it was closed because the reporter had other
launchctltasks that could have caused the behavior. In this reproduction, the local Guardian recovery/keepalive behavior was disabled and Codex was fully restarted, but the issue persisted. - #37115 reports focus stealing on version 26.730 involving Stage Manager and a Computer Use PiP refresh loop. Here, Stage Manager was disabled and the observed logs did not contain that same fixed refresh-loop message, so this may be related but is not an identical reproduction.
I am reporting only the observed correlation between a background progress update and the focus-state transition; I do not yet know which component initiates the activation.
1 Comment
Correction after further local investigation:
I confirmed that both the focus stealing and the relaunch after quitting were caused by two stale, locally submitted
launchctlrestart jobs (com.openai.codex.restart.*). They repeatedly invokedopen -b com.openai.codex.The local Guardian automation also had unreliable application-running detection. It has now been changed to detect the launchd application job reliably, open the app in the background, limit recovery attempts, and no longer use
launchctl submit.After removing the stale jobs and fixing the Guardian automation, neither focus stealing nor automatic relaunch has recurred through multiple observation rounds and normal use.
This report was therefore caused by local automation and is not a confirmed Codex Desktop defect. Apologies for the noise, and thank you to the maintainers.