openai / openai/codex

Windows Codex Desktop GPT-5.6 fails with "code-mode host exited during handshake" while GPT-5.5 Desktop and GPT-5.6 CLI work

Open
#40,943 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

26.820.7780.0

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop consistently fails to execute local tools with GPT-5.6 on my Windows PC.

The exact error is:

code-mode host exited dur

Codex_GPT56_Bug_Evidence_Package.zip

ing handshake

Commands such as whoami never actually execute, and Desktop returns:

stdout: unavailable
exit code: unavailable

Important A/B result:

GPT-5.5 Desktop: WORKS
GPT-5.6 Desktop: FAILS
GPT-5.6 Luna CLI: WORKS
GPT-5.6 Sol CLI: WORKS

A second Windows PC using the same ChatGPT/Codex account, the same Windows build, the same Codex Desktop version, the same Codex CLI version, and the same codex.exe SHA256 can execute GPT-5.6 tools normally in Codex Desktop.

The affected machine has been tested with both the standalone and npm Codex 0.149.1 layouts. Codex Desktop was verified to actually use the npm vendor codex.exe, but GPT-5.6 Desktop still fails.

The WebSocket connection has also been verified successfully with HTTP 101 Switching Protocols. The Skills traversal issue was separately isolated. codex-code-mode-host.exe exists, has a valid OpenAI signature, valid ACLs, and can be executed manually with --help, returning exit code 0.

The failure appears specific to the Codex Desktop -> GPT-5.6 -> Code Mode Host handshake path.

Codex_GPT56_Bug_Evidence_Package.zip

Codex_bug_reproduction_steps.txt

What steps can reproduce the bug?

Feedback ID: 01a03f09-6f13-7f30-a8c6-15c9254048b9

What is the expected behavior?

GPT-5.6 in Codex Desktop should start the local tool, execute whoami, and return the real stdout and exit code.

The expected behavior is the same as GPT-5.5 Desktop and GPT-5.6 CLI on the affected machine.

For example:

stdout: <actual Windows/Codex sandbox identity>
exit code: 0

Additional information

Affected machine:

  • Windows 11 Home, Build 26200, x64
  • Codex Desktop: 26.820.7780.0
  • codex-cli: 0.149.1
  • codex.exe SHA256:
    A395030B56B126F608F2403036DDDB654A9C063213E9C2B5F85D954CF490EBE6

Working comparison machine:

  • Same ChatGPT/Codex account
  • Windows 11 Home, Build 26200, x64
  • Codex Desktop: 26.820.7780.0
  • codex-cli: 0.149.1
  • Same codex.exe SHA256
  • GPT-5.6 Desktop tool execution works normally

Additional diagnostics already performed:

  • Desktop -> codex app-server stdio initialization succeeds.
  • Both gpt-5.6-luna and gpt-5.6-sol execute real shell commands successfully through CLI.
  • GPT-5.5 Desktop works on the affected PC.
  • Reproduced in a new conversation and normal local workspace.
  • Tested both standalone and npm Codex 0.149.1 layouts.
  • Verified Desktop is actually launching the npm vendor codex.exe with features.code_mode_host=true.
  • Codex Doctor reports installation consistent.
  • WebSocket handshake succeeds with HTTP 101 Switching Protocols.
  • Large .codex/skills tree was isolated and reduced; failure remains.
  • codex-code-mode-host.exe has a valid OpenAI Authenticode signature.
  • ACLs permit execution.
  • codex-code-mode-host.exe --help runs normally and exits with code 0.
  • Process monitoring did not capture a normal Code Mode Host lifecycle during the Desktop GPT-5.6 failure.
  • Similar bundled executable relocation warnings are also present on the working comparison PC.

Suspected failing layer:

Codex Desktop
-> codex.exe app-server
-> successful app-server initialization
-> GPT-5.6 tool request
-> Code Mode Host initialization
-> Desktop / Code Mode Host handshake

Codex_bug_reproduction_steps.txt

-> code-mode host exited during handshake

Please investigate the Windows GPT-5.6 Desktop Code Mode Host spawn/handshake path, including host process creation, inherited environment, stdio/pipe handles, host stderr and exit status, and differences between GPT-5.5 and GPT-5.6 tool dispatch.

Codex_GPT56_Bug_Evidence_Package.zip

Codex_bug_reproduction_steps.txt

Contributor guide

Open the contributing guide

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.

Research direction

Start with Codex_bug_reproduction_steps.txt and the attached evidence package, then reproduce GPT-5.6 Desktop tool execution on Windows with whoami. Trace the Codex Desktop -> codex.exe app-server -> Code Mode Host spawn and handshake path, including process creation, inherited environment, stdio or pipe handles, stderr, and exit status. Done means GPT-5.6 Desktop starts the local tool and returns actual stdout with exit code 0, matching GPT-5.5 Desktop and GPT-5.6 CLI.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.