[Windows] Finalizing the last in-app Browser Use tab closes/restarts Codex Desktop
What version of the Codex App are you using?
- Microsoft Store package:
OpenAI.Codex_26.727.6591.0_x64__2p2nqsd0c76g0 - In-app Browser runtime release from logs:
26.727.51351
What platform is your computer?
Microsoft Windows NT 10.0.26200.0, x64.
What issue are you seeing?
Finishing a QA run by finalizing the last managed in-app Browser Use tab causes the entire Codex Desktop app to close and restart.
This is not a normal task completion. The QA turn remains interrupted, the desktop log stops without a normal shutdown sequence, and a new Codex process starts roughly five seconds later.
Steps to reproduce
- Open Codex Desktop on Windows.
- Start a task that uses the in-app Browser.
- Open and use one managed Browser Use tab.
- At the end of the task, run:
``js``
await browser.tabs.finalize({ keep: [] });
- Observe that the last Browser Use tab closes.
- Codex Desktop then closes/restarts and the active QA turn is left interrupted.
Expected behavior
The managed browser tabs should close while Codex Desktop remains open. The task should be able to send its final answer and reach a completed state.
An empty managed-tab list is documented as valid browser cleanup state and should not invalidate the browser binding or terminate the desktop host.
Actual behavior
The finalization call returns successfully, but closing the final Browser Use tab is immediately followed by silent desktop-process termination.
Sanitized timeline from the latest reproduction:
02:27:38.220Z unregistered debugger listener reason=manual
02:27:38.222Z renderer disposed browser sidebar webview
02:27:38.228Z browser sidebar guest torn down
02:27:38.232Z renderer removed browser sidebar webview tabType=closed
02:27:38.232Z closed browser sidebar page
02:27:38.232Z browser tab lifecycle action=closed appBrowserTabCount=0 appBrowserUseTabCount=0
02:27:38.237Z final records in the old desktop log
02:27:43.290Z new desktop process: "Launching app"
The associated QA thread was persisted with status interrupted, despite the browser.tabs.finalize({ keep: [] }) tool call completing successfully.
Additional diagnostics
- Windows Event Viewer contains no matching
Application Error,Windows Error Reporting, or.NET Runtimecrash event. - The same browser-sidebar teardown-at-end-of-log pattern appears in several earlier Codex Desktop sessions.
- Before teardown, the log repeatedly reports:
``text``
IAB_LIFECYCLE iab backend request failed: Cannot find context with specified id
Failed to upsert Browser Use PiP content
- The QA session ID for the latest reproduction is
019fc56c-743d-7560-90e6-3e491f30782d. - Full desktop logs are not attached publicly because they may contain local paths and session metadata; targeted excerpts can be provided privately.
Workaround
Do not finalize the final in-app Browser tab. Leaving one managed tab open, or using an external Chrome browser for QA, avoids this cleanup trigger.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm the same failure on two newer Codex Desktop builds.
26.814.5517.0; the latest occurred on26.818.3698.0, so the update did not resolve it.reason=target-close, browser guest teardown, route rejection withtabRouteKey=null, Browser Use tab count reaching zero, immediate browser-host recreation, undefined PiP tab metadata, then a Crashpad browser-process crash within about one second.codex doctorpassed the relevant checks, and Windows System, Defender, Code Integrity, AppLocker, and Resource Exhaustion logs contained no matching event.I have attached a privacy-reviewed evidence bundle containing the full report, two targeted log excerpts, four 60-byte Crashpad sidecars, and SHA-256 checksums. It excludes full logs, transcripts, prompts, responses, credentials, configuration, and browser-profile data.
codex-desktop-crash-20260821.zip
I can confirm this is still reproducible on a newer Windows build, and I was able to narrow the lifecycle condition with a controlled A/B test.
Environment
OpenAI.Codex_26.818.5229.0_x64__2p2nqsd0c76g0151.0.7922.170Reproduction: last managed Browser Use tab
A realistic localhost Browser Use workflow completed successfully:
Immediately before closing the only managed Browser Use tab, an external marker was persisted:
There was no
AFTER_TAB_CLOSE.Desktop lifecycle logging then showed:
A normal/non-Browser-Use app-browser tab was still present (
appBrowserTabCount=1), so merely keeping an ordinary sidebar browser tab alive did not prevent the crash.Approximately one second later the Codex AppX container was destroyed.
Crash evidence
This reproduction preserved a Crashpad minidump rather than only the usual 60-byte sidecar.
Crashpad sidecar:
Minidump:
The faulting instruction dereferenced the poisoned-looking
RAXvalue. This is consistent with a dangling/use-after-free style native teardown failure.Windows did not create a corresponding Application Error / WER crash record, but AppModel-Runtime recorded destruction of the
OpenAI.Codexdesktop AppX container immediately afterward.Important control:
2 -> 1managed tabsI then ran a separate control designed specifically to distinguish:
Sequence:
TAB_A.TAB_A.TAB_Bsentinel onabout:blank.2.TAB_Aby its exact ID whileTAB_Bremains.1.TAB_Bopen.Result:
Relevant persistent markers:
The desktop lifecycle log also recorded the close with:
PiP metadata subsequently referenced the surviving managed tab (
tabID=2).The app remained healthy and the task reached its normal final response.
Current conclusion
The strongest supported boundary is therefore:
This also shows that:
Current workaround on this build is to never finalize/close the final managed Browser Use tab.
If cleanup is needed, individual managed tabs can be closed while at least one other managed Browser Use tab is intentionally left alive.
I can corroborate this on the same current Windows build, with a variant that does not require an explicit
tabs.finalize({ keep: [] })call.Environment
OpenAI.Codex_26.818.5229.0_x64__2p2nqsd0c76g026.818.41509Three browser-process crashes
Three separate failures occurred within one night:
All three retained sidecars are identical:
Windows AppModel-Runtime event 217 destroyed the
OpenAI.CodexAppX container immediately after each crash. There was no matching Application Error/WER event.New reproduction boundary: automatic cleanup at a long-running goal transition
In all three cases, a long-running goal turn completed and Codex automatically started the next goal turn. The app automatically ended the managed Browser Use session at that boundary; the user did not manually close/finalize the tab.
Sanitized timeline from the third reproduction:
The two earlier crashes show the same ordering, with the Crashpad sidecar created about 0.5–1.7 seconds after the final managed Browser Use tab teardown.
The lifecycle records also show a persisted task id for
ended browser use session activity, while the page/route key is under aclient-new-thread:<redacted>draft route.This extends the reproduction beyond a manual finalization call:
Ordinary app-browser tabs do not protect against it; the third crash still had
appBrowserTabCount=3when managed Browser Use reached zero.Impact on other active tasks
Because the Electron browser/main process exits, unrelated active local tasks are interrupted too. In one affected long-running task:
task_complete;So the failure can cause both lost in-flight context and incomplete UI/thread rehydration even when the raw JSONL survives. This appears adjacent to #25779, but in this case the deterministic initiating event is the final managed IAB teardown.
Ruled out / workaround
hasUpdate=false / NoUpdates.Current reliable workaround is to disable/avoid the bundled in-app Browser plugin and use external Chrome or shell/Playwright-based validation. Preserving a managed IAB sentinel tab should also avoid the 1 -> 0 transition, consistent with the controlled A/B result already reported above.
Full logs and transcripts are not attached because they contain local project paths and task metadata; targeted sanitized excerpts can be provided if maintainers request them.
I can confirm this still reproduces on a substantially newer Windows desktop build.
Environment
OpenAI.Codex_26.825.3734.0_x64Microsoft Windows NT 10.0.26200.0, x64Reproductions on 2026-08-28
The app produced browser-process Crashpad reports at:
All three Crashpad sidecars contain:
In each occurrence, the desktop log ends at the in-app Browser Use teardown boundary. The common sanitized sequence is:
For the 12:00 occurrence, the final lifecycle record was written at
12:00:35.900; Crashpad recorded theptype=browsercrash at12:00:36.The log also reports
Cannot find context with specified idand repeatedFailed to upsert Browser Use PiP contentmessages during Browser Use before teardown. I found no OOM or GPU-process failure at these three boundaries.Older-version evidence
On 2026-08-25, package
26.818.5229.0also produced repeatedcodex.execrashes. Windows Event Viewer recorded exception0xc0000409at the same fault offset across several events, and Windows generated multiple crash dumps. This older evidence is not enough to prove the exact same native fault, but it shows that repeated desktop crashes persisted across the update to26.825.3734.0.I am not attaching raw logs or dumps publicly because they contain local paths, browsing history, project URLs, and session metadata. Sanitized excerpts or specific artifacts can be provided if maintainers request them.
The practical workaround remains avoiding finalization/closure of the last in-app Browser Use tab and using external Chrome for browser QA.