codex icon indicating copy to clipboard operation
codex copied to clipboard

[Windows] Auto-hidden taskbar stops appearing when Codex is maximized after update (26.1007.2314.0)

Open programmerLiu0 opened this issue 1 month ago • 26 comments

What version of the Codex App are you using?

Installed Windows package: OpenAI.Codex 26.1007.2314.0 (read from Get-AppxPackage).

What platform is your computer?

Windows 11 25H2, OS build 26200.8037.

What issue are you seeing?

After updating Codex on October 10, 2026, moving the mouse pointer to the bottom edge of the screen no longer reveals the automatically hidden Windows taskbar when Codex is maximized.

The user confirmed that restoring Codex to a smaller, non-maximized window restores normal taskbar behavior. Other applications still reveal the taskbar normally. Codex did not have this problem before today's update; the previous app version is unknown.

What steps can reproduce the bug?

  1. Enable automatic hiding of the Windows taskbar, positioned at the bottom of the screen.
  2. Open Codex and maximize its window.
  3. Move the mouse pointer to the bottom edge of the screen: the taskbar does not appear.
  4. Restore Codex to a smaller window.
  5. Move the mouse pointer to the bottom edge again: the taskbar appears normally.
  6. Compare with other applications: they do not exhibit this problem.

What is the expected behavior?

Moving the mouse to the bottom screen edge should reveal the auto-hidden taskbar with Codex maximized, as it did before the update and as it does in other applications.

Additional information

Related existing report: #45369. This report provides another confirmed occurrence after an update, on package version 26.1007.2314.0.

The symptoms above were reported and confirmed by the user. App package version and Windows build were read locally. The root cause has not been established. No logs, screenshots, or conversation transcript are attached.

programmerLiu0 avatar Oct 10 '26 12:10 programmerLiu0

兄弟我也是这个问题,我还以为我自己出问题了

milesxx1610 avatar Oct 11 '26 16:10 milesxx1610

I'm experiencing the same taskbar symptom in the Windows desktop app. Until recently, moving the mouse pointer to the bottom edge of the screen revealed the auto-hidden Windows taskbar even when the app was maximized. Now it no longer appears when I do this, which makes using the app inconvenient.

kkh9008-hub avatar Oct 12 '26 08:10 kkh9008-hub

估计是它自身的问题,下次正常更新就可以解决了吧

milesxx1610 avatar Oct 12 '26 09:10 milesxx1610

저도요. 작업 표시줄 자동 숨기기가 켜져있을 때, 코덱스 앱을 전체화면으로 켜면 마우스포인터를 아래쪽에 갖다대도 작업 표시줄이 안보여요. 윈도우키를 눌러서 강제로 띄운 뒤, 코덱스를 다시 누르면 마치 코덱스 앱이 작업표시줄보다 앞으로 나와서 가리는 거 같아요.

dhkim-codes avatar Oct 12 '26 11:10 dhkim-codes

Additional confirmed occurrence and Win32 window diagnostics, submitted on behalf of a user who requested reporting this issue.

Installed package version observed from the running desktop executable path: OpenAI.Codex 26.1007.2314.0 (ChatGPT.exe). Windows build was not collected for this occurrence.

Reproduction: enable the bottom taskbar's auto-hide behavior, maximize the Codex desktop window, and move the pointer to the screen's bottom edge. The user sees a vertical window-resize cursor instead of the taskbar appearing. Other applications reveal the taskbar normally.

Read-only Win32 diagnostics while the user had reproduced the failure:

  • IsZoomed(window) = true.
  • GetWindowRect = (0, 0, 1440, 960).
  • Screen bounds and working area reported by System.Windows.Forms.Screen were both (0, 0, 1440, 960).
  • Sending WM_NCHITTEST (0x84) to the desktop window at screen coordinate (720, 959) returned 15 (HTBOTTOM), despite the window being maximized.

Workaround tested:

  1. Trying to reduce the window height with SetWindowPos while it remained maximized left the reported bounds and hit-test result unchanged.
  2. Restoring the window with ShowWindow(SW_RESTORE), then positioning it to fill the screen with a 2-unit gap at the bottom, produced bounds (0, 0, 1440, 958), IsZoomed = false, and WM_NCHITTEST = 0 (HTNOWHERE) at (720, 959).
  3. The user confirmed mouse edge activation of the taskbar then worked. After restarting the app, the user reported that the workaround still worked as long as the window size was not changed.

Coordinates above are as returned by the PowerShell/.NET diagnostic process; physical-pixel equivalence and DPI scaling were not independently established. These observations suggest investigating maximized-window non-client hit testing and auto-hide taskbar edge handling, but the client's internal root cause has not been established. No screenshot, personal paths, logs, or conversation transcript are attached.

gitlizishuohub avatar Oct 13 '26 08:10 gitlizishuohub

I'm experiencing the same issue on Windows 11 with Codex version 26.1007.2314.0.

When Codex is maximized, moving the pointer to the bottom edge does not reveal the auto-hidden taskbar. Restoring the window fixes it, and other applications work normally.

This is not F11 fullscreen mode: pressing F11 enters a separate fullscreen state, and exiting it does not resolve the issue.This affects my daily workflow because I frequently use the taskbar to switch applications.

zangyunyidao avatar Oct 13 '26 09:10 zangyunyidao

no-active-thread-01a13b24-591d-7970-babd-aa2a5615265f same here

newakuma avatar Oct 14 '26 16:10 newakuma

Additional user report on Windows 11, following a recent Codex desktop update.

