Skip to content

Windows: selecting a directory via showDirectoryPicker in the in-app browser terminates the entire Codex app #34860

Description

@jun76

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

26.715.72359

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

On Windows, calling window.showDirectoryPicker({ mode: "read" }) from a page opened in the Codex in-app browser successfully opens the native directory picker. However, after selecting a directory, the entire Codex desktop app terminates.

No JavaScript error or promise rejection is displayed because the application exits before the promise settles.

The reproduction page records events in localStorage. After restarting Codex, the stored log ends at before-call; neither returned nor rejected is recorded.

What steps can reproduce the bug?

A minimal reproduction is available at:

https://github.com/jun76/iab-directory-picker-repro

Steps:

  1. Clone the repository.
  2. Run npm run dev. No dependency installation is required.
  3. Open http://127.0.0.1:5175/ in the Codex in-app browser.
  4. Click Run showDirectoryPicker.
  5. Select any directory. An empty directory is sufficient.
  6. The entire Codex desktop app exits immediately after the selection.

The reproduction page only calls:

await window.showDirectoryPicker({ mode: "read" });

It does not enumerate or read the selected directory.

What is the expected behavior?

The promise should either:

  • resolve with a FileSystemDirectoryHandle, or
  • reject with an appropriate JavaScript exception.

In either case, selecting a directory must not terminate the Codex desktop app.

Additional information

This was also reported through the in-app feedback menu.

Feedback ID: no-active-thread-019f8ca4-2f8f-7df0-ac9b-4beee838e468

Environment:

The reproduction records its state before and after the API call. After the crash and application restart, the stored log contains before-call but neither returned nor rejected, indicating that the host application exits before the JavaScript promise settles.

Related but not duplicate:

This report is specifically about the File System Access API's showDirectoryPicker() on Windows: the native picker opens successfully, but selecting a directory terminates the entire desktop application before the JavaScript promise settles.

A search for showDirectoryPicker in the openai/codex issue tracker returned no existing reports at the time of submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions