Summary
When multiple VS Code windows are open at the same time, renaming a Codex thread in one window may not update the same thread title in other open windows/sessions.
This appears to be a multi-window state synchronization issue. One window updates the title correctly, but another already-open window can continue showing stale data (and may later overwrite persisted cache/state on shutdown/reload).
Repro Steps
- Open VS Code window A with the OpenAI ChatGPT/Codex extension.
- Open VS Code window B (same machine, same user profile) with the OpenAI ChatGPT/Codex extension.
- Ensure both windows have access to Codex threads and the patch is applied.
- In window A, rename a thread using
Rename Codex Thread (Command Palette or right-click menu).
- Observe the renamed thread in window A updates immediately.
- Switch to window B and inspect the same thread.
Actual Behavior
- Window B may still show the old thread title.
- Depending on reload/restart timing, stale in-memory state from another window may overwrite the updated title/cache.
Expected Behavior
- Thread renames should propagate to all open VS Code windows using the same profile/session.
- At minimum, other windows should refresh the thread title when the thread list is reopened or when a thread becomes active.
Suspected Cause
- The extension/webview title cache is maintained in-memory per VS Code window.
- Rename updates are applied in the active window runtime, but other windows do not receive a live sync event.
- On shutdown/reload, another window may flush stale thread-title cache back to disk.
Impact
- Confusing UX when working with multiple projects/windows.
- Renames can appear flaky or "revert" unexpectedly.
- Harder to trust the rename feature in multi-window workflows.
Possible Fix Directions
- Broadcast thread-title updates to all open extension hosts/windows (if possible through extension host state or shared event channel).
- Rehydrate/reconcile thread titles from backend persistent state before writing caches.
- Add conflict-safe cache writes (avoid overwriting newer timestamps/versions).
- Refresh titles when opening the thread list or on window focus.
Environment (example)
- VS Code: multiple windows open
- OpenAI extension: stable (release) build with patch applied
- OS: macOS
Summary
When multiple VS Code windows are open at the same time, renaming a Codex thread in one window may not update the same thread title in other open windows/sessions.
This appears to be a multi-window state synchronization issue. One window updates the title correctly, but another already-open window can continue showing stale data (and may later overwrite persisted cache/state on shutdown/reload).
Repro Steps
Rename Codex Thread(Command Palette or right-click menu).Actual Behavior
Expected Behavior
Suspected Cause
Impact
Possible Fix Directions
Environment (example)