Codex Diff resolves missing review artifacts and crashes in editor-diff-page

Open 💬 2 comments Opened Aug 4, 2026 by alexhopeoconnor
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

Codex Diff fails to load in the VS Code/VSCodium extension because the review view attempts to read a missing internal file/artifact, then crashes in editor-diff-page.

The visible failure pattern is:

  • Request failed ... method=fs/readFile ... \"No such file or directory (os error 2)\"
  • followed immediately by an editor-diff-page error boundary

This appears to be a review-artifact / thread-state resolution bug. Multi-root workspaces seem to make it easier to trigger, but I also reproduced the same failure from a single-folder workspace window.

Environment

  • Codex VS Code extension: openai.chatgpt@26.721.30844
  • IDE: VSCodium 1.126.04524
  • Platform: Linux x64

What issue are you seeing?

Opening Codex Diff / Review changes can fail completely.

Instead of rendering the review diff, the extension logs a failed internal file read and the diff webview crashes. This makes the review flow unusable even though Git itself is fine.

I also observed that chats are not repo-specific: the same chat can be reopened from another folder/window. That may be relevant, because the failing diff looks like it is being resolved against stale or mismatched thread/workspace state.

Steps to reproduce

I have seen this in both of these situations:

Path A: multi-root trigger

  1. Open a VS Code/VSCodium workspace with more than one root folder.
  2. Use the Codex extension normally.
  3. Make or review a change.
  4. Open Codex Diff / Review changes.
  5. Observe that the diff fails to load and the review view crashes.

Path B: single-folder window after thread reuse

  1. Open a single-folder workspace/window.
  2. Reopen or continue an existing Codex chat.
  3. Open Codex Diff / Review changes.
  4. Observe the same fs/readFile failure and editor-diff-page crash.

Expected behavior

Codex Diff should either:

  • render the review diff successfully, or
  • show a recoverable error if the underlying review artifact is missing

It should not crash the entire review view.

This is especially important because the IDE docs describe Codex as letting users review changes beside your code.

Actual behavior

  • Codex Diff fails to load
  • extension logs fs/readFile with No such file or directory (os error 2)
  • the diff UI crashes in editor-diff-page

Log evidence

Repeated failures of the same kind:

Request failed conversationId=none ... error={"code":-32603,"message":"No such file or directory (os error 2)"} ... method=fs/readFile

Immediately followed by:

error boundary ... editor-diff-page ...

I also saw a later Git watcher failure under Codex's own review/checkpoint refs:

[git-repo-watcher] Git repo watcher failed errorCode=ENOENT errorMessage=\"ENOENT: no such file or directory, scandir '.../.git/refs/codex/turn-diffs/checkpoints/...'\"

That makes it look like the diff/review flow is referencing a missing internal checkpoint artifact, not just a normal workspace file.

Additional observations

  • Multi-root workspace support is already a known weak area in the extension.
  • However, this specific bug is not cleanly explained as multi-root only, because I also saw the same crash from a single-folder window.
  • The more precise pattern seems to be:
  • chat/thread context can be reopened across workspace/folder boundaries
  • Codex Diff then tries to load review artifacts that do not exist in the current context
  • missing artifact -> fs/readFile failure -> editor-diff-page crash

I also saw signs of thread/UI state drift in logs during the same general period, including:

  • conversations being resumed in different workspace contexts
  • later Item not found in turn state errors in the same extension family of session problems

That may be related, although the core bug here is the deterministic Codex Diff crash on missing review artifacts.

Why this seems like a state-resolution bug

This does not look like normal Git diff failure.

The extension is using its own internal review/checkpoint storage under:

  • .git/refs/codex/turn-diffs/captures/...
  • .git/refs/codex/turn-diffs/checkpoints/...

Those refs exist on disk, but the extension later attempts to read or watch checkpoint content that is missing. Combined with the non-repo-specific chat reuse behavior, this strongly suggests the diff viewer is resolving against stale or mismatched review/thread/workspace state.

Expected fallback behavior

If the backing review artifact is missing, the extension should not crash the diff page. It should instead show a clear recoverable state such as:

  • review artifact missing, please reopen review
  • chat/workspace context changed, regenerate review
  • this review is no longer available for the current workspace

Related reports

  • #35058 Codex Diff crashes with Oops, an error has occurred in VS Code on macOS
  • #2909 Support for multi-root workspaces
  • #35073 VS Code extension crashes in multi-root workspaces on Windows
  • #24263 Renderer reload / turn-state desync causing Item not found in turn state

This report is closest to #35058 because the log signature matches exactly, but I am including the workspace/thread-context observations because they may help explain why the missing file lookup happens.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 24 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #36401
  • #36451
  • #35584

Powered by Codex Action

al6uiz · 18 days ago

Additional Windows reproduction: parent workspace with nested Git repository

I can reproduce the same Review/Diff failure on Windows when the Codex workspace root is a non-Git parent directory and the edited project is a nested Git repository.

Environment

  • IDE: VS Code 1.132.0
  • Platform: Windows x64
  • Codex extension seen in the failing log: openai.chatgpt@26.727.40816
  • Newer extension also installed: 26.803.41515
  • The behavior has persisted across extension updates.

Workspace layout

Sanitized layout:

Workspace root: C:\work\parent             (not a Git repository)
Git root:       C:\work\parent\project     (Git repository)

The edited-files card displays Git-root-relative names such as:

docs/CommandSystem.md
src/Controls/SegmentButton.cs

Those files exist under the nested repository:

C:\work\parent\project\docs\CommandSystem.md
C:\work\parent\project\src\Controls\SegmentButton.cs

They do not exist when resolved directly against the workspace root:

C:\work\parent\docs\CommandSystem.md
C:\work\parent\src\Controls\SegmentButton.cs

Observed behavior

  1. Open the non-Git parent folder as the VS Code workspace.
  2. Continue an existing Codex session and edit files inside the nested Git repository.
  3. Click Review on the edited-files card.
  4. Codex Diff fails, then shows No diff available.

Relevant log sequence:

Request failed ... method=fs/readFile ...
error={"code":-32603,"message":"The system cannot find the path specified. (os error 3)"}

error boundary ...
editor-diff-page-*.js

The latest installed webview bundle still renders codex.diffView.noDiffData when the editor-diff route does not receive both state.unifiedDiff and state.conversationId. When the payload is present, full-file loading also depends on the route/conversation cwd or workspace roots. This suggests both review route state and the nested repository root need to be preserved together.

Why opening the nested repository as a new workspace is not an acceptable workaround

The parent workspace contains multiple projects and long-running Codex sessions. Reopening only the nested repository changes the workspace context and makes the existing workspace-scoped session history unavailable from the original workflow. Review should resolve paths against the Git root captured for the turn without requiring the user to abandon or split existing sessions.

Expected behavior

  • Preserve the turn's Git root/cwd with the captured unified diff.
  • Resolve Git-relative paths against that Git root, not the outer workspace root.
  • Keep Review usable for nested repositories without changing the workspace root.
  • If review state or artifacts are missing, show a recoverable error instead of crashing and discarding the diff payload.