codex - 💡(How to fix) Fix Session visible in history but does not open after switching workspace [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19144Fetched 2026-04-24 05:59:57
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Error Message

  • No error message is shown

Fix Action

Fix / Workaround

Notes:

  • CLI workaround consistently works
  • Issue occurs specifically after switching workspaces
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

26.5417.40842

What subscription do you have?

Plus

Which IDE are you using?

VS Code

What platform is your computer?

Linux 6.17.0-22-generic x86_64 x86_64

What issue are you seeing?

A previously created Codex chat session is visible in the sessions/history tree in VS Code, but cannot be opened after switching workspaces.

Actual behavior:

  • Session is visible in the history tree
  • Clicking it does nothing (no UI update)
  • No error message is shown

Additional context:

  • Session files exist on disk under: ~/.codex/sessions/...
  • Example structure confirmed via: ls -R ~/.codex/sessions
  • This suggests the session data is not lost, but the UI fails to rehydrate/open it

What steps can reproduce the bug?

  1. Start a Codex chat in project/workspace A
  2. Switch to another project/workspace B
  3. Return to project/workspace A
  4. Open Codex sidebar and click a previous session

What is the expected behavior?

The selected session should open and display the conversation.

Additional information

Environment:

  • OS: Ubuntu 24.04.4 LTS
  • Kernel: 6.17.0-22-generic x86_64
  • IDE: VS Code
  • Codex extension version: 26.5417.40842

Additional finding:

After installing Codex CLI, I was able to recover and open the session using:

codex resume --all

This confirms:

  • Session data is intact
  • CLI can correctly resume it
  • VS Code extension fails to open the same session

This suggests the issue is specific to the VS Code extension session restore/rehydration logic, possibly related to workspace scoping or session binding.

Notes:

  • CLI workaround consistently works
  • Issue occurs specifically after switching workspaces

extent analysis

TL;DR

The issue can be temporarily worked around by using the Codex CLI command codex resume --all to recover and open the session.

Guidance

  • Verify that the session files exist on disk under ~/.codex/sessions/ to confirm the data is not lost.
  • Try using the Codex CLI command codex resume --all to recover and open the session, as this has been shown to work consistently.
  • Investigate the VS Code extension's session restore/rehydration logic, specifically looking into workspace scoping or session binding, as this is likely the cause of the issue.
  • Check if the issue persists when switching between workspaces with different configurations or settings.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue seems to be specific to the VS Code extension and its ability to restore sessions after switching workspaces. The fact that the CLI workaround works suggests that the session data is intact, but the extension's logic is flawed.

Recommendation

Apply the workaround by using the Codex CLI command codex resume --all to recover and open the session, as this has been shown to be a consistent solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Session visible in history but does not open after switching workspace [1 participants]