[Windows/WSL] Conversation history disappears after switching environments while thread data still exists
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.901.4073.0
What subscription do you have?
ChatGPT Pro ($100/month)
What platform is your computer?
- Windows 11 Pro 25H2, x64 (OS build 26200.9168; NT kernel version 10.0.26200)
- WSL package version: 2.7.12.0
- WSL mode: WSL2
- Linux distribution: Ubuntu 26.04.1 LTS (Resolute Raccoon), VERSION_ID=26.04
- Linux kernel: 6.18.33.2-microsoft-standard-WSL2, x86_64
- WSLg version: 1.0.73.2
What issue are you seeing?
After switching a long-running Codex App task from the Windows execution environment to WSL and then back to Windows, a large continuous block of later conversation history disappeared from the frontend.
The task UI stopped at an earlier user message. All later user messages, assistant responses, progress updates, tool activity, review results, and final conclusions were no longer visible.
However, the missing content does not appear to have been deleted:
- The assistant could still reference and accurately reconstruct the missing turns.
- Inspection of the same stored thread showed that the missing messages and execution events still existed.
- The workspace files, reports, snapshots, and completed work remained intact.
- The task list continued to show the same task rather than a separate WSL copy.
This therefore appears to be a frontend history-loading, task reattachment, pagination, stream replay, or long-running turn hydration problem rather than repository data loss.
A potentially relevant path anomaly was also observed. The expected workspace path was:
C:\Users\<WindowsUser>\Desktop\Yan_PKM
but the task record later reported a cwd shaped like:
C:\Users\<WindowsUser>\AppData\Local\OpenAI\Codex\bin\<build-id>\Users\<WindowsUser>\Desktop\Yan_PKM
This looks as though an intermediary Codex runtime path may have been prepended to the original workspace path after switching environments.
What steps can reproduce the bug?
- Open a local project in the Codex Windows desktop app.
- Open an existing long-running task containing many messages, tool calls, and execution events.
- Switch the task's terminal/execution environment from Windows or PowerShell to WSL.
- Continue the conversation and execute additional work in the same task.
- Switch the environment back to Windows, or reopen the same task in the Windows environment.
- Inspect the conversation history.
- Observe that the frontend renders only an earlier portion of the task and silently omits a large block of later messages and events.
Observed at least once. I did not repeatedly reproduce it because I did not want to risk further loss of visible task state.
Feedback / session ID for correlating the in-app diagnostic logs:
01a04d4a-5b2a-7861-90ea-1b7e5c0f96a2
What is the expected behavior?
The complete conversation history for the same thread should remain visible, continuous, and chronologically ordered when switching between Windows and WSL.
If switching environments creates a distinct host context, checkout, or task, the app should explicitly notify the user and provide a clear way to return to the original task. Existing user messages, assistant responses, approvals, and execution records should never be silently hidden.
The frontend-rendered history should match the stored server-side thread history.
Additional information
Feedback ID: 01a04d4a-5b2a-7861-90ea-1b7e5c0f96a2
Impact:
- Users cannot see prior decisions, approvals, or risk warnings.
- Users may repeat work because completed steps are invisible.
- The assistant retains context that the user cannot see, creating an information asymmetry.
- Audit, rollback, and multi-agent review records become inaccessible in the UI.
- Approval-gated tasks may develop authorization and traceability risks.
Please investigate:
- Thread/project/host/cwd mapping before and after Windows/WSL switching.
- Windows path versus /mnt/c/... path normalization and project identity matching.
- Whether the runtime/intermediary path was incorrectly prepended to the workspace path.
- Restoration of long-running in-progress turns, message pagination cursors, stream replay, and frontend hydration.
- Why the stored thread retains the messages while the frontend message list does not render them.
- Whether the app can provide a 'reload full history from server' recovery action and warn before an environment switch changes task identity.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with diagnostic session 01a04d4a-5b2a-7861-90ea-1b7e5c0f96a2 and compare the stored thread with the rendered message list before and after switching between Windows and WSL. Trace task identity, workspace-path mapping, pagination, stream replay, and history hydration; done means the same task retains a complete, chronological history after environment switches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- frontend, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100