VS Code extension app-server exits in a fresh devcontainer because ~/.codex does not exist
What version of the IDE extension are you using?
openai.chatgpt-26.707.91948-linux-arm64
What subscription do you have?
Business
Which IDE are you using?
Visual Studio Code 1.129.0 with Dev Containers 0.466.0
What platform is your computer?
Host: Darwin 25.5.0 arm64 arm; Remote environment: VS Code devcontainer Linux ARM64 mcr.microsoft.com/devcontainers/rust:2-1-trixie
What issue are you seeing?
On the first launch of the Codex extension inside a fresh devcontainer, the Codex panel remains stuck on the logo/loading view.
The extension itself installs successfully in the remote VS Code Server and begins activation. However, its bundled Codex app-server exits immediately because /home/vscode/.codex does not exist:
[info] Activating Codex extension
[info] [CodexMcpConnection] Spawning codex app-server
[error] [CodexMcpConnection] cli: message="WARNING: proceeding, even though we could not create PATH aliases: CODEX_HOME points to \"/home/vscode/.codex\", but that path does not exist
Error: CODEX_HOME points to \"/home/vscode/.codex\", but that path does not exist"
[error] [CodexMcpConnection] Codex process fatal error errorMessage="Codex process errored: Codex app-server process exited unexpectedly (code=1, signal=null)."
[error] [CodexWebviewProvider] Fatal error message="Codex process errored: Codex app-server process exited unexpectedly..."
Neither the repository, .devcontainer/.env, devcontainer.json, nor the container configuration explicitly sets CODEX_HOME.
A new devcontainer naturally does not have /home/vscode/.codex yet. The extension-launched app-server treats this first-run state as fatal, while the webview remains indefinitely on its loading screen.
What steps can reproduce the bug?
- Create a devcontainer based on the Rust devcontainer image:
FROM mcr.microsoft.com/devcontainers/rust:2-1-trixie
- Configure VS Code to install the Codex extension inside the container:
{
"name": "Rust devcontainer",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"extensions": [
"openai.chatgpt"
]
}
}
}
- Ensure this is a fresh container where
/home/vscode/.codexdoes not already exist. - Open the repository in the devcontainer.
- Open the Codex panel.
- Observe that the panel remains on the logo/loading screen.
- Inspect the remote log at:
/home/vscode/.vscode-server/data/logs/<timestamp>/exthost1/openai.chatgpt/Codex.log
- Observe that the app-server exited because
/home/vscode/.codexdoes not exist.
What is the expected behavior?
The extension should support first-run activation in a clean remote environment.
It should either:
- create
~/.codexwith appropriate ownership and permissions; - allow the Codex runtime to initialize its default state directory; or
- display an actionable error instead of leaving the webview stuck indefinitely.
Installing the extension through devcontainer.json should be sufficient to reach the Codex sign-in or initial setup screen.
Additional information
The remote extension package was downloaded, signature-verified, and installed successfully. The failure occurs after activation when the extension spawns its app-server.
Creating /home/vscode/.codex during the image build appears to be a possible workaround:
RUN install -d -o vscode -g vscode /home/vscode/.codex
The remote extension-host log also contains the following warning:
PendingMigrationError: navigator is now a global in nodejs
That appears to be separately tracked by #26509. The deterministic fatal error reported here is the app-server exit caused by the missing Codex home directory.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