Skip to content

About

A safe macOS workaround that clears the persisted ChatGPT/Codex project order and relaunches the app.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Codex Project Order Reset

Prompt

Use https://github.com/jarvisluk/codex-project-order-reset and run ./reset-codex-project-order.sh from that repository to clear the persisted Codex project orders. Do not reimplement the cleanup or edit the Codex state manually. The script handles quitting Codex, removing both known project-order overrides, and reopening Codex after the cleanup. When it finishes, confirm that Codex has restarted and report whether the reset succeeded.

Problem

The macOS ChatGPT/Codex desktop app can keep project groups in persisted order state even when By project → Last updated is selected. Current builds may use both the top-level project-order and electron-persisted-atom-state.unified-sidebar-project-order-v1. Recent activity may reorder conversations inside a project without moving the project group itself. These fields can reappear after a local or SSH project is created or synchronized, causing the sidebar to become locked again.

This behavior is tracked in openai/codex#31836 and openai/codex#33077.

Repository capabilities

The included reset-codex-project-order.sh provides a repeatable macOS workaround that:

  • gracefully quits ChatGPT/Codex and waits for the desktop process to stop;
  • delegates cleanup to a detached one-shot worker so it survives the Codex app exiting;
  • validates the Codex global state before modifying it;
  • creates a timestamped backup of the complete state file;
  • atomically removes only the top-level project-order and nested unified-sidebar-project-order-v1 keys when present;
  • verifies the resulting JSON and restarts ChatGPT/Codex;
  • fails without replacing the original state when validation or shutdown fails;
  • uses an atomic lock to prevent overlapping resets, then removes the lock after success or failure and leaves no persistent helper or background loop.

The script targets /Applications/ChatGPT.app, uses ~/.codex/.codex-global-state.json, requires macOS and jq, and is intended as a temporary workaround rather than an official fix. It preserves pinned projects, project definitions, sidebar expansion state, sort preferences, and all unrelated Codex settings.

License

MIT

About

A safe macOS workaround that clears the persisted ChatGPT/Codex project order and relaunches the app.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages