VS Code extension app-server exits in a fresh devcontainer because ~/.codex does not exist
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker, rust, vscode
- Domain
- developer-experience, devtools
Research direction
Reproduce the failure with the Rust image and the extension entry in devcontainer.json, ensuring /home/vscode/.codex is absent. Start with the remote Codex.log path and trace the extension's app-server launch and CODEX_HOME handling; done means a fresh container reaches the Codex sign-in or setup screen instead of remaining on the loading view.
Written by the indexing model from the issue text.
Description
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 openai/codex#26509. The deterministic fatal error reported here is the app-server exit caused by the missing Codex home directory.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·