GPT-5.6 Sol fails to execute shell commands: code-mode host exited during handshake

Open 💬 18 comments Opened Jul 13, 2026 by matejhladnik
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.144.2

What subscription do you have?

ChatGPT Pro ($100/month)

Which model were you using?

_No response_

What platform is your computer?

macOS 26.5.2 (Apple Silicon / arm64)

What terminal emulator and version are you using (if applicable)?

Ghostty 1.3.1

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1783937968s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.144.2",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/username/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/username/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/username/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/username/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/username/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/Users/username/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/username/.codex",
        "config.toml": "/Users/username/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/username/Tutorials/tmp/codex-test",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "none",
        "feature flags enabled": "35",
        "log dir": "/Users/username/.codex/log",
        "mcp servers": "1",
        "model": "gpt-5.6-sol",
        "model provider": "openai",
        "sqlite home": "/Users/username/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.55.0",
      "details": {
        "PATH git #1": "/opt/homebrew/bin/git",
        "PATH git #2": "/usr/bin/git",
        "PATH git entries": "2",
        "git build options": "git version 2.55.0; cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.7.1; zlib: 1.2.12; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "/opt/homebrew/opt/git/libexec/git-core",
        "git version": "git version 2.55.0",
        "repo detected": "false",
        "selected git": "/opt/homebrew/bin/git"
      },
      "remediation": null,
      "durationMs": 140
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/opt/homebrew/bin/codex",
        "current executable": "/opt/homebrew/bin/codex",
        "install context": "brew",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed by pnpm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 3
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "streamable_http servers": "1"
      },
      "remediation": null,
      "durationMs": 215
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 218
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 617
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running brew on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/opt/homebrew/bin/codex",
        "install method": "brew",
        "platform": "macos-aarch64",
        "version": "0.144.2"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (system)",
      "details": {
        "search command": "rg",
        "search command readiness": "ripgrep 15.1.0",
        "search provider": "system"
      },
      "remediation": null,
      "durationMs": 3
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/username/.codex/tmp/arg0/codex-arg0bvZ16h/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/username/.codex (dir)",
        "active rollout files": "428 files, 277306644 total bytes, 647912 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/Users/username/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/username/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/username/.codex/log (dir)",
        "memories DB": "/Users/username/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/username/.codex (dir)",
        "state DB": "/Users/username/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 363
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "428",
        "rollout DB active rows": "428",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=428",
        "rollout DB rows": "428",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "vscode=418, cli=10",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 977
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-SI",
      "details": {
        "EDITOR": "not set",
        "LANG": "en_US.UTF-8",
        "LESS": "set",
        "PAGER": "set",
        "VISUAL": "not set",
        "os": "Mac OS 26.5.2 [64-bit]",
        "os language": "en-SI",
        "os type": "Mac OS",
        "os version": "26.5.2"
      },
      "remediation": null,
      "durationMs": 2
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORTERM": "truecolor",
        "TERMINFO": "/Applications/Ghostty.app/Contents/Resources/terminfo (dir)",
        "TERM_PROGRAM": "ghostty",
        "color output": "enabled",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "Ghostty",
        "terminal size": "316x80",
        "terminal version": "1.3.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "cwd",
        "terminal title project value": "codex-test",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.144.1",
        "check for update on startup": "true",
        "last checked at": "2026-07-13T06:07:04.217709Z",
        "latest version": "0.144.3",
        "latest version status": "newer version is available",
        "update action": "brew upgrade --cask codex",
        "version cache": "/Users/username/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 53
    }
  }
}

What issue are you seeing?

GPT-5.6 models can answer normal text prompts, but every shell/tool execution fails before the first command runs. The shell retries multiple times and eventually fails with:

code-mode host exited during handshake

GPT-5.5 works correctly in the same environment and can execute shell commands without any issues.

I reproduced this in an empty directory, multiple repositories, after reinstalling Codex 0.144.2, and with codex doctor reporting no problems.

