WebSocket disconnects before response.completed after viewing multiple images in a long Codex CLI turn
What version of Codex CLI is running?
codex-cli 0.144.3 The same issue was also reproduced with codex-cli 0.144.1.
What subscription do you have?
Pro
Which model were you using?
gpt-5.6-sol with xhigh
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty 1.3.2 running inside cmux. No tmux, screen, or zellij.
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1783974738s since unix epoch",
"overallStatus": "ok",
"codexVersion": "0.144.1",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/Users/ysss/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/Users/ysss/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/Users/ysss/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/Users/ysss/.codex/app-server-daemon/settings.json (missing)",
"status": "not running",
"update-loop pid file": "/Users/ysss/.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/ysss/.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/ysss/.codex",
"config.toml": "/Users/ysss/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/Users/ysss/Documents/ResearchWiki",
"enabled feature flags": "shell_tool, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, multi_agent_v2, 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": "multi_agent_v2=true",
"feature flags enabled": "36",
"log dir": "/Users/ysss/.codex/log",
"mcp servers": "3",
"model": "gpt-5.6-sol",
"model provider": "openai",
"sqlite home": "/Users/ysss/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.50.1 (Apple Git-155)",
"details": {
".git entry": "directory",
"PATH git #1": "/usr/bin/git",
"PATH git entries": "1",
"git branch": "main",
"git build options": "git version 2.50.1 (Apple Git-155); cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon; libcurl: 8.7.1; zlib: 1.2.12; SHA-1: SHA1_DC; SHA-256: SHA256_BLK",
"git exec path": "/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core",
"git version": "git version 2.50.1 (Apple Git-155)",
"repo detected": "true",
"repo root": "/Users/ysss/Documents/ResearchWiki",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 239
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/usr/local/bin/codex",
"current executable": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/bin/codex",
"install context": "npm (package /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin, bin /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/bin, resources /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/codex-resources, path /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "/usr/local/lib/node_modules/@openai/codex",
"npm update target": "/usr/local/lib/node_modules/@openai/codex"
},
"remediation": null,
"durationMs": 517
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": {
"configured servers": "3",
"disabled servers": "1",
"stdio servers": "3"
},
"remediation": null,
"durationMs": 1
},
"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 404)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 464
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv6",
"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": 915
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on macos-x86_64",
"details": {
"commit": "unknown",
"current executable": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/bin/codex",
"install method": "npm (package /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin, bin /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/bin, resources /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/codex-resources, path /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/codex-path)",
"platform": "macos-x86_64",
"version": "0.144.1"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-x64/vendor/x86_64-apple-darwin/codex-path/rg",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "Never",
"codex-linux-sandbox helper": "none",
"execve wrapper helper": "/Users/ysss/.codex/tmp/arg0/codex-arg0HJMWZF/codex-execve-wrapper",
"filesystem sandbox": "unrestricted",
"network sandbox": "enabled"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/Users/ysss/.codex (dir)",
"active rollout files": "149 files, 353721860 total bytes, 2373972 average bytes",
"archived rollout files": "1 files, 145274 total bytes, 145274 average bytes",
"goals DB": "/Users/ysss/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/Users/ysss/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/Users/ysss/.codex/log (dir)",
"memories DB": "/Users/ysss/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"sqlite home": "/Users/ysss/.codex (dir)",
"state DB": "/Users/ysss/.codex/state_5.sqlite (file)",
"state DB integrity": "ok"
},
"remediation": null,
"durationMs": 1712
},
"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": "149",
"rollout DB active rows": "149",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "1",
"rollout DB archived rows": "1",
"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=150",
"rollout DB rows": "150",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "subagent:thread_spawn=135, cli=11, vscode=4",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 2871
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-US",
"details": {
"EDITOR": "not set",
"LANG": "en_US.UTF-8",
"VISUAL": "not set",
"os": "Mac OS 26.3.0 [64-bit]",
"os language": "en-US",
"os type": "Mac OS",
"os version": "26.3.0"
},
"remediation": null,
"durationMs": 37
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"CLICOLOR": "1",
"COLORTERM": "truecolor",
"TERMINFO": "/Applications/cmux.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": "165x46",
"terminal version": "1.3.2-cmux-ios-manual-io-minimal-clean-20260501-+22fa801f8"
},
"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": "git repo root",
"terminal title project value": "ResearchWiki",
"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.3",
"check for update on startup": "true",
"dismissed version": "0.144.3",
"last checked at": "2026-07-13T13:22:41.797036Z",
"latest version": "0.144.3",
"latest version status": "newer version is available",
"npm update target": "/usr/local/lib/node_modules/@openai/codex",
"update action": "npm install -g @openai/codex",
"version cache": "/Users/ysss/.codex/version.json"
},
"remediation": null,
"durationMs": 896
}
}
}
What issue are you seeing?
Codex CLI repeatedly loses its Responses WebSocket connection during a longer multimodal turn after inspecting multiple local PNG images.
The task proceeds normally through repository inspection and image viewing. After all nine images have been viewed, Codex remains in the Working state and then enters a long reconnect loop. The response never reaches response.completed.
Observed error:
Reconnecting... 4/5
Stream disconnected before completion: websocket closed by server before response.completed
In one reproduction, the reconnect loop continued for more than eight minutes.
The prompt was:
read files in /Users/<user>/Documents/<repository>/tmp/pdfs/v111-review and summarize
The target directory contained nine PNG images representing rendered manuscript pages. Each image was approximately 1020 × 1320 pixels. Codex successfully emitted Viewed Image events for all nine pages before the stream disconnected.
This reproduces with Codex CLI 0.144.3 and also reproduced after downgrading to 0.144.1.
Environment and diagnostic observations:
- macOS on Apple Silicon
- ChatGPT authentication
- ChatGPT Pro subscription
- Model:
gpt-5.6-sol - Reasoning effort:
xhigh - Native multi-agent and
multi_agent_v2enabled - No proxy environment variables
codex doctor --allreports a successful WebSocket handshake with HTTP 101- HTTP provider endpoints are reachable
- Authentication, local databases, rollout state, and installation checks pass
- The same behavior remained after removing third-party Orca CLI integrations and related skills
The issue appears to occur after the image-inspection portion of a long turn. It may involve the WebSocket transport, multimodal request processing, or final response generation after multiple image tool calls.
What steps can reproduce the bug?
Uploaded thread: 019f5d21-95cc-7221-9a5d-0877768f2cb4
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