Codex Diff crashes with “Oops, an error has occurred” in VS Code on macOS
Resolved 💬 51 comments Opened Jul 24, 2026 by Furgon Closed Aug 3, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
Codex Diff is unusable in VS Code: after Codex edits files, opening the “Codex Diff” tab shows:
Oops, an error has occurred
This happens in every repository, including a newly opened workspace.
Environment:
- macOS, Apple Silicon
- VS Code 1.128.0
- Codex extension: openai.chatgpt 26.721.30844
Git works correctly and git diff displays the changes.
What I tried:
- Reopened the workspace
- Created a new Codex chat
- Cleared VS Code workspaceStorage
- Reinstalled the Codex extension
- Tested another repository
- Confirmed there are no relevant third-party extensions installed
Relevant Codex log:
Request failed: fs/readFile — No such file or directory (os error 2)
Then:
editor-diff-page error boundary
Expected behavior:
Codex Diff should render the changed files and their diff.
Actual behavior:
The Codex Diff editor crashes before displaying any diff.
51 Comments
Come on, guys, this is a must; we are waiting for a fix
Same problem here. I can't view Diff.
same problem.
My development machine is on the company intranet and can't connect to external websites. There seem to be a lot of errors related to fetching css and js from OpenAI. Please consider the experience when there is no internet access.
same problem
The same problem
同样的问题
Just downgrade to a previous e.g. 26715.61943 which was from 4 days ago.
Same problem here!
Thats also have this problem
Oh it works on openai.chatgpt-26.5623.141536
AI slop. It's happening on Linux too.
Dealing with this as well still
Please stop saying "same problem", you're just polluting everyone's inbox!
If you want to be notified about updates, use the "subscribe" button in the sidebar.
If you want to notify developers you have the same issue, add a reaction to the first post.
Adding a comment is useless.
Underlying issue
Update: This comment https://github.com/openai/codex/issues/35076#issuecomment-5069253239 already explains the underlying issue.
Related issue
This appears related to #18311, which reports the same exception on another non-thread Codex route, although that issue concerns the desktop mini-window rather than the diff page.
works fine if you downgrade the extension to 26.715.61943 and disable auto-update.
I am surprised that this still isn't fixed after 3-4 updates. They should start looking at the code a bit more before shipping.
Same here. MacOS as well.
Same problem here, ubuntu 24.
Same problem here, Windows 11 pro
Also happens to me in Linux:
VSCODE "ABOUT" shows the following output:
Version: 1.130.0
Commit: 1b6a188127eeaf9194f945eb6eb89a657e93c54c
Date: 2026-07-22T14:55:04Z
Electron: 42.6.0
ElectronBuildId: 14623276
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
OS: Linux x64 6.1.0-51-amd64
Codex version: 26.721.41059
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
I can reproduce the same issue.
Environment:
Git itself works correctly, and the repository only has a small set of text changes. The Codex log shows the same errors:
fs/readFile:No such file or directory (os error 2)editor-diff-pageerror boundaryClicking Retry does not resolve it. VS Code's built-in Source Control diff continues to work normally.
Same problem here. I can't view Diff.
PRETTY_NAME="Ubuntu 22.04.5 LTS"
who can fix it,oh tadaye
Downgrade the extension to 26.715.61943 would be a temporary way to solve this issue.
Confirmed, this workaround is valid.thanks a lot 兄弟
Confirmed, Codex Diff on git worktree same problem, Windows 11 pro
Codex version: v26.721.41059
<img width="426" height="218" alt="Image" src="https://github.com/user-attachments/assets/9911e7b1-6356-4b8c-a1b3-35cb8b36f6ca" />
me too
2026-07-28 14:31:59.450 [error]
error boundary
componentStack="
at R (.../openai.chatgpt-26.721.41059/webview/assets/editor-diff-page-DVdvmt2c.js:1:1030)
at L (.../openai.chatgpt-26.721.41059/webview/assets/editor-diff-page-DVdvmt2c.js:1:643)
...
"
error={}
name=AppRoutes
I can reproduce this on macOS Apple Silicon with:
The sidebar preview renders the diff correctly, but opening the full
Codex Diffcustom editor crashes ineditor-diff-pagewith:Oops, an error has occurredThe extension log contains:
Error fetching ... 403 ... /settings/usereditor-diff-page-DVdvmt2c.jserror={}, which hidesmessageandstackI also verified that this is unrelated to:
branchvsunstagedfilterSuggested fixes:
error.message,error.name, anderror.stackexplicitly in the React error boundary instead of serializingErroras{}.EditorDiffPage.fs/readFilefails, render the patch content already available to the sidebar, or show a per-file error with the resolved path.403 /settings/userresponse leaves data required by the full diff editor undefined.The sidebar has enough data to render the same one-line diff, so the full editor should be able to use that data as a fallback.
Temporary Workaround: Downgrade the Codex Extension
A temporary workaround is to downgrade the OpenAI Codex extension to version:
This version appears to avoid the issue introduced in newer releases.
Steps to Reproduce the Workaround
``
text
``Ctrl + Shift + X
``
text
``Install Specific Version...
``
text
``26.715.61943
``
text
``Ctrl + Shift + P
Then run:
``
text
``Developer: Reload Window
Command-Line Alternative
The same version can be installed from the VS Code command line:
After the command completes, restart or reload VS Code.
Prevent Automatic Reinstallation of the Latest Version
To prevent VS Code from automatically upgrading the extension again:
2 Disable automatic updates check box for this extension.
Otherwise, VS Code may replace version
26.715.61943with the latest release and cause the issue to return.Version 26.715.61943 throws "Error creating chat Unknown local project" when i tried to create a new chat.
And the Diff problem hasn't been fixed yet.
Absolutely disappointing.
---
VSCode Versions
Version: 1.130.0
Commit: 1b6a188127eeaf9194f945eb6eb89a657e93c54c
Date: 2026-07-22T14:55:04Z
Electron: 42.6.0
ElectronBuildId: 14623276
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
OS: Linux x64 6.8.0-136-generic snap
same
Thanks @LarryLaiJN
Same issue
sesame
downgrad to 26.715.61943 and it will work 🎈🎈
Yep! Worked for me. Thanks!
Confirmed WSL2 workaround and regression boundary
I reproduced the full Codex Diff editor failure with a clean one-line text change.
Environment tested
1.130.01.131.026.721.41059Behavior with
26.721.41059Oops, an error has occurred.1.131.0to1.130.0did not fix it.Working procedure
``
bash
``code --install-extension openai.chatgpt@26.715.61943 --force
Developer: Reload Window.Result
The dedicated Codex Diff editor rendered the exact one-line diff successfully after the downgrade. The test change was then removed and the Git worktree returned to its previous clean state.
This test isolates the failure to the
26.721.41059extension line in this WSL2 setup; downgrading VS Code itself was not sufficient. No manual deletion of extension directories was required.This remains broken. I'm on Win11, and the git command for diff returns the right content, so the error is entirely within the Codex diff viewer.
Regression update: still broken in 26.727.40816, with an additional thread-context trigger
I previously analyzed the original failure in #35076. The problem is still present in the latest extension I tested, and the new bundle introduces another call that triggers the same exception.
Environment
26.727.40816editor-diff-page-CYrkK60A.jsThe standalone Codex Diff editor still crashes with:
The previously identified thread-only state read used as
hostConfigis still present in the new bundle. I first reapplied the previous diagnostic workaround:However, this was no longer sufficient. The editor still crashed, and the React stack now pointed to:
That location maps to another call in
EditorDiffPage:The standalone
/diffroute is configured withenablePullRequestComments: false, but it still initializescommentPropsthrough a hook/state accessor that requires thread context.As a second diagnostic workaround, I changed:
After applying both diagnostic changes to the local and Remote-SSH copies of the extension and reloading VS Code:
Thread context is unavailable for non-thread routesexception was no longer raised.This indicates that the original non-thread-route issue has not been fixed, and the newer release now has an additional thread-context dependency through
commentProps.These minified bundle edits are only diagnostic workarounds. The variable names are release-specific, and extension updates overwrite the changes.
Suggested source-level fix
The standalone
/diffroute should not unconditionally access thread-only context for eitherhostConfigorcommentProps.Possible fixes:
/diffroute, including a Remote-SSH setup andenablePullRequestComments: false.Please prioritize a source-level fix. This has remained broken across multiple extension releases, and users should not need to downgrade or patch generated bundles to use the Review/Diff editor.
Can confirm it's still happening in
26.727.40816. Weekend is approaching, so hopefully there would be a fix on Friday night.Workaround for Codex Diff crashes in VS Code extension 26.5727.40816
Summary
In Codex – OpenAI's coding agent for Visual Studio Code, opening a file or diff from chat can open a Codex Diff editor that immediately displays:
For the environment in which this issue was reproduced, the underlying error was:
The failure is in the webview frontend bundled with Codex extension version
26.5727.40816. The standalone diff page is registered as a non-thread route, but its renderer reads two stores that require a thread route:The workaround below prevents those two reads on the standalone diff page. It disables comments in that page and supplies the local VS Code host configuration directly. Diff rendering then works normally for a local Windows workspace.
Confirmed environment
1.130.01b6a188127eeaf9194f945eb6eb89a657e93c54copenai.chatgptCodex – OpenAI's coding agent26.5727.40816win32-x64webview/assets/editor-diff-page-Bq5ms-pF.jsThe full default path is:
Symptoms and reproduction
The normal Codex extension log may only contain an unhelpful serialized error:
The useful error is visible in the webview/renderer console. Open the Command Palette and run Developer: Toggle Developer Tools, select Console, and reproduce the problem. The relevant exception is:
Root cause
The affected file is minified into one long line. The relevant renderer originally contains these two expressions:
and:
In this bundle:
l(o)resolves to the diff-comment hook, namedZanin the generated stack. It reads thread-scoped state even though the diff route was created withenablePullRequestComments: false.aeis exported from the shared bundle asUO. That selector derives the current host configuration through a thread-route selector.other, notlocal-threador another supported thread kind.Thread context is unavailable for non-thread routesfor route kindother.The supplied diff payload itself was valid. In the reproduced case it was a string containing a normal unified diff beginning with
diff --git. The exception happened while establishing UI context, before the diff content could be rendered.What the workaround changes
The workaround performs two exact replacements.
1. Disable comments in the standalone diff page
This avoids initializing the thread-dependent comment hook. The trade-off is that inline diff comments are disabled in this standalone panel.
2. Supply the local host configuration
This avoids the thread-dependent host selector while preserving local file access and full-content loading.
This second change is appropriate only for a local VS Code workspace. It should not be used unchanged for Remote SSH, WSL, Dev Containers, or another non-local execution host.
Automated PowerShell workaround
Close any existing Codex Diff editors before running this script. The script is deliberately strict:
26.5727.40816onwin32-x64.Run the following in PowerShell:
After the script completes:
Manual workaround
The automated script is safer because the target file is minified. If a manual edit is necessary:
editor-diff-page-Bq5ms-pF.js.let{commentProps:c}=l(o),d;withlet c={enableComments:!1},d;.x=m(ae),C=S()with `x={id:local,display_name:Local,kind:local},C=S()`.Do not add a broad
try/catcharound the entire minified function unless you carefully preserve every closing brace. A missing brace can leave the finalexportdeclaration inside a function and produce the unrelated syntax errorUnexpected token 'export'.Verification
Check that both replacements are present
The expected values are:
Optional ES-module syntax check
If Node.js is installed:
Success produces no output and exits with status code
0.Rollback
The patch script prints the exact backup path it created. Restore it with:
Then run Developer: Reload Window.
To locate timestamped backups created by the script:
If no backup is available, uninstall the extension, close every VS Code window, rename the exact version directory to a recovery name, and reinstall the extension. Renaming is preferable to deleting because it preserves a recoverable copy.
Limitations and risks
26.5727.40816and asset hashBq5ms-pF. Do not force it onto another version or hash.mtxr.sqltools, are unrelated to this Codex Diff failure.Suggested upstream fix
The production fix should not hard-code the local host. A robust implementation could do one of the following:
cwd, host ID/configuration, and any required conversation context into the standalone diff route when the host opens it.otherwhen the route includes an explicit host configuration.For Remote SSH, WSL, and Dev Containers, the correct host configuration should be forwarded by the extension host instead of inferred or hard-coded in the webview.
Bug report template
Status
This workaround was tested successfully with the exact environment listed above. Remove it when an official extension release fixes standalone Codex Diff routing/context initialization.
The Codex diff feature works in version openai.chatgpt@26.715.61943, but it still contains a bug. Downgrading is not recommended.
When you click New Chat, the Agent continues working in the previous folder, even after you have switched to a different Project Folder.
The current version, codex 26.5727.40816, has fixed this issue. However, there is currently still a problem with the Codex diff feature.
work thanks
Thanks for reporting the issue. We have a fix in place, and it will be included in the next release.
와.. 진짜되네요 감사합니다
Even after updating the Codex extension to version 26.727.40816, the issue still persists. I hope this can be fixed soon.
For anyone still experiencing this issue: in VS Code, open the Extensions view, find the Codex extension, and switch to the Pre-Release version. That resolved the issue for me on Ubuntu.
It's also likely that a stable release containing this fix will be available soon. Once it's released, you can switch back to the regular (stable) version of the extension.
Still error with "26.721.30844" vscode extension on win10
Solved. Thank you.
The pre-release version is : 26.5727.51351
Hopefully I will not get into pre-release bugs...
Confirmed root cause and workaround
I reproduced this on:
The Diff page was failing for two reasons:
1) It attempted to read missing temporary files from disk. Disabling
fullContentNextFallbackToDiskremoved the originalfs/readFile: No such fileerror.2) It then crashed with the actual underlying exception:
The standalone Diff page was reading the thread-scoped
hostConfig, even though it runs as a non-thread route.The following local fallback fixed the crash:
After applying both changes and restarting Antigravity, the changed-files list and Diff opened successfully. No downgrade was required.
This is only a local workaround and may be overwritten by an extension update. The proper upstream fix should avoid reading thread-scoped state from the standalone Diff route and gracefully handle missing temporary files.
In case anyone still uses version 26.715.61943 as a workaround just like me. I updated to the Codex extension openai.chatgpt 26.810.52044 and I no longer have this problem.