[Windows] Finalizing the last in-app Browser Use tab closes/restarts Codex Desktop

Open
#36,674 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
desktop

Research direction

Start by reproducing on Windows with the documented browser.tabs.finalize({ keep: [] }) call, then inspect the desktop log around the browser sidebar teardown and the process restart. Use the provided lifecycle timeline and QA session status to trace the failure; done means the final managed tab closes without restarting Codex and the turn reaches completion.

Written by the indexing model from the issue text.

Description

app browser bug windows-os
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
  1. Open Codex Desktop on Windows.
  2. Start a task that uses the in-app Browser.
  3. Open and use one managed Browser Use tab.
  4. At the end of the task, run:
    await browser.tabs.finalize({ keep: [] });
    
  5. Observe that the last Browser Use tab closes.
  6. 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 Runtime crash event.
  • The same browser-sidebar teardown-at-end-of-log pattern appears in several earlier Codex Desktop sessions.
  • Before teardown, the log repeatedly reports:
    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.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.