Environment
- Codex Desktop package:
26.721.3996.0 (Microsoft Store / MSIX, x64)
- Bundled Browser Use release:
26.721.31836
- OS: Windows 11 x64
- Authentication/subscription: ChatGPT account in Codex Desktop (tier intentionally omitted)
What issue are you seeing?
Calling browser.tabs.finalize(...) from the bundled in-app browser (iab) can silently terminate the entire Codex Desktop AppX process tree, not just close the browser tabs. Any other concurrently running Codex tasks are interrupted at the same time.
There is no crash dialog. Windows does not record an Application Error / WER crash, and no crash dump is produced. The AppModel Runtime log only shows that the Codex AppX container was destroyed.
This has reproduced twice on the same build with two different forms of empty finalization:
await browser.tabs.finalize({keep:[]});
await browser.tabs.finalize({});
In both cases the tool call itself returned successfully before the desktop process disappeared.
Steps to reproduce
- Start Codex Desktop on Windows.
- Run a task that uses the bundled in-app Browser Use backend.
- Optionally keep another task running in a different project (this makes the cross-task impact visible).
- At the end of Browser Use, run:
await viewport.reset();
await browser.tabs.finalize({});
- Observe that the tool call completes, the IAB guest/webview is torn down, and then the entire Codex Desktop process exits. Other active tasks become
interrupted with no task-level error.
Deterministic timing evidence
Occurrence A
browser.tabs.finalize({keep:[]}) starts
- the desktop log stops approximately 156 ms later
- Windows AppModel Runtime then records the Codex AppX container being destroyed
Occurrence B
browser.tabs.finalize({}) starts
- Browser Use returns successfully
- the function-call output is persisted
- the final desktop log is written approximately 151 ms after the call began
- Windows AppModel Runtime then records the Codex AppX container being destroyed
- Codex relaunches into a new AppX container
Sanitized final lifecycle sequence from occurrence B:
IAB_LIFECYCLE unregistered debugger listener ... reason=manual ... webContentsDestroyed=false
IAB_LIFECYCLE syncing browser use active state ... isActive=false
IAB_LIFECYCLE renderer synced browser use webview state ... isBrowserUseActive=false
IAB_LIFECYCLE renderer disposed browser sidebar webview
IAB_LIFECYCLE browser sidebar guest torn down
IAB_LIFECYCLE renderer removed browser sidebar webview ... tabType=closed
IAB_LIFECYCLE closed browser sidebar page
IAB_TAB_ANALYTICS browser tab lifecycle action=closed ... appBrowserTabCount=2 appBrowserUseTabCount=0
The last call was recorded as completed; no task cancellation, interrupt request, fatal log, OOM event, WER report, or crash dump preceded the container destruction.
Possible lifecycle clue
The IAB registry initially creates/captures a browser route under a temporary client-new-thread:<uuid> conversation ID. After the real thread is created, logs show route reassignment/rebinding between the real thread ID and that temporary client ID. During finalization, the closed browser tab is still logged under the temporary client-new-thread:<uuid> ID while the active Browser Use turn belongs to the real thread.
This may be a stale route/owner alias or teardown bug in the Windows IAB lifecycle path.
Expected behavior
browser.tabs.finalize(...) should close/release only the requested Browser Use tabs. Codex Desktop, app-server, unrelated browser tabs, and other running tasks must remain alive.
Impact
- All concurrent tasks are interrupted.
- Long-running work must be manually resumed.
- The failure looks like a user cancellation even though no cancel/interrupt was requested.
- No diagnostic crash artifact is generated.
Both interrupted task transcripts and repository working trees remained intact after relaunch; SQLite integrity checks passed.
Workaround
A durable local instruction now prevents agents on this build from calling browser.tabs.finalize(...) for the IAB backend and leaves IAB tabs open. Browser Use otherwise remains functional. No further whole-app exit has occurred since applying that workaround.
Related issues
I have retained the original local desktop logs and session transcripts. Full logs are not attached publicly because they may contain local paths, prompts, and environment metadata; targeted sanitized excerpts can be provided if maintainers request them.
Environment
26.721.3996.0(Microsoft Store / MSIX, x64)26.721.31836What issue are you seeing?
Calling
browser.tabs.finalize(...)from the bundled in-app browser (iab) can silently terminate the entire Codex Desktop AppX process tree, not just close the browser tabs. Any other concurrently running Codex tasks are interrupted at the same time.There is no crash dialog. Windows does not record an
Application Error/ WER crash, and no crash dump is produced. The AppModel Runtime log only shows that the Codex AppX container was destroyed.This has reproduced twice on the same build with two different forms of empty finalization:
await browser.tabs.finalize({keep:[]});await browser.tabs.finalize({});In both cases the tool call itself returned successfully before the desktop process disappeared.
Steps to reproduce
interruptedwith no task-level error.Deterministic timing evidence
Occurrence A
browser.tabs.finalize({keep:[]})startsOccurrence B
browser.tabs.finalize({})startsSanitized final lifecycle sequence from occurrence B:
The last call was recorded as completed; no task cancellation, interrupt request, fatal log, OOM event, WER report, or crash dump preceded the container destruction.
Possible lifecycle clue
The IAB registry initially creates/captures a browser route under a temporary
client-new-thread:<uuid>conversation ID. After the real thread is created, logs show route reassignment/rebinding between the real thread ID and that temporary client ID. During finalization, the closed browser tab is still logged under the temporaryclient-new-thread:<uuid>ID while the active Browser Use turn belongs to the real thread.This may be a stale route/owner alias or teardown bug in the Windows IAB lifecycle path.
Expected behavior
browser.tabs.finalize(...)should close/release only the requested Browser Use tabs. Codex Desktop, app-server, unrelated browser tabs, and other running tasks must remain alive.Impact
Both interrupted task transcripts and repository working trees remained intact after relaunch; SQLite integrity checks passed.
Workaround
A durable local instruction now prevents agents on this build from calling
browser.tabs.finalize(...)for the IAB backend and leaves IAB tabs open. Browser Use otherwise remains functional. No further whole-app exit has occurred since applying that workaround.Related issues
browser.tabs.finalize(...)triggerI have retained the original local desktop logs and session transcripts. Full logs are not attached publicly because they may contain local paths, prompts, and environment metadata; targeted sanitized excerpts can be provided if maintainers request them.