What steps can reproduce the bug?

Uploaded thread: 019f5afa-2ce8-76a3-85d7-7d8a32c761c7

What is the expected behavior?

GPT-5.6 should initialize the shell successfully and execute the requested command, just like GPT-5.5 does. For example, Run pwd and list the files in this directory. should return the current working directory and file listing instead of failing during shell initialization.

Additional information

  • Codex CLI: 0.144.2 (installed via Homebrew)
  • macOS 26.5.2 (Apple Silicon / arm64)
  • ChatGPT Pro subscription (ChatGPT authentication, not API key)
  • codex doctor reports no issues
  • Reinstalling Codex did not resolve the issue
  • Reproduced in an empty directory and in multiple repositories
  • GPT-5.6 can answer normal text prompts; the failure only occurs when it attempts to execute shell/tool commands
  • GPT-5.5 works correctly in the same environment and can execute shell commands successfully
  • I also reproduced the same behavior in T3 Code and OpenCode when using GPT-5.6

Update

I upgraded to Codex CLI 0.144.3 and tested again.

The issue is still reproducible:

  • GPT-5.6 Sol can answer normal text prompts.
  • Any request requiring shell/tool execution fails before the first command runs with:

``
code-mode host exited during handshake
``

  • GPT-5.5 continues to work correctly in the same environment and can execute shell commands successfully.

I also confirmed the issue is not repository-specific by reproducing it in a brand-new empty directory.

View original on GitHub ↗

18 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #32696

Powered by Codex Action

MinanaYaa · 8 days ago

Don't change the fxxx input, give back the transformer "pasted-text.txt -> input text", stupid codex

hxlacceptedmsn · 2 days ago

I can reproduce the same model-specific A/B behavior on Windows x64.

Environment:

  • Codex Desktop: OpenAI.Codex 26.820.7780.0 x64
  • Bundled CLI: codex-cli 0.150.0-alpha.8
  • Windows PowerShell / PowerShell 7.6.5
  • ChatGPT authentication

The desktop initially had the separate 26.820 bundled-resource
relocation regression. I recovered it by materializing the per-user
runtime caches from the currently installed official Store package.

The desktop and app server now start normally.

Model A/B test using the same machine, app installation, working
directory, account, and PowerShell command:

GPT-5.6 Sol Ultra:
code-mode host exited during handshake

GPT-5.5:
The same PowerShell command executes successfully and returns the
expected output.

Local code-mode host validation:

  • Desktop is using:

%LOCALAPPDATA%\OpenAI\Codex\bin\d0097be4feba73d0\codex.exe

  • codex-code-mode-host.exe exists beside that CLI
  • Cached host is not encrypted
  • Cached host and official MSIX source have identical size
  • SHA-256 for both:

3B93FC5DF0B38358D7FFFB290A3F11A56CECBEBBF70EB62BF8C58D6D994B28E3

  • Authenticode signature: Valid
  • Signer: OpenAI OpCo, LLC
  • codex-code-mode-host.exe --help exits successfully with code 0
  • No matching Application Error, Code Integrity, or Defender events
  • Desktop AppServerConnection initialization handshake succeeds

This appears to be a GPT-5.6 Code Mode handshake regression or
compatibility issue rather than a missing, corrupted, encrypted, or
blocked local host binary. GPT-5.5 tool execution remains functional.

tianleiMoMo · 2 days ago

I have also encountered a similar issue while using Codex version 26.819.11345. When using GPT-5.6, it is only capable of chatting and cannot function properly, displaying the error 'code-mode host exited during handshake.' However, when switching to GPT-5.5, it works normally. I believe this is a problem with the model. I kindly request the developers to address this issue.

yuan6nice · 2 days ago
I have also encountered a similar issue while using Codex version 26.819.11345. When using GPT-5.6, it is only capable of chatting and cannot function properly, displaying the error 'code-mode host exited during handshake.' However, when switching to GPT-5.5, it works normally. I believe this is a problem with the model. I kindly request the developers to address this issue.

Same here. A few hours ago, I was still able to use 5.6 sol to run tasks normally. However, after I refined some of my plans and tried running the task again, it suddenly stopped working. I suspect there may have been an automatic version update in the meantime. Like you, switching to the 5.5 model made it work again.

tianleiMoMo · 2 days ago
> I have also encountered a similar issue while using Codex version 26.819.11345. When using GPT-5.6, it is only capable of chatting and cannot function properly, displaying the error 'code-mode host exited during handshake.' However, when switching to GPT-5.5, it works normally. I believe this is a problem with the model. I kindly request the developers to address this issue. Same here. A few hours ago, I was still able to use 5.6 sol to run tasks normally. However, after I refined some of my plans and tried running the task again, it suddenly stopped working. I suspect there may have been an automatic version update in the meantime. Like you, switching to the 5.5 model made it work again.

Yes, I also believe it may be related to the update. Everything was working fine for me until a few minutes ago when I manually updated Codex. After that, I used it as usual, but it reported the error "codex code-mode host exited during handshake". This is truly frustrating. I initially suspected that the issue might be with my computer or my .git, but after reading previous responses, I feel it may indeed be related to the update. Moreover, switching to GPT-5.5 allows it to work normally, which rules out any issues with my local folder.[eos]

hxlacceptedmsn · 2 days ago

Confirmed: rolling back the complete Windows Desktop package fixes the
GPT-5.6 Code Mode handshake failure on the same machine.

Controlled version A/B:

Broken

Codex Desktop: 26.820.7780.0 x64
Bundled CLI: 0.150.0-alpha.8
Model: GPT-5.6 Sol Ultra
Result: code-mode host exited during handshake

The failure reproduced repeatedly before the first PowerShell command
was executed.

GPT-5.5 Extra High continued to execute local tools normally on the same
installation.

Working after rollback

I downloaded the official OpenAI CDN MSIX for:

OpenAI.Codex 26.818.8289.0 x64

I performed an in-place AppX downgrade with
-ForceUpdateFromAnyVersion. The resulting package state is:

Version: 26.818.8289.0
Architecture: X64
SignatureKind: Store
Status: Ok

CODEX_CLI_PATH remains unset at Process, User, and Machine scope.

After launching 26.818.8289.0, GPT-5.6 Sol successfully executed the
same PowerShell smoke test that failed on 26.820:

Write-Output 'CODE_MODE_SMOKE_OK'

Result:

Command actually executed
Exit code: 0
Output: CODE_MODE_SMOKE_OK

PowerShell 7 remains installed, and no AppX-volume, WindowsApps ACL,
ownership, Defender, PATH, or environment-variable changes were made
between the failing and working GPT-5.6 tests.

This strongly isolates the regression to the Desktop/runtime combination
introduced in 26.820.7780.0, rather than to PowerShell, the project,
the account, or a generally broken local tool environment.
Sprith-J · 2 days ago

I can confirm a very similar failure on Windows Codex Desktop after clean restarts. This appears to affect the Desktop GPT-5.6 local tool / code-mode path specifically.

Environment

  • OS: Windows 11 Professional, Windows 10.0.26200, x64
  • Codex Desktop: OpenAI.Codex 26.820.7780.0
  • Bundled CLI: codex-cli 0.150.0-alpha.8
  • Auth: ChatGPT authentication
  • codex.exe:

%LOCALAPPDATA%\OpenAI\Codex\bin\d0097be4feba73d0\codex.exe

  • codex-code-mode-host.exe:

%LOCALAPPDATA%\OpenAI\Codex\bin\d0097be4feba73d0\codex-code-mode-host.exe

Desktop Reproduction

In brand-new no-project Codex Desktop tasks:

  • GPT-5.6 Sol fails to run a simple local PowerShell command.
  • GPT-5.6 Luna also fails to run a simple local PowerShell command.
  • GPT-5.5 succeeds with local tool execution on the same machine after the same restart.

