codex - 💡(How to fix) Fix VS Code extension cannot reopen some local sessions that CLI can resume [4 comments, 3 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#20131Fetched 2026-04-30 06:33:24
View on GitHub
Comments
4
Participants
3
Timeline
11
Reactions
0
Timeline (top)
commented ×4cross-referenced ×4labeled ×3

Some local Codex sessions become permanently unopenable in the VS Code Codex extension, while the same sessions can still be resumed successfully with the Codex CLI (/resume).

This is not a temporary WebView glitch: reloading VS Code, restarting VS Code Remote, reinstalling the extension, and updating extension versions do not make the affected sessions open again. Once a session hits this state, clicking it in the Codex sidebar leaves the page blank with no loading indicator.

Error Message

  • Affected sessions are visible/clickable in the VS Code Codex sidebar.
  • Clicking an affected session opens a blank page.
  • There is no visible loading state or error in the sidebar.
  • The model indicator in the lower-right UI falls back to custom or 5.4.
  • The same session was actually created and used with gpt-5.5 and medium reasoning.
  • Smaller sessions often still open normally in the extension and keep showing gpt-5.5 medium.
  • The affected sessions remain readable/resumable in the Codex CLI via /resume.

Root Cause

Some local Codex sessions become permanently unopenable in the VS Code Codex extension, while the same sessions can still be resumed successfully with the Codex CLI (/resume).

This is not a temporary WebView glitch: reloading VS Code, restarting VS Code Remote, reinstalling the extension, and updating extension versions do not make the affected sessions open again. Once a session hits this state, clicking it in the Codex sidebar leaves the page blank with no loading indicator.

Code Example

thread_id: 019dd6e6-44ba-7772-abab-cc47e88f36de
thread_name: 添加查询模式附加组件
session file: ~/.codex/sessions/2026/04/29/rollout-2026-04-29T01-41-48-019dd6e6-44ba-7772-abab-cc47e88f36de.jsonl
size: 719858 bytes
jsonl lines: 401
originator: codex_vscode
source: vscode
session cli_version: 0.126.0-alpha.8
model in turn_context: gpt-5.5
effort in turn_context: medium

---

All 401 JSONL lines parse successfully with JSON.parse.
Codex CLI can resume the session.
VS Code extension cannot open/render the session.

---

VS Code Codex extension id: openai.chatgpt
Installed extension versions observed:
  openai.chatgpt-26.422.62136-linux-x64
  openai.chatgpt-26.422.71525-linux-x64

Bundled extension CLI:
  codex-cli 0.126.0-alpha.8

User/system CLI:
  codex-cli 0.125.0

Host:
  VS Code Remote on Linux

---

2026-04-29 02:12:19.807 [error] PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.
    at /home/.../.vscode-server/extensions/openai.chatgpt-26.422.71525-linux-x64/out/extension.js:...

---

[warning] [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed
[warning] [IpcClient] Received broadcast but no handler is configured method=thread-read-state-changed
[error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
RAW_BUFFERClick to expand / collapse

Summary

Some local Codex sessions become permanently unopenable in the VS Code Codex extension, while the same sessions can still be resumed successfully with the Codex CLI (/resume).

This is not a temporary WebView glitch: reloading VS Code, restarting VS Code Remote, reinstalling the extension, and updating extension versions do not make the affected sessions open again. Once a session hits this state, clicking it in the Codex sidebar leaves the page blank with no loading indicator.

Observed behavior

  • Affected sessions are visible/clickable in the VS Code Codex sidebar.
  • Clicking an affected session opens a blank page.
  • There is no visible loading state or error in the sidebar.
  • The model indicator in the lower-right UI falls back to custom or 5.4.
  • The same session was actually created and used with gpt-5.5 and medium reasoning.
  • Smaller sessions often still open normally in the extension and keep showing gpt-5.5 medium.
  • The affected sessions remain readable/resumable in the Codex CLI via /resume.

Why this looks like an extension/session hydration issue

The local JSONL session file is present and parseable. One concrete affected session:

thread_id: 019dd6e6-44ba-7772-abab-cc47e88f36de
thread_name: 添加查询模式附加组件
session file: ~/.codex/sessions/2026/04/29/rollout-2026-04-29T01-41-48-019dd6e6-44ba-7772-abab-cc47e88f36de.jsonl
size: 719858 bytes
jsonl lines: 401
originator: codex_vscode
source: vscode
session cli_version: 0.126.0-alpha.8
model in turn_context: gpt-5.5
effort in turn_context: medium

Validation:

All 401 JSONL lines parse successfully with JSON.parse.
Codex CLI can resume the session.
VS Code extension cannot open/render the session.

This has happened with multiple sessions over time. Large session size may be a trigger, but may not be the only trigger.

Local environment

VS Code Codex extension id: openai.chatgpt
Installed extension versions observed:
  openai.chatgpt-26.422.62136-linux-x64
  openai.chatgpt-26.422.71525-linux-x64

Bundled extension CLI:
  codex-cli 0.126.0-alpha.8

User/system CLI:
  codex-cli 0.125.0

Host:
  VS Code Remote on Linux

Relevant logs

~/.vscode-server/data/logs/20260429T003025/exthost3/remoteexthost.log:

2026-04-29 02:12:19.807 [error] PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.
    at /home/.../.vscode-server/extensions/openai.chatgpt-26.422.71525-linux-x64/out/extension.js:...

~/.vscode-server/data/logs/20260429T003025/exthost2/openai.chatgpt/Codex.log around the affected session creation/open period:

[warning] [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed
[warning] [IpcClient] Received broadcast but no handler is configured method=thread-read-state-changed
[error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.

Steps to reproduce

  1. Use the VS Code Codex extension for a longer/local session until the session grows large or otherwise reaches the problematic state.
  2. Close/reopen the Codex sidebar, reload VS Code, or restart VS Code Remote.
  3. Click the affected session in the Codex sidebar.
  4. Observe a blank page with no loading indicator.
  5. Resume the same session with Codex CLI /resume.

Expected behavior

The VS Code extension should either:

  • open/render any local session that the CLI can resume, or
  • show a clear recoverable error if a session is too large or unsupported, or
  • safely summarize/page/trim the UI rendering without making the thread permanently inaccessible from the extension.

It should not silently show a blank page or show a misleading fallback model (custom / 5.4) when the persisted turn context says gpt-5.5 medium.

Related issues

This appears related to earlier VS Code extension/session restore issues:

  • #5902: VS Code extension crashes after a single conversation exceeds the session size limit.
  • #14812: VS Code extension loses thread history after restart even though session files still exist.
  • #15368: session list cap / local thread hydration issues under heavy usage.
  • #3834: session files exist under .codex/sessions but the extension does not read them after a format change.

extent analysis

TL;DR

The issue can be mitigated by investigating and addressing the PendingMigrationError and IPC client warnings in the extension logs, which may be related to the session hydration issue.

Guidance

  • Investigate the PendingMigrationError in the remoteexthost.log file and follow the recommended steps in the error message to update the extension code.
  • Review the IPC client warnings in the Codex.log file and configure handlers for the thread-stream-state-changed and thread-read-state-changed methods if necessary.
  • Verify that the session files are correctly formatted and can be parsed by the extension, as the issue may be related to session size or formatting.
  • Test the extension with smaller session sizes to determine if the issue is specific to large sessions.

Example

No code snippet is provided as the issue is related to the extension's internal logic and logging.

Notes

The issue may be related to earlier session restore issues, and investigating those issues may provide additional insight. The PendingMigrationError and IPC client warnings may be contributing factors, but further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Investigate and address the logging errors and warnings, and test the extension with smaller session sizes to determine the root cause of the issue. This approach is recommended as it allows for a targeted investigation and potential fix without requiring a full extension upgrade.

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…

FAQ

Expected behavior

The VS Code extension should either:

  • open/render any local session that the CLI can resume, or
  • show a clear recoverable error if a session is too large or unsupported, or
  • safely summarize/page/trim the UI rendering without making the thread permanently inaccessible from the extension.

It should not silently show a blank page or show a misleading fallback model (custom / 5.4) when the persisted turn context says gpt-5.5 medium.

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 VS Code extension cannot reopen some local sessions that CLI can resume [4 comments, 3 participants]