Panel stuck on loading screen when multiple VS Code windows start at once (app-server exits, UI never recovers)

Open
#64,231 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, typescript, vscode
Domain
desktop, devtools

Research direction

Start by tracing the VS Code extension's app-server startup and manager storage initialization, using the reported Initialize received log and RpcImportHook was already disposed stack trace as entry points. Check how simultaneous window activation and app-server exit are handled, then reproduce by restoring several VS Code windows together. Done means each panel loads or reports and recovers from an app-server failure.

Written by the indexing model from the issue text.

Description

app-server bug extension
What version of the IDE extension are you using?

openai.chatgpt 26.1120.50957 (darwin-arm64)

What subscription do you have?

pro 5x

Which IDE are you using?

VS Code 1.148.0

What platform is your computer?

Darwin 27.2.0 arm64 arm (macOS 27.2.1) - macbook pro m1 2021

What issue are you seeing?

VS Code restored 3 windows at startup, and each one activated the Codex extension and started its own codex app-server at the same moment.

In one window the Codex panel never got past the loading icon. That window's log ends at Initialize received and never reaches React root render requested / app routes mounted. Afterwards no codex app-server process was running at all, and the panel stayed frozen without retrying.

Log of the stuck window (ends here):

[info] [CodexMcpConnection] Spawning codex app-server
[info] [CodexMcpConnection] Initialize received id=1

The other two windows loaded, but both logged:

[extension-app-server-manager] Could not initialize manager storage
errorMessage="This RpcImportHook was already disposed."
  at L_e.getEntry (out/extension.js:237:44869)
  at L_e.call (out/extension.js:237:44944)
  at t$.setConnected (out/extension.js:1589:132460)

Expected: each window starts on its own, or the panel notices the app-server is gone and restarts it or shows an error.

Workaround: run Developer: Reload Window in the stuck window.

What steps can reproduce the bug?
  1. Open 3 VS Code windows with the Codex extension installed.
  2. Quit VS Code (Cmd+Q) and launch it again so all 3 windows are restored at once.
  3. Open the Codex panel in each window: in one of them it may stay stuck on the loading icon.
What is the expected behavior?

The Codex panel loads in every window, or shows an error and restarts the app-server.

Additional information

No response

Dominant language
Rust
Stars
136k
Forks
21.6k
Avg merge
1m
Merged PRs (30d)
997

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.