Example failing prompt:

Use the local shell tool to run exactly:
Write-Output DESKTOP_GPT56_AFTER_RESTART_OK_1

Desktop result:

The command could not run: the local shell host exited during handshake on all three attempts. No command output was produced.

Controls Already Checked

  • Fully quit and restarted Codex Desktop multiple times; GPT-5.6 Desktop still fails.
  • User, Machine, and current Process CODEX_CODE_MODE_HOST_PATH are all empty after clean restart.
  • Explicit host path override was previously tested and did not fix Desktop GPT-5.6; it has been removed.
  • codex-code-mode-host.exe exists beside codex.exe.
  • codex-code-mode-host.exe --help succeeds with exit code 0.
  • Host and CLI Authenticode signatures are valid, signer OpenAI OpCo, LLC.
  • No matching recent Windows Application Error, Code Integrity, or Defender event was found for the host.
  • GPT-5.5 Desktop local tools continue to work.
  • The same bundled CLI can run GPT-5.6 Sol local tools successfully.
  • A separately spawned temporary app-server using the same codex.exe, same auth, same machine, and same GPT-5.6 Sol model also succeeds.

Log Evidence Summary

Recent local logs show the failure under:

target=codex_core::tools::router
dispatch_tool_call_with_code_mode_result
error=code-mode host exited during handshake

Both GPT-5.6 Sol and GPT-5.6 Luna produced three consecutive handshake failures before the first PowerShell command executed. I can provide the exact log rows / call IDs privately if maintainers need them.

Assessment

This does not look like a corrupted local host binary, workspace issue, authentication issue, Defender block, or general GPT-5.6 availability problem. The failure appears specific to the Codex Desktop GPT-5.6 code-mode/custom-tool routing path in the 26.820.7780.0 Desktop/runtime combination.

Could the team please confirm whether this is a known regression and whether there is a safe feature-flag workaround or patched Desktop build?

tianleiMoMo · 2 days ago
确认:回滚完整的Windows桌面包可以修复同一台机器上的GPT-5.6代码模式握手失败。 受控版本A/B: ## 破碎 `` Codex Desktop: 26.820.7780.0 x64 Bundled CLI: 0.150.0-alpha.8 Model: GPT-5.6 Sol Ultra Result: code-mode host exited during handshake The failure reproduced repeatedly before the first PowerShell command was executed. GPT-5.5 Extra High continued to execute local tools normally on the same installation. Working after rollback I downloaded the official OpenAI CDN MSIX for: OpenAI.Codex 26.818.8289.0 x64 I performed an in-place AppX downgrade with -ForceUpdateFromAnyVersion. The resulting package state is: Version: 26.818.8289.0 Architecture: X64 SignatureKind: Store Status: Ok CODEX_CLI_PATH remains unset at Process, User, and Machine scope. After launching 26.818.8289.0, GPT-5.6 Sol successfully executed the same PowerShell smoke test that failed on 26.820: Write-Output 'CODE_MODE_SMOKE_OK' Result: Command actually executed Exit code: 0 Output: CODE_MODE_SMOKE_OK PowerShell 7 remains installed, and no AppX-volume, WindowsApps ACL, ownership, Defender, PATH, or environment-variable changes were made between the failing and working GPT-5.6 tests. This strongly isolates the regression to the Desktop/runtime combination introduced in 26.820.7780.0, rather than to PowerShell, the project, the account, or a generally broken local tool environment. ``

So you also encountered the same problem, right?
Do you think it was caused by updating to the new version?
However, it is very strange that when I asked people around me to help test, they also updated to the latest version, but did not encounter this problem and were able to use GPT-5.6 normally.

