Codex Diff resolves missing review artifacts and crashes in editor-diff-page
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-pageerror 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
- Open a VS Code/VSCodium workspace with more than one root folder.
- Use the Codex extension normally.
- Make or review a change.
- Open Codex Diff / Review changes.
- Observe that the diff fails to load and the review view crashes.
Path B: single-folder window after thread reuse
- Open a single-folder workspace/window.
- Reopen or continue an existing Codex chat.
- Open Codex Diff / Review changes.
- Observe the same
fs/readFilefailure andeditor-diff-pagecrash.
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/readFilewithNo 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/readFilefailure ->editor-diff-pagecrash
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 stateerrors 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
#35058Codex Diff crashes with Oops, an error has occurred in VS Code on macOS#2909Support for multi-root workspaces#35073VS Code extension crashes in multi-root workspaces on Windows#24263Renderer reload / turn-state desync causingItem 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.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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
1.132.0openai.chatgpt@26.727.4081626.803.41515Workspace layout
Sanitized layout:
The edited-files card displays Git-root-relative names such as:
Those files exist under the nested repository:
They do not exist when resolved directly against the workspace root:
Observed behavior
Relevant log sequence:
The latest installed webview bundle still renders
codex.diffView.noDiffDatawhen the editor-diff route does not receive bothstate.unifiedDiffandstate.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