Observed: When the desktop window is maximized, the Windows taskbar at the bottom of the screen is no longer visible. The user reports that this started after updating Codex. The provided screenshot shows the maximized desktop app, including its custom top menu/title bar, with no Windows taskbar visible at the bottom.

Expected: Normal Windows taskbar behavior should be preserved when the desktop window is maximized; the update should not make the taskbar inaccessible.

Not yet verified for this occurrence: exact Codex version / Windows build, whether Windows taskbar auto-hide is enabled, whether moving the pointer to the bottom edge fails to reveal it, and whether restoring the window fixes the symptom. Those should not be assumed from the screenshot alone.

This looks very similar to the maximized-window/taskbar regression reported here and in #45369. Reporting as an additional affected user instead of opening a duplicate issue. The screenshot contains private chat titles, so it is not reposted publicly without redaction.

cnlove7777777-art avatar Oct 14 '26 19:10 cnlove7777777-art

Adding another user report of the auto-hidden Windows taskbar being inaccessible while the OpenAI/Codex desktop client fills the screen.

Reported behavior With Windows taskbar auto-hide enabled and the client in what the user describes as "full-screen", moving the mouse pointer to the taskbar's screen edge does not reveal it. Expected: the taskbar appears so it can be accessed and used to switch applications.

Environment checked locally

  • Installed Windows package: OpenAI.Codex 26.1007.9446.0. This is the MSIX/package version, not a version copied from the About dialog.
  • Windows 11 Home, version 25H2, OS build 26200.9711, x64.
  • Intel Arc 140T GPU; graphics driver 32.0.101.7026.

Limits of this report The symptom is user-reported. We have not independently distinguished native maximization from a separate fullscreen mode, established the taskbar edge or display topology, tested keyboard/workaround behavior, or isolated a root cause. The first affected app version is unknown.

Could a maintainer please acknowledge whether this occurrence should be tracked under this issue and advise whether a fix or supported workaround is available? If a specific non-sensitive diagnostic is needed, please describe it here.

skdnlunknown avatar Oct 15 '26 06:10 skdnlunknown

Additional reproduction confirmed by an affected user on October 15, 2026.

Environment checked locally

  • Installed Windows package: OpenAI.Codex 26.1007.9446.0 (from Get-AppxPackage).
  • App-reported version: 26.1007.71326, build 20398, production channel.
  • Windows version 25H2, OS build 26200.7623, x64.

Steps and results confirmed by the user

  1. Enable automatic hiding of the Windows taskbar at the bottom of the screen.
  2. Restore Codex to a smaller window, then press Win + Up Arrow to maximize it.
  3. Move the pointer to the screen's bottom edge without clicking.
  4. The taskbar does not appear; the pointer becomes a vertical double-headed resize arrow instead.

The user also confirmed:

  • Pressing the Windows key makes the taskbar appear.
  • Other applications reveal the auto-hidden taskbar normally; Codex is the only application currently showing this failure on this machine.
  • In the initially reported screen-filling state, clicking the bottom edge makes Codex leave that state / return to a smaller window. This last interaction is user-reported; no recording was collected to distinguish a pure click from slight pointer movement during the click.

Expected behavior A normally maximized Codex window should allow mouse activation of the auto-hidden taskbar at the bottom edge, as other applications do.

The explicit Win + Up Arrow reproduction helps distinguish this occurrence from a separate fullscreen mode. Please investigate bottom-edge resize hit testing in the maximized state together with Windows auto-hide taskbar handling. The root cause has not been established.

Submitted at the user's request. No raw logs, screenshots, private conversation contents, local user paths, or account identifiers are attached.

Christina-jpg avatar Oct 15 '26 12:10 Christina-jpg

Additional user-reported occurrence on Windows, reported with the user's authorization.