Sprith-J · 2 days ago
> 确认:回滚完整的Windows桌面包可以修复同一台机器上的GPT-5.6代码模式握手失败。 > 受控版本A/B: > ## 破碎 > `` > Codex Desktop: 26.820.7780.0 x64 > Bundled CLI: 0.150.0-alpha.8 > Model: GPT-5.6 Sol Ultra > Result: code-mode host exited during handshake > > The failure reproduced repeatedly before the first PowerShell command > was executed. > > GPT-5.5 Extra High continued to execute local tools normally on the same > installation. > > Working after rollback > > I downloaded the official OpenAI CDN MSIX for: > > OpenAI.Codex 26.818.8289.0 x64 > > I performed an in-place AppX downgrade with > -ForceUpdateFromAnyVersion. The resulting package state is: > > Version: 26.818.8289.0 > Architecture: X64 > SignatureKind: Store > Status: Ok > > CODEX_CLI_PATH remains unset at Process, User, and Machine scope. > > After launching 26.818.8289.0, GPT-5.6 Sol successfully executed the > same PowerShell smoke test that failed on 26.820: > > Write-Output 'CODE_MODE_SMOKE_OK' > > Result: > > Command actually executed > Exit code: 0 > Output: CODE_MODE_SMOKE_OK > > PowerShell 7 remains installed, and no AppX-volume, WindowsApps ACL, > ownership, Defender, PATH, or environment-variable changes were made > between the failing and working GPT-5.6 tests. > > This strongly isolates the regression to the Desktop/runtime combination > introduced in 26.820.7780.0, rather than to PowerShell, the project, > the account, or a generally broken local tool environment. > `` So you also encountered the same problem, right? Do you think it was caused by updating to the new version? However, it is very strange that when I asked people around me to help test, they also updated to the latest version, but did not encounter this problem and were able to use GPT-5.6 normally.

Given the rollback report above, this does seem likely to be related to the newer Desktop version, although it may not affect every user on the latest build.

One more piece of context that may or may not be relevant: after updating to the affected Desktop version, my main workflow involved one parent conversation driving multiple subtask conversations. I am not sure whether that contributed to triggering or exposing the issue, but it is a difference from some nearby users who updated to the latest version and did not reproduce the failure.

That said, after the failure started, I was able to reproduce it in brand-new no-project Desktop tasks after clean restarts, so it does not appear to be limited to one corrupted old conversation.

TYueMing · 1 day ago
I have also encountered a similar issue while using Codex version 26.819.11345. When using GPT-5.6, it is only capable of chatting and cannot function properly, displaying the error 'code-mode host exited during handshake.' However, when switching to GPT-5.5, it works normally. I believe this is a problem with the model. I kindly request the developers to address this issue.

I have also encountered a similar issue while using Codex version 26.819.11345. 5.5 works ,but 5.6 not

GG-bonded · 1 day ago

It’s honestly mind-boggling how a multi-billion dollar AI company manages to completely break a foundational, business-critical feature like Code Mode in GPT-5.6 Sol. The fact that a fresh local execution environment crashes on a basic handshake, and we're forced to downgrade to GPT-5.5 just to run Get-Date, is an absolute joke. Stop shipping half-baked Alpha versions as production-ready models and fix your sandbox infrastructure already. We are paying to build tools, not to debug your basic communication pipe errors.

fa1247 · 1 day ago

I found a minimal workaround on Windows (by Codex CLI).

Environment:

  • Codex Desktop 26.820.7780.0
  • bundled codex-cli 0.150.0-alpha.8
  • Windows 11 build 26100

The same bundled codex.exe behaves differently depending on its process CWD:

  • CWD = the Codex WindowsApps ...\app directory → GPT-5.6 tool calls fail with code-mode host exited during handshake
  • CWD = %USERPROFILE% or the project directory → the tool call succeeds

The workaround is to point CODEX_CLI_PATH to a small native forwarding shim. The shim:

  1. calls SetCurrentDirectory(%USERPROFILE%);
  2. sets the child CODEX_CLI_PATH back to the real official codex.exe to avoid recursion;
  3. starts the real CLI with the original raw arguments;
  4. directly inherits stdin/stdout/stderr handles—do not proxy the app-server JSONL streams.

