Skip to content

Windows app becomes unusable after adding a second folder to an existing project #35137

Description

@Gaychou

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

26.721.3996.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

[Environment]::OSVersion.VersionString + " " + $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })

What issue are you seeing?

Summary

On Windows, adding a second local folder to an existing Codex project caused the app to immediately display:

Oops, an error occurred

After restarting the app, it remained stuck on the same error screen and could no longer be opened normally.

Steps to reproduce

  1. Open an existing local project in the Windows Codex/ChatGPT app.
  2. Add another local folder to the existing project.
  3. Select a second folder.
  4. The app immediately displays "Oops, an error occurred".
  5. Close and restart the app.
  6. The same error appears during startup, making the app unusable.

Expected behavior

The project should support multiple folders, or the app should reject the second folder with a clear message without corrupting its saved state.

Actual behavior

The second folder is saved in the project's rootPaths array, but the app can no longer load the project state.

The error persists after restarting the application.

Workaround

I was able to recover the app with the following steps:

  1. Fully close all ChatGPT/Codex processes.

  2. Open:

    %USERPROFILE%\.codex\.codex-global-state.json

  3. Remove the second folder from the affected project's rootPaths array, leaving only the original folder.

  4. Make the same change in:

    %USERPROFILE%\.codex\.codex-global-state.json.bak

  5. Restart the app.

After removing the second rootPaths entry, the app started normally again. Existing project history and local source-code changes were preserved.

Environment

  • App version: 26.721.3996.0
  • Subscription: ChatGPT Plus
  • Platform: Windows x64

Additional notes

The failure happened immediately after adding the second folder. Please make the multi-folder project state load correctly, or prevent unsupported multi-folder configurations from being saved.

What steps can reproduce the bug?

  1. Open the Codex App on Windows.
  2. Open an existing local project that already contains one folder.
  3. Add a second local folder to the same project.
  4. Immediately after selecting the second folder, the app displays “Oops, an error occurred”.
  5. Fully close and reopen the app.
  6. The same error appears during startup, and the app can no longer be used.

The issue is reproducible because the project is saved with two entries in its rootPaths array.

I recovered the app by closing all ChatGPT/Codex processes and removing the second folder entry from both files:

  • %USERPROFILE%\.codex\.codex-global-state.json
  • %USERPROFILE%\.codex\.codex-global-state.json.bak

After leaving only the original folder in rootPaths, the app opened normally again.

What is the expected behavior?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething 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