Desktop app version: 26.1007.21434, build 13901, production channel (read from the app's updater on October 18, 2026).

With the taskbar set to auto-hide, hovering at the bottom edge reveals it in other applications, but not in Codex. In Codex, the pointer instead shows the window-resize cursor, even when the window appears to fill the screen. The exact native maximized/fullscreen state has not been independently measured.

Restoring the window, moving/resizing it slightly, then maximizing again did not resolve the problem, according to the user.

Expected: hovering at the bottom screen edge reveals the auto-hidden Windows taskbar, as it does in other applications.

The updater currently reports restart_required; behavior after completing that restart has not yet been tested. This report does not establish the root cause or claim that the pending update fixes it. No application files were modified. No private logs, screenshots, account details, local paths, or conversation transcripts are attached.

Okyul avatar Oct 18 '26 11:10 Okyul

Taskbar auto-hide still broken in ChatGPT Desktop v26.1016.61520

I'm experiencing the same issue with the latest ChatGPT Desktop release.

System Information

  • OS: Windows 11 Pro
  • Windows Version: 26H2
  • OS Build: 26300.9711
  • Windows Feature Experience Pack: 1000.26100.372.0
  • ChatGPT Desktop Version: 26.1016.61520
  • ChatGPT Release Date: October 22, 2026

Steps to Reproduce

  1. Enable "Automatically hide the taskbar" in Windows.
  2. Maximize the ChatGPT desktop application.
  3. Move the mouse pointer to the bottom edge of the screen.
  4. The taskbar fails to appear.

Observed Behavior

  • ChatGPT maximized: Taskbar does not appear when moving the mouse to the bottom edge.
  • Pressing Windows key: Taskbar appears normally.
  • ChatGPT restored (not maximized): Taskbar auto-hide works correctly.
  • Maximizing ChatGPT again: The issue immediately returns.

Expected Behavior

The Windows taskbar should automatically appear when the mouse pointer reaches the bottom edge of the screen, even when ChatGPT is maximized.

Additional Information

This issue started recently, although I cannot recall the exact date. It may have been introduced by a recent ChatGPT Desktop update. The problem persists in ChatGPT Desktop v26.1016.61520, released October 22, 2026, on Windows 11 Pro 26H2 (OS Build 26300.9711). This appears to be related to how the maximized ChatGPT window interacts with Windows taskbar auto-hide behavior.

Please investigate and address this issue in an upcoming release.

mikegit75 avatar Oct 23 '26 00:10 mikegit75

same bug so frustrating

Windows: auto-hidden taskbar does not appear when Codex is maximized

Environment

  • Application: Codex desktop app for Windows
  • Codex version: 26.1016.62342
  • Build: 21477
  • OS: Windows 11 25H2, x64, build 26200.9711
  • Windows taskbar: positioned at the bottom, automatic hiding enabled

Description

When Codex is maximized, moving the mouse pointer to the bottom edge of the screen does not reveal the automatically hidden Windows taskbar.

The same gesture works normally with maximized File Explorer and browser windows on the same computer.

Steps to reproduce

  1. Enable automatic hiding of the Windows taskbar.
  2. Open the Codex desktop application.
  3. Maximize its window.
  4. Move the mouse pointer to the bottom edge of the screen and wait for the taskbar to appear.
  5. Compare with a maximized File Explorer or browser window.

Expected behavior

The taskbar should appear when the pointer reaches the bottom edge, just as it does with other maximized applications.

Actual behavior

The taskbar remains hidden while Codex is maximized, preventing access through the normal mouse gesture.

When it started

I first noticed this approximately a week ago or possibly earlier. It appears to be a regression, but the exact first affected version is unknown.

Impact

This interferes with switching applications and accessing the taskbar while working in maximized Codex.

Please investigate how the maximized Codex window interacts with Windows taskbar auto-hide and screen-edge activation.

Raichu13 avatar Oct 23 '26 16:10 Raichu13

Why has this not been fixed as yet? It's beyond a hassle. It's enough to have me consider moving back to Claude whose app does not have this problem. Please fix this!

markandrewfrey avatar Oct 23 '26 20:10 markandrewfrey

Still reproducible in desktop app version 26.1021.31345 (released October 23, 2026)

Additional confirmation from an affected Windows desktop-app user, tested on October 24, 2026 after updating via the app's built-in update function.

  • Previous app version: 26.1016.61520 — affected.
  • Updated app version: 26.1021.31345 (release date shown in the app: October 23, 2026) — still affected.
  • Steps: Enable automatic hiding of the Windows taskbar, maximize the desktop app, and move the mouse pointer to the bottom edge of the screen.
  • Actual: The taskbar does not appear while the app is maximized.
  • Comparison: The taskbar appears normally in other applications, including Firefox and Thunderbird.
  • Expected: The taskbar should reveal on pointer contact with the bottom screen edge, even when the desktop app is maximized.

Updating to 26.1021.31345 did not fix the issue. This report is based on the user's observations; the Windows OS build and technical root cause were not independently verified.

lars943 avatar Oct 24 '26 07:10 lars943

Windows seems to treat maximized Codex like a fullscreen app and put the taskbar behind it. This matches what I observed, but I haven't confirmed the exact cause inside Codex.

I made a small helper that tells Windows not to put the taskbar behind Codex. It does not change Codex's files, your existing shortcut, or your taskbar settings.

Setup

  1. Extract the attached ZIP to a folder you will keep in place.
  2. Open Codex normally, then run CodexTaskbarFix.exe once.
  3. Check setup-status.txt for “Installed”. After that, use your usual Codex icon.

The helper starts automatically when Codex starts and exits when Codex fully exits. It has no window or taskbar icon, and nothing is added to login startup. There is no separate helper left running while Codex is closed. Closing Codex to the tray does not count as fully exiting it.

How it works

Setup registers one Windows Task Scheduler task that responds to Codex's existing launch event—not a login or boot event. The helper uses window events to set NonRudeHWND=1 and clear the fullscreen marking, then exits when the Codex process ends.

It does not read chats, use the network, inject code, or request administrator elevation. It writes small local status/error files. Source code is included; the EXE is unsigned.

To remove it, run Remove.vbs, then delete the folder. Do not move the folder while it is registered.

This is an unofficial temporary workaround tested on one Windows 11 x64 PC, including a Codex restart. Setup requires the matching Windows launch event; other configurations may not be supported.

Confirmed working after a Windows reboot. In a 30-second test, the helper used about 23 MB of memory with no measurable CPU usage.

CodexTaskbarFix-v0.2.0.zip

sditr0414 avatar Oct 24 '26 13:10 sditr0414

Same with Windows 11 and test Codex. Annoys

yboiko avatar Oct 24 '26 15:10 yboiko

I can reproduce this on Windows 11 with Codex 26.1021.31345 (Build 21828).

With taskbar auto-hide enabled and Codex maximized, moving the pointer to the bottom screen edge does not reveal the taskbar. Instead, the pointer changes to a vertical resize cursor.

An additional observation: holding the left mouse button at that edge and dragging upward actually shrinks the window, despite it having been maximized.

Restoring and maximizing the window again, as well as quitting and relaunching Codex, did not resolve the issue. Maximized File Explorer and Chrome reveal the taskbar normally under the same Windows settings.

I originally reported this in #57008 and am closing that report as a duplicate to consolidate tracking here. The root cause has not been established.

Jazzwind avatar Oct 26 '26 03:10 Jazzwind

Windows-only workaround: user-tested, complete source and setup included

Update, October 29, 2026 — startup setup revised (1.1). After a Windows reboot, the previous current-user Registry Run entry was still present but the helper was not running. The reason for the missed start is not established. The instructions below now use a Windows Task Scheduler task for sign-in startup. Its direct start was verified, and the affected user confirmed taskbar mouse activation again. A subsequent Windows reboot with the revised task setup has not yet been tested. The C# source and executable are unchanged.

Sharing this at an affected user's explicit request. This separate implementation uses the same Windows Shell approach discussed in the earlier helper comment: NonRudeHWND=1 plus ITaskbarList2.MarkFullscreenWindow(FALSE). That author's event-triggered setup is a different implementation; its reported results should not be treated as validation of this one.

Confirmed behavior: An affected Windows user confirmed that moving the mouse to the bottom screen edge revealed the taskbar again while the app remained maximized. Before applying the helper, the pointer became a vertical resize cursor; the Windows key and other maximized apps still worked. Mouse activation was also confirmed on both displays of a two-monitor setup and after an app restart. This is one user's practical result, not comprehensive display/DPI validation.

This is an unofficial Windows x64 workaround, not an upstream app fix. The app's internal root cause is not established. Local OS/app versions, personal paths, logs, screenshots and chat contents are omitted.

Behavior

  • Targets visible, normally maximized Electron main windows belonging to ...\WindowsApps\OpenAI.Codex_...\app\ChatGPT.exe in the current Windows session.
  • Sets the Shell hint and clears fullscreen marking; removes its own hint when the window is no longer normally maximized and on clean helper shutdown.
  • Uses window events, with a ten-second fallback to discover a restarted app process.
  • Does not modify app files, resize windows, read chats, use networking, inject code, simulate input or change taskbar preferences.
  • With sign-in startup enabled, the helper waits in the background while the app is closed. A local Status.txt records state/errors and may contain process/window identifiers.

Build and run on Windows

  1. Save both complete sources below as Taskleistenfix.cs and Autostart.ps1 in the same writable folder you will keep in place.
  2. If an older helper copy is running or registered, remove it using its original folder's removal instructions first. Do not register copies from different folders.
  3. In PowerShell opened in that folder, review and run the commands below. They compile the helper and run its isolated self-test. The default installs one task named \CodexLocalTaskbarFix and starts it immediately. No administrator privileges or password are needed. Set $enableSignInStartup = $false for a session-only test.
  4. Maximize the app and test the screen edge with the mouse. Read Status.txt if it does not work.
$ErrorActionPreference = 'Stop'
$enableSignInStartup = $true
$folder = (Get-Location).ProviderPath
$source = Join-Path $folder 'Taskleistenfix.cs'
$startup = Join-Path $folder 'Autostart.ps1'
$exe = Join-Path $folder 'Taskleistenfix.exe'
$compiler = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
if (-not (Test-Path -LiteralPath $source)) { throw 'Save Taskleistenfix.cs in this folder first.' }
if ($enableSignInStartup -and -not (Test-Path -LiteralPath $startup)) { throw 'Save Autostart.ps1 in this folder first.' }
if (-not (Test-Path -LiteralPath $compiler)) { throw 'Windows x64 .NET Framework C# compiler not found.' }
& $compiler /nologo /target:winexe /platform:x64 /optimize+ /reference:System.Windows.Forms.dll /reference:System.Drawing.dll ('/out:' + $exe) $source
if ($LASTEXITCODE -ne 0) { throw 'Compilation failed. Stop a running copy before rebuilding it in place.' }
$test = Start-Process -FilePath $exe -ArgumentList '--self-test' -WindowStyle Hidden -Wait -PassThru
if ($test.ExitCode -ne 0) { throw 'Self-test failed; read Status.txt. Startup was not changed.' }
if ($enableSignInStartup) {
    & $startup -Mode Install
} else {
    Start-Process -FilePath $exe -ArgumentList '--watch' -WindowStyle Hidden
}

The sign-in task waits ten seconds after this user's Windows login and runs in that existing interactive session with normal privileges. It has no runtime limit, network requirement or battery restriction. A reported process failure can trigger up to three retries at one-minute intervals. Task Scheduler launches it independently of the app. These are configured settings; sign-in execution after a reboot remains to be confirmed for this revision.

Keep the folder in place. The script refuses to modify a same-name task pointing to a different executable/folder. It removes a legacy Registry Run value only if it points to this exact folder, after the new task is confirmed running. Stop other workarounds that change the same window property first. If security policy blocks the executable or scripts, do not disable that policy for this workaround.

Stop / remove

For a session-only stop, run Taskleistenfix.exe --stop. This requests clean shutdown and removal of the helper's own window hints. Sign-in startup remains configured.

For removal, run the following from the installation folder. It disables and deletes only the matching task, requests a clean helper shutdown, and removes a matching legacy Run value. It keeps the files and leaves a task pointing elsewhere untouched.

& (Join-Path (Get-Location).ProviderPath 'Autostart.ps1') -Mode Remove

Use -Mode Status instead to inspect the task. Diagnostic messages in the startup script are retained in German from the tested local implementation.

Validation / limits

  • Mouse activation with the maximized app, both displays in one two-monitor setup, and an app restart were user-confirmed. Other display and DPI configurations are untested.
  • A clean rebuild and the executable's isolated self-test previously succeeded. The self-test checks set/read/remove of the window property and the Shell COM call on its own unshown window. The C# source and executable bytes are unchanged in this revision.
  • The revised task was registered, read back, started directly, and observed running the helper from the Windows service. The user confirmed taskbar access again. A further Windows reboot has not been tested.
  • Separate F11 fullscreen, other installations and future app versions have not been independently tested. The code applies only to windows reporting IsZoomed=true.
  • A portable ZIP was prepared locally, but this connector cannot attach binaries to an issue. Full reproducible sources and setup commands are supplied here instead.

References: Microsoft Shell behavior, logon trigger, interactive-session logon type.

Complete startup script — save as Autostart.ps1 (MIT license)
[CmdletBinding()]
param(
    [ValidateSet('Install', 'Remove', 'Status')]
    [string] $Mode = 'Status'
)

$ErrorActionPreference = 'Stop'
$taskName = 'CodexLocalTaskbarFix'
$helperPath = [IO.Path]::Combine($PSScriptRoot, 'Taskleistenfix.exe')
$expectedRunCommand = '"' + $helperPath + '" --watch'
$userSid = [Security.Principal.WindowsIdentity]::GetCurrent().User.Value
$service = New-Object -ComObject Schedule.Service
$service.Connect()
$root = $service.GetFolder('\')
$managedTask = $null
foreach ($candidate in $root.GetTasks(1)) {
    if ($candidate.Name -eq $taskName) {
        $managedTask = $candidate
        break
    }
}
if ($null -ne $managedTask) {
    $actions = $managedTask.Definition.Actions
    if ($actions.Count -ne 1 -or $actions.Item(1).Type -ne 0 -or
        $actions.Item(1).Path -ine $helperPath -or
        $actions.Item(1).Arguments -ne '--watch') {
        throw 'Die gleichnamige Aufgabe gehoert zu einem anderen Programm oder Ordner. Sie wird nicht geaendert.'
    }
}

function Remove-MatchingRunEntry {
    $runKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey(
        'Software\Microsoft\Windows\CurrentVersion\Run', $true)
    if ($null -ne $runKey) {
        try {
            if ($runKey.GetValue($taskName) -eq $expectedRunCommand) {
                $runKey.DeleteValue($taskName, $false)
            }
        }
        finally { $runKey.Dispose() }
    }
}

if ($Mode -eq 'Install') {
    if (-not [IO.File]::Exists($helperPath)) { throw 'Taskleistenfix.exe fehlt.' }
    $definition = $service.NewTask(0)
    $definition.RegistrationInfo.Author = [Security.Principal.WindowsIdentity]::GetCurrent().Name
    $definition.RegistrationInfo.Description = 'Startet den lokalen ChatGPT-Taskleistenhelfer bei der Anmeldung dieses Benutzers.'
    # Existing interactive user session, without a password or elevated privileges.
    $definition.Principal.UserId = $userSid
    $definition.Principal.LogonType = 3
    $definition.Principal.RunLevel = 0
    $trigger = $definition.Triggers.Create(9)
    $trigger.UserId = $userSid
    $trigger.Enabled = $true
    $trigger.Delay = 'PT10S'
    $action = $definition.Actions.Create(0)
    $action.Path = $helperPath
    $action.Arguments = '--watch'
    $action.WorkingDirectory = $PSScriptRoot
    $definition.Settings.Enabled = $true
    $definition.Settings.AllowDemandStart = $true
    $definition.Settings.StartWhenAvailable = $true
    $definition.Settings.DisallowStartIfOnBatteries = $false
    $definition.Settings.StopIfGoingOnBatteries = $false
    $definition.Settings.RunOnlyIfIdle = $false
    $definition.Settings.RunOnlyIfNetworkAvailable = $false
    $definition.Settings.ExecutionTimeLimit = 'PT0S'
    $definition.Settings.MultipleInstances = 2
    $definition.Settings.RestartInterval = 'PT1M'
    $definition.Settings.RestartCount = 3
    $managedTask = $root.RegisterTaskDefinition($taskName, $definition, 6, $userSid, $null, 3)
    $null = $managedTask.Run($null)
    $deadline = [DateTime]::UtcNow.AddSeconds(8)
    do {
        Start-Sleep -Milliseconds 250
        $helperRunning = $false
        foreach ($process in [Diagnostics.Process]::GetProcessesByName('Taskleistenfix')) {
            try {
                if ($process.SessionId -eq [Diagnostics.Process]::GetCurrentProcess().SessionId -and
                    $process.MainModule.FileName -ieq $helperPath) { $helperRunning = $true }
            }
            catch [System.ComponentModel.Win32Exception] { }
            catch [InvalidOperationException] { }
            finally { $process.Dispose() }
        }
        $managedTask = $root.GetTask($taskName)
    } while ((-not $helperRunning -or $managedTask.State -ne 4) -and [DateTime]::UtcNow -lt $deadline)
    if (-not $helperRunning -or $managedTask.State -ne 4) {
        throw ('Die Aufgabe wurde registriert, aber ihr Start ist nicht bestaetigt. Ergebnis: ' + $managedTask.LastTaskResult)
    }
    # Remove the previous mechanism only after the scheduled task is running.
    Remove-MatchingRunEntry
}
elseif ($Mode -eq 'Remove') {
    if ($null -ne $managedTask) {
        # Disable first so a failure restart cannot undo a deliberate stop.
        $managedTask.Enabled = $false
    }
    if ([IO.File]::Exists($helperPath)) {
        $stopProcess = Start-Process -FilePath $helperPath -ArgumentList '--stop' -WindowStyle Hidden -PassThru
        $stopProcess.WaitForExit(5000) | Out-Null
        $stopProcess.Dispose()
    }
    if ($null -ne $managedTask) {
        $root.DeleteTask($taskName, 0)
        $managedTask = $null
    }
    Remove-MatchingRunEntry
    Write-Output 'Der eigene Autostart wurde entfernt und der Helfer zum Beenden aufgefordert. Die Dateien bleiben erhalten.'
}

if ($null -ne $managedTask) {
    $definition = $managedTask.Definition
    [PSCustomObject]@{
        Task = $managedTask.Path
        Enabled = $managedTask.Enabled
        State = $managedTask.State
        LastRun = $managedTask.LastRunTime
        LastResult = $managedTask.LastTaskResult
        User = $definition.Principal.UserId
        LogonType = $definition.Principal.LogonType
        RunLevel = $definition.Principal.RunLevel
        TriggerType = $definition.Triggers.Item(1).Type
        TriggerUser = $definition.Triggers.Item(1).UserId
        Delay = $definition.Triggers.Item(1).Delay
        ExecutionTimeLimit = $definition.Settings.ExecutionTimeLimit
        RestartCount = $definition.Settings.RestartCount
        Path = $definition.Actions.Item(1).Path
        Arguments = $definition.Actions.Item(1).Arguments
    } | ConvertTo-Json
}
elseif ($Mode -eq 'Status') { Write-Output 'Keine verwaltete Autostart-Aufgabe vorhanden.' }
Complete C# source — save as Taskleistenfix.cs (MIT license)
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Windows.Forms;

// Local Windows Shell workaround for openai/codex#52877.
// No injection, input simulation, networking, app-file modifications, or window resizing.
// Microsoft's documentation:
// https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist2-markfullscreenwindow
internal static class Program
{
    internal const string Property = "NonRudeHWND";
    internal const string OwnedProperty = "CodexLocalTaskbarFix.Owned.v1";
    internal static readonly string Folder = AppDomain.CurrentDomain.BaseDirectory;
    internal static readonly string StatusPath = Path.Combine(Folder, "Status.txt");
    internal static readonly string Suffix = WindowsIdentity.GetCurrent().User.Value;
    internal static readonly string StopName = "Local\\CodexLocalTaskbarFix.Stop." + Suffix;

    [STAThread]
    private static int Main(string[] args)
    {
        string mode = args.Length == 0 ? "--watch" : args[0];
        try
        {
            if (mode == "--self-test") return SelfTest();
            if (mode == "--stop")
            {
                try { using (EventWaitHandle signal = EventWaitHandle.OpenExisting(StopName)) signal.Set(); }
                catch (WaitHandleCannotBeOpenedException) { }
                return 0;
            }
            if (mode != "--watch") throw new ArgumentException("Unknown mode: " + mode);
            bool created;
            using (Mutex singleton = new Mutex(true, "Local\\CodexLocalTaskbarFix.Run." + Suffix, out created))
            {
                if (!created) return 0;
                try
                {
                    using (EventWaitHandle stop = new EventWaitHandle(false, EventResetMode.AutoReset, StopName))
                    using (FixContext context = new FixContext(stop)) Application.Run(context);
                }
                finally { singleton.ReleaseMutex(); }
            }
            return 0;
        }
        catch (Exception error)
        {
            WriteStatus("FEHLER: " + error.GetType().Name + ": " + error.Message);
            return 1;
        }
    }

    internal static void WriteStatus(string text)
    {
        File.WriteAllText(StatusPath, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + Environment.NewLine + text + Environment.NewLine, new UTF8Encoding(false));
    }

    private static int SelfTest()
    {
        using (Form test = new Form())
        {
            IntPtr handle = test.Handle; // Create an unshown window owned by this test only.
            if (Native.GetProp(handle, Property) != IntPtr.Zero) throw new Exception("Unexpected initial property.");
            if (!Native.SetProp(handle, Property, new IntPtr(1))) throw new System.ComponentModel.Win32Exception();
            if (Native.GetProp(handle, Property) != new IntPtr(1)) throw new Exception("SetProp verification failed.");
            ShellTaskbar shell = new ShellTaskbar();
            try { shell.Api.MarkFullscreenWindow(handle, false); }
            finally { shell.Dispose(); }
            Native.RemoveProp(handle, Property);
            if (Native.GetProp(handle, Property) != IntPtr.Zero) throw new Exception("Property cleanup failed.");
        }
        WriteStatus("SELBSTTEST OK: Fenster-Eigenschaft setzen/lesen/entfernen und Windows-Shell-Schnittstelle getestet. ChatGPT wurde dabei nicht veraendert.");
        return 0;
    }
}

internal sealed class FixContext : ApplicationContext
{
    private readonly EventWaitHandle stop;
    private readonly System.Windows.Forms.Timer timer;
    private readonly ShellTaskbar shell;
    private readonly Native.WinEventProc callback;
    private readonly Dictionary<int, IntPtr> processHooks = new Dictionary<int, IntPtr>();
    private readonly HashSet<int> targetPids = new HashSet<int>();
    private readonly HashSet<IntPtr> changedWindows = new HashSet<IntPtr>();
    private readonly Control dispatcher;
    private IntPtr foregroundHook;
    private DateTime nextProcessScan = DateTime.MinValue;
    private bool pending = true;
    private bool closing;
    private int appliedCount;

    internal FixContext(EventWaitHandle signal)
    {
        stop = signal;
        shell = new ShellTaskbar();
        dispatcher = new Control();
        IntPtr ignored = dispatcher.Handle;
        callback = OnWindowEvent;
        foregroundHook = Native.SetWinEventHook(3, 3, IntPtr.Zero, callback, 0, 0, 2);
        if (foregroundHook == IntPtr.Zero) throw new System.ComponentModel.Win32Exception();
        timer = new System.Windows.Forms.Timer();
        timer.Interval = 250;
        timer.Tick += Tick;
        timer.Start();
        Program.WriteStatus("AKTIV: Warte auf ein normal maximiertes ChatGPT-Fenster. Vollbild (F11) bleibt ausgenommen.");
        Tick(null, EventArgs.Empty);
    }

    private void OnWindowEvent(IntPtr hook, uint eventType, IntPtr window, int objectId, int childId, uint thread, uint time)
    {
        if (closing || window == IntPtr.Zero || (eventType >= 0x8000 && objectId != 0)) return;
        uint pid;
        Native.GetWindowThreadProcessId(window, out pid);
        if (targetPids.Contains((int)pid)) pending = true;
    }

    private void Tick(object sender, EventArgs args)
    {
        if (stop.WaitOne(0)) { ExitThread(); return; }
        try
        {
            if (DateTime.UtcNow >= nextProcessScan)
            {
                ScanProcesses();
                nextProcessScan = DateTime.UtcNow.AddSeconds(10);
                pending = true;
            }
            if (!pending) return;
            pending = false;
            Native.EnumWindows(delegate(IntPtr window, IntPtr parameter)
            {
                uint pid;
                Native.GetWindowThreadProcessId(window, out pid);
                if (!targetPids.Contains((int)pid)) return true;
                // Touch only top-level Electron app windows; never dialogs or other apps.
                if (Native.GetWindow(window, 4) != IntPtr.Zero) return true;
                StringBuilder windowClass = new StringBuilder(256);
                Native.GetClassName(window, windowClass, windowClass.Capacity);
                if (!windowClass.ToString().StartsWith("Chrome_WidgetWin", StringComparison.Ordinal)) return true;
                bool eligible = Native.IsWindowVisible(window) && Native.IsZoomed(window) && !Native.IsIconic(window);
                if (eligible) Apply(window, (int)pid);
                else Restore(window);
                return true;
            }, IntPtr.Zero);
        }
        catch (Exception error)
        {
            Program.WriteStatus("FEHLER: " + error.GetType().Name + ": " + error.Message);
        }
    }

    private void ScanProcesses()
    {
        HashSet<int> now = new HashSet<int>();
        int session = Process.GetCurrentProcess().SessionId;
        foreach (Process process in Process.GetProcessesByName("ChatGPT"))
        {
            using (process)
            {
                try
                {
                    if (process.SessionId != session) continue;
                    string image = process.MainModule.FileName;
                    if (image.IndexOf("\\WindowsApps\\OpenAI.Codex_", StringComparison.OrdinalIgnoreCase) < 0 ||
                        !image.EndsWith("\\app\\ChatGPT.exe", StringComparison.OrdinalIgnoreCase)) continue;
                    // Renderer/background processes do not have a main application window.
                    if (process.MainWindowHandle == IntPtr.Zero && !processHooks.ContainsKey(process.Id)) continue;
                    now.Add(process.Id);
                    if (!processHooks.ContainsKey(process.Id))
                    {
                        IntPtr hook = Native.SetWinEventHook(0x8002, 0x800B, IntPtr.Zero, callback, (uint)process.Id, 0, 2);
                        if (hook == IntPtr.Zero) throw new System.ComponentModel.Win32Exception();
                        processHooks.Add(process.Id, hook);
                    }
                }
                catch (System.ComponentModel.Win32Exception) { }
                catch (InvalidOperationException) { }
            }
        }
        List<int> old = new List<int>(processHooks.Keys);
        foreach (int pid in old)
            if (!now.Contains(pid)) { Native.UnhookWinEvent(processHooks[pid]); processHooks.Remove(pid); }
        targetPids.Clear();
        foreach (int pid in now) targetPids.Add(pid);
    }

    private void Apply(IntPtr window, int pid)
    {
        bool owned = Native.GetProp(window, Program.OwnedProperty) == new IntPtr(1);
        if (Native.GetProp(window, Program.Property) == IntPtr.Zero)
        {
            if (!Native.SetProp(window, Program.OwnedProperty, new IntPtr(1))) throw new System.ComponentModel.Win32Exception();
            if (!Native.SetProp(window, Program.Property, new IntPtr(1)))
            {
                int code = Marshal.GetLastWin32Error();
                Native.RemoveProp(window, Program.OwnedProperty);
                throw new System.ComponentModel.Win32Exception(code);
            }
            owned = true;
        }
        if (owned) changedWindows.Add(window);
        shell.Api.MarkFullscreenWindow(window, false);
        appliedCount++;
        if (appliedCount == 1)
            Program.WriteStatus("ANGEWENDET: Windows-Shell-Hinweis gesetzt. PID=" + pid + "; Fenster=" + window.ToInt64() +
                "; maximiert=True; NonRudeHWND=" + Native.GetProp(window, Program.Property).ToInt64() +
                "; MarkFullscreenWindow=False erfolgreich. Bitte Einblenden der Taskleiste mit der Maus pruefen.");
    }

    private void Restore(IntPtr window)
    {
        if (Native.GetProp(window, Program.OwnedProperty) != new IntPtr(1)) return;
        if (Native.GetProp(window, Program.Property) == new IntPtr(1)) Native.RemoveProp(window, Program.Property);
        Native.RemoveProp(window, Program.OwnedProperty);
        changedWindows.Remove(window);
    }

    protected override void ExitThreadCore()
    {
        if (closing) return;
        closing = true;
        timer.Stop();
        if (foregroundHook != IntPtr.Zero) Native.UnhookWinEvent(foregroundHook);
        foreach (IntPtr hook in processHooks.Values) Native.UnhookWinEvent(hook);
        foreach (IntPtr window in new List<IntPtr>(changedWindows))
            if (Native.IsWindow(window)) Restore(window);
        Program.WriteStatus("BEENDET: Vom Helfer gesetzte Fenster-Eigenschaften entfernt.");
        base.ExitThreadCore();
    }

    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            timer.Dispose();
            dispatcher.Dispose();
            shell.Dispose();
        }
        base.Dispose(disposing);
    }
}

