Codex VS Code extension 26.x fails to load webview (ServiceWorker error) on Windows

Open 💬 12 comments Opened Mar 15, 2026 by Tuservermu

What version of the Codex App are you using (From “About Codex” dialog)?

26.311.21342

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 10 x64 Also reproducible on Windows Server 2016

What issue are you seeing?

The Codex extension webview fails to load.

Error message in VS Code:

Error loading webview:
Error: Could not register service worker
InvalidStateError: Failed to register a ServiceWorker
The document is in an invalid state.

The Codex UI does not load and the panel stays blank.

What steps can reproduce the bug?

  1. Install Codex extension version 26.311.21342 in VS Code.
  2. Restart VS Code.
  3. Open the Codex panel from the sidebar.
  4. The Codex UI does not load and the panel stays blank.

Error shown in VS Code:
Error loading webview:
Could not register service worker
InvalidStateError: Failed to register a ServiceWorker
The document is in an invalid state.

Downgrading the extension to version 0.4.79 fixes the issue immediately.

Tested on:

  • Windows 10
  • Windows Server 2016

Both systems reproduce the same problem with version 26.x.

What is the expected behavior?

  1. Install Codex extension version 26.311.21342
  2. Open the Codex panel in VS Code
  3. The webview fails to load

The issue happens every time.

Downgrading to version 0.4.79 fixes the issue immediately.

Versions tested:

Works:
0.4.79

Does NOT work:
26.304.20706
26.311.21342

This happens on two different systems:

  • Windows 10
  • Windows Server 2016

The extension worked yesterday but stopped working after updating.

Additional information

_No response_

View original on GitHub ↗

12 Comments

snapps91 · 4 months ago

I confirm the same error present with Fedora 43 after the update

renandecarlo · 4 months ago

I'm having the same with Cursor + Codex, Windows 11

<img width="603" height="972" alt="Image" src="https://github.com/user-attachments/assets/96289281-6da5-440c-9a83-7d48defac875" />

renandecarlo · 3 months ago

In my case it was the state.vscdb* files corrupted for some reason. I just deleted them.
In Windows, they're located at: %APPDATA%\Cursor\User\globalStorage

obayit · 2 months ago

Happened to me on macOS, only after I deleted the vscode dmg file by mistake thinking it wasn't important (is it? I am only a linux user)

rostidev · 11 days ago

Me to:

Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

Sometimes it happens, sometimes it don't, so I just restart VS Code. Sometimes it doesn't start without such an error and I restart VS Code again.

Codex version: 26.707.31123
VS Code version: 1.128.0
OS: Fedora 44 Linux with all latest updates

sirber · 10 days ago

Having the same kind of issue on Fedora 44, with releases from the last month. Sometimes it passes, but now it doesn't most of the time.

vinupriyesh · 8 days ago

codex: 26.707.41301-linux-x64
VS Code: 1.128.0
OS: Ubuntu 26.04 LTS (Resolute Raccoon)

Same issue in Ubuntu

OneMingQi · 7 days ago

ubuntu22.04在最新版本上出现了同样的问题

tsychris · 6 days ago
ubuntu22.04在最新版本上出现了同样的问题

同样的ubuntu22.04出现问题,有什么解决方法吗

sirber · 4 days ago

same with 26.707.91948. it hangs VS Code. Clearing all the "state.vscdb" did nothing good.

<img width="547" height="1012" alt="Image" src="https://github.com/user-attachments/assets/1d1214d9-7507-45cb-bb66-9cb118a08e01" />

how can they release so many broken versions?

rostidev · 4 days ago
how can they release so many broken versions?

This is what I'm asking myself all the time since I made my Pro subscription.

sirber · 3 days ago

the logs I get:

2026-07-17 11:20:17.058 [info] Activating Codex extension
2026-07-17 11:20:17.058 [info] [CodexMcpConnection] Spawning codex app-server
2026-07-17 11:20:17.058 [info] [IpcRouter] I am the router
2026-07-17 11:20:17.058 [warning] [IpcClient] Received broadcast but no handler is configured method=client-status-changed
2026-07-17 11:20:17.346 [info] [CodexMcpConnection] Initialize received id=1
2026-07-17 11:20:18.071 [info] [IpcRouter] I am the router
2026-07-17 11:20:18.073 [info] [IpcRouter] I am the router
2026-07-17 11:20:18.073 [warning] [IpcClient] Received broadcast but no handler is configured method=client-status-changed

the extention only show a loader. if I refresh the window, vscode crashes

<img width="645" height="260" alt="Image" src="https://github.com/user-attachments/assets/968b6790-1b87-4f2c-bc3f-d049d6b7ef13" />

with code --disable-gpu

<img width="728" height="1050" alt="Image" src="https://github.com/user-attachments/assets/18fccd09-e768-43e7-8c41-902e161c7562" />