openai / openai/codex

[Windows][Desktop] Agents cannot enumerate or close file preview tabs opened with open_in_codex

Open
#45,614 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app enhancement windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using?

26.901.6511.0; bundled codex-cli 0.153.4

What platform is your computer?

Windows x64

What issue are you seeing?

Codex tasks can open local files and PDFs in the right panel through open_in_codex, but the available Codex app tools expose no corresponding operation to enumerate or close those file preview tabs.

The browser API only reports IAB/browser tabs. It can therefore return tabs: [] while the selected task still visibly has one or more file/PDF tabs in its right panel. This makes agents report cleanup as complete even though previews remain open.

Because preview tabs belong to individual tasks, users with many tasks must open each task manually, inspect its right panel, and click the X on every remaining preview. There is no central inventory or "close all previews" action.

Steps to reproduce
  1. In a Codex task, call open_in_codex with a local PDF or file target.
  2. Confirm that a file preview tab appears in the right panel.
  3. Ask the task to close every tab it opened.
  4. The task can query the IAB/browser inventory, which returns no tabs, but it has no API operation that lists or closes the file preview created in step 1.
  5. Repeat this in several tasks. Each preview must be found and closed manually by visiting its task.
Expected behavior

At least one of these should be available:

  • open_in_codex returns a stable preview-tab ID, plus Codex app tools to list and close preview tabs for the calling task;
  • a task-scoped close_in_codex or close_all_previews operation;
  • an application-level preview inventory and "Close all previews" command.

Agents should be able to clean up resources they opened without controlling the desktop UI. The API should clearly distinguish IAB tabs from file, terminal, review, and other Codex panel tabs.

Actual behavior
  • open_in_codex opens the preview.
  • The Codex app tool set exposes no inverse close operation.
  • IAB inventory does not include file preview tabs.
  • Cleanup requires manual task-by-task UI work and can lead to incorrect "0 tabs" reports.
Additional information

The problem is especially visible in long-running workflows where many independent tasks open PDFs for review. It is both a resource-management issue and an API symmetry issue: agents can create UI state that they cannot inspect or undo.

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.

Research direction

Start by tracing the open_in_codex entry point and the existing IAB/browser tab inventory described in the issue. Determine how task-scoped preview state is represented, then define how preview tabs can be listed and closed while remaining distinct from browser tabs. Done means agents can inspect and clean up previews they opened without manual task-by-task UI work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.