Conceptually:

```text
Desktop
-> codex-cwd-shim.exe
chdir(%USERPROFILE%)
CODEX_CLI_PATH=<real codex.exe>
CreateProcess(<real codex.exe>, original args,
inheritHandles=true,
stdin/stdout/stderr=GetStdHandle(...))

Then set:

[Environment]::SetEnvironmentVariable(
"CODEX_CLI_PATH",
"$env:USERPROFILE\.codex\bin\codex-cwd-shim.exe",
"User"
)

and restart Codex Desktop.

kantuzi · 8 hours ago

I can reproduce the same issue on Windows.

Environment:

  • ChatGPT/Codex Desktop: 26.820.7780.0
  • Bundled Codex CLI: 0.150.0-alpha.8
  • Installation source: Microsoft Store
  • Windows: 64-bit, build 26200

Behavior:

  • GPT-5.6 Sol: every local shell/tool call fails with:

code-mode host exited during handshake

  • GPT-5.5: the same local shell commands work normally.

Isolation performed:

  • Completely uninstalled and reinstalled the Microsoft Store app.
  • Removed the previous Codex user configuration, runtimes, skills, plugins, and agents.

codex-doctor.json

  • Created a completely new Windows user account.
  • Signed into Codex under the new Windows account without restoring any old .codex data.
  • Tested before installing any skills, plugins, or EasyEDA agent.
  • The issue still reproduces with GPT-5.6 Sol.
  • Switching only the model to GPT-5.5 immediately restores local command execution.

Therefore, this does not appear to be caused by the Windows user profile, proxy configuration, skills, plugins, EasyEDA agent, or a corrupted Codex installation. It appears to be specific to GPT-5.6 Sol tool execution / code-mode host initialization.

xiuql-a11y · 3 hours ago

I’m seeing the same issue on Windows with GPT-5.6 Sol.

Environment:

  • Codex Desktop: 26.825.3734.0
  • Windows app package: OpenAI.Codex_26.825.3734.0_x64
  • Model: gpt-5.6-sol
  • Reasoning effort tested: xhigh and other settings
  • Windows sandbox config: [windows] sandbox = "unelevated"
  • Project: empty/minimal trusted local directory

Symptom:

  • Any minimal local command or file read under GPT-5.6 Sol fails before execution with:

code-mode host exited during handshake

  • The same machine, same project, and same Codex installation work normally with GPT-5.5.
  • Example minimal test: reading a simple local text file fails under GPT-5.6 Sol before command execution, but succeeds under GPT-5.5.

Troubleshooting already attempted:

  • Fully quit Codex, restarted Windows, restarted Codex process.
  • Reinstalled/repaired Codex Desktop.
  • Renamed/backed up runtime cache and allowed Codex to rebuild runtime.
  • Checked Windows Reliability Monitor and Event Viewer.
  • Windows Security protection history showed no recent quarantine/block event.
  • Checked project ownership; current project owner matches the Windows user.
  • .agents does not exist in the minimal test project, so the known .agents ownership workaround does not apply.
  • Confirmed sandbox = "unelevated" was already set; this does not resolve the issue.
  • Manually launching the code-mode host binary appears to work, which suggests the failure occurs during GPT-5.6 Sol integration/handshake rather than from the binary being missing or immediately blocked.
  • Temporarily tested removing GPT-5.6 Sol’s code_mode_only marker from the local model cache and making the cache read-only. This did not provide a valid fix and was reverted.

Conclusion:
This looks model-specific: GPT-5.6 Sol fails during Windows code-mode/sandbox handshake, while GPT-5.5 works in the same environment. Please investigate the GPT-5.6 Sol Windows code-mode integration path and provide either a fixed Codex build/model config or an official workaround.

xiuql-a11y · 3 hours ago
kantuzi · 2 hours ago

Thank you,This method works for me too。

折断翅膀在飞
@.***