internal sealed class ShellTaskbar : IDisposable
{
    internal readonly ITaskbarList2 Api;
    internal ShellTaskbar()
    {
        Api = (ITaskbarList2)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("56FDF344-FD6D-11D0-958A-006097C9A090")));
        Api.HrInit();
    }
    public void Dispose() { if (Api != null) Marshal.ReleaseComObject(Api); }
}

[ComImport, Guid("602D4995-B13A-429B-A66E-1935E44F4317"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface ITaskbarList2
{
    void HrInit();
    void AddTab(IntPtr window);
    void DeleteTab(IntPtr window);
    void ActivateTab(IntPtr window);
    void SetActiveAlt(IntPtr window);
    void MarkFullscreenWindow(IntPtr window, [MarshalAs(UnmanagedType.Bool)] bool fullscreen);
}

internal static class Native
{
    internal delegate bool EnumWindowsProc(IntPtr window, IntPtr parameter);
    internal delegate void WinEventProc(IntPtr hook, uint eventType, IntPtr window, int objectId, int childId, uint thread, uint time);
    [DllImport("user32.dll")] internal static extern bool EnumWindows(EnumWindowsProc callback, IntPtr parameter);
    [DllImport("user32.dll")] internal static extern uint GetWindowThreadProcessId(IntPtr window, out uint process);
    [DllImport("user32.dll")] internal static extern IntPtr GetWindow(IntPtr window, uint command);
    [DllImport("user32.dll", CharSet = CharSet.Unicode)] internal static extern int GetClassName(IntPtr window, StringBuilder text, int length);
    [DllImport("user32.dll")] internal static extern bool IsWindow(IntPtr window);
    [DllImport("user32.dll")] internal static extern bool IsWindowVisible(IntPtr window);
    [DllImport("user32.dll")] internal static extern bool IsZoomed(IntPtr window);
    [DllImport("user32.dll")] internal static extern bool IsIconic(IntPtr window);
    [DllImport("user32.dll", EntryPoint = "GetPropW", CharSet = CharSet.Unicode)] internal static extern IntPtr GetProp(IntPtr window, string name);
    [DllImport("user32.dll", EntryPoint = "SetPropW", CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool SetProp(IntPtr window, string name, IntPtr value);
    [DllImport("user32.dll", EntryPoint = "RemovePropW", CharSet = CharSet.Unicode)] internal static extern IntPtr RemoveProp(IntPtr window, string name);
    [DllImport("user32.dll", SetLastError = true)] internal static extern IntPtr SetWinEventHook(uint first, uint last, IntPtr module, WinEventProc callback, uint process, uint thread, uint flags);
    [DllImport("user32.dll")] internal static extern bool UnhookWinEvent(IntPtr hook);
}
MIT license
MIT License

Copyright (c) 2026 Taskbar Workaround Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

face68 avatar Oct 26 '26 18:10 face68

Still reproducible on October 28, 2026, on a newer desktop build:

  • App version: 26.1023.50603 (the installed app's AppVersion).
  • Windows package: OpenAI.Codex 26.1023.6123.0.
  • OS: Windows 11 Pro 26H2, build 26300.9711, x64.
  • Affected display: 3840 × 2160, with the bottom taskbar set to auto-hide.

Today we completely uninstalled the local taskbar workaround to check whether the issue had been fixed. The helper process, login task, and its window compatibility marker were removed. The user then confirmed that the taskbar still failed to appear when moving the pointer to the bottom edge of the normally maximized Codex window, and requested reinstalling the workaround.

Read-only Win32 diagnostics after the failure returned:

  • IsZoomed was true; this was normal maximization.
  • Automatic taskbar hiding was enabled, and NonRudeHWND was absent.
  • WindowFromPoint at (1920, 2158) and (1920, 2159) returned Codex's Chrome_WidgetWin_1 window, rather than the Explorer taskbar.

Reinstalling the local helper, which sets NonRudeHWND=1 and calls ITaskbarList2::MarkFullscreenWindow(hwnd, FALSE), restored Explorer taskbar ownership of those same bottom-edge coordinates while Codex remained maximized. No Codex installation files were modified. This is additional evidence about the window/Shell interaction, not a confirmed diagnosis of a specific internal code path.

This continues to interfere with normal taskbar-based app switching and requires a persistent workaround. Could the team please investigate a native fix and provide a status update?

Lio-Green avatar Oct 28 '26 03:10 Lio-Green