[Windows][Codex Desktop] In-app browser repeatedly creates duplicate localhost tabs and recreates them after manual close

Open 💬 0 comments Opened Jul 13, 2026 by leo2783

What version of the Codex App are you using (From “About Codex” dialog)?

26.707.61608

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop repeatedly creates a large number of duplicate in-app browser tabs while inspecting a local web application.

All of the tabs point to the same local development URL and port:
http://127.0.0.1:14188
The page title shown in the browser history is:

Professor Typing Animation

Instead of reusing the existing browser tab, Codex appears to create another tab during repeated visual checks, screenshots, DOM inspections, navigation retries, or task iterations.

When I manually close the duplicate tabs, Codex automatically recreates many of them again while the task is still running.

This can result in dozens of identical browser tabs for the same URL.

What steps can reproduce the bug?

  1. Open Codex Desktop on Windows.
  2. Open a local frontend project.
  3. Start the local development server at: http://127.0.0.1:14188
  4. Ask Codex to inspect, modify, and visually verify the webpage using the in-app browser.
  5. Allow Codex to perform several rounds of browser inspection or screenshot verification.
  6. Open the browser history or browser tab list.
  7. Observe that many duplicate tabs have been created for the same URL.
  8. Manually close the duplicate tabs.
  9. Continue or wait for the active Codex task.
  10. Observe that Codex creates many duplicate tabs again.

What is the expected behavior?

Codex should reuse the existing managed browser tab when repeatedly inspecting the same local URL.

For example, it should:

  • Select an existing tab for http://127.0.0.1:14188.
  • Reuse the same tab for navigation, refreshes, screenshots, and DOM inspection.
  • Avoid creating another tab when an equivalent tab already exists.
  • Stop recreating tabs after the user manually closes them.
  • Clean up unused managed tabs when the browser task finishes.
  • Limit the number of background or hidden tabs created by one task.

Additional information

Actual behavior

  • Codex creates many duplicate browser tabs that all point to the same localhost URL.
  • Closing the tabs manually does not resolve the problem because the active task creates them again.
  • The in-app browser tab state appears to be out of sync with the visible browser state, or browser retries are creating new tabs without cleaning up previous tabs.

Impact

This causes:

  • Browser history and tab lists to become flooded with duplicate entries.
  • Increased memory and resource usage.
  • Difficulty identifying the currently active browser session.
  • Confusing behavior when manually closing tabs.
  • Repeated tab creation during long-running UI development tasks.
  • Potential accumulation of hidden or background browser sessions.

Screenshot
<img width="340" height="1076" alt="Image" src="https://github.com/user-attachments/assets/7e049d23-2b05-4b34-8b1f-981f53dfa7b0" />

Additional information

The local development server uses one URL and one port. Codex does not need a separate browser tab for every inspection step.

The behavior appears related to browser-tab lifecycle management, deduplication, retry handling, and synchronization between:

  • Visible in-app browser tabs
  • Hidden or background managed tabs
  • The currently selected tab
  • Tabs created by browser automation
  • Tabs manually closed by the user

A possible mitigation would be to check for an existing matching URL before creating a new tab and to finalize or clean up managed tabs when the task ends.

Pseudo-code for the expected behavior:

const existingTabs = await browser.tabs.list();

const matchingTab = existingTabs.find(
  (tab) => tab.url === "http://127.0.0.1:14188"
);

const tab = matchingTab ?? await browser.tabs.new();

await tab.goto("http://127.0.0.1:14188");

Codex should also detect that a user manually closed a tab and avoid immediately recreating multiple replacement tabs unless a new browser operation explicitly requires one.

View original on GitHub ↗