{
"schemaVersion": 1,
"generatedAt": "1788623592s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.153.4",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "C:\\Users\\okamo\\.codex\\app-server-control\\app-server-control.sock",
"daemon state dir": "C:\\Users\\okamo\\.codex\\app-server-daemon",
"mode": "ephemeral",
"pid file": "C:\\Users\\okamo\\.codex\\app-server-daemon\\app-server.pid (missing)",
"settings": "C:\\Users\\okamo\\.codex\\app-server-daemon\\settings.json (missing)",
"status": "not running",
"update-loop pid file": "C:\\Users\\okamo\\.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 env vars present": "OPENAI_API_KEY",
"auth file": "C:\\Users\\okamo\\.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": "C:\\Users\\okamo\\.codex",
"config.toml": "C:\\Users\\okamo\\.codex\\config.toml",
"config.toml parse": "ok",
"cwd": "C:\\repository\\auto-codex",
"enabled feature flags": "<redacted>",
"feature flag overrides": "none",
"feature flags enabled": "48",
"log dir": "C:\\Users\\okamo\\.codex\\log",
"mcp servers": "1",
"model": "gpt-6-astra",
"model provider": "openai",
"sqlite home": "C:\\Users\\okamo\\.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.40.0.windows.1",
"details": {
".git entry": "directory",
"PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
"PATH git entries": "1",
"git branch": "_c/20260905-1",
"git build options": "git version 2.40.0.windows.1; cpu: x86_64; built from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a; sizeof-long: 4; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon",
"git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
"git version": "git version 2.40.0.windows.1",
"repo detected": "true",
"repo root": "C:\\repository\\auto-codex",
"selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
},
"remediation": null,
"durationMs": 51
},
"git.worktree.dev_drive": {
"id": "git.worktree.dev_drive",
"category": "git",
"status": "warning",
"summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance",
"details": {},
"remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/en-us/<redacted>",
"durationMs": 0
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\codex",
"PATH codex #2": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\codex.cmd",
"PATH codex entries": "2",
"current executable": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
"install context": "npm (package C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"managed by Vite+": "false",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"npm update target": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex"
},
"remediation": null,
"durationMs": 131
},
"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": 93
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"managed proxy": "not configured",
"proxy env vars": "none",
"respect system proxy": "disabled"
},
"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 inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 91
},
"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",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 835
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
"install method": "npm (package C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"platform": "windows-x86_64",
"version": "0.153.4"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
"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",
"denied-read restrictions": "false",
"execve wrapper helper": "none",
"filesystem sandbox": "unrestricted",
"network sandbox": "enabled",
"sandbox backend": "<redacted>"
},
"remediation": null,
"durationMs": 0
},
"security.endpoint": {
"id": "security.endpoint",
"category": "security",
"status": "warning",
"summary": "endpoint protection detected; Codex exclusions are unverified",
"details": {
"Codex exclusions": "not verified",
"endpoint products": "Microsoft Defender",
"exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe"
},
"issues": [
{
"severity": "warning",
"cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.",
"measured": "not verified",
"expected": "Codex application and helper exclusions",
"remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.",
"fields": [
"Codex exclusions"
]
}
],
"remediation": "ask your security administrator to verify Codex exclusions and required helper allowances",
"durationMs": 11
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "C:\\Users\\okamo\\.codex (dir)",
"active rollout files": "3546 files, 2411753571 total bytes, 680133 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "C:\\Users\\okamo\\.codex\\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\\Users\\okamo\\.codex\\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\\Users\\okamo\\.codex\\log (dir)",
"memories DB": "C:\\Users\\okamo\\.codex\\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "C:\\Users\\okamo\\.codex\\queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "C:\\Users\\okamo\\.codex (dir)",
"state DB": "C:\\Users\\okamo\\.codex\\state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "C:\\Users\\okamo\\.codex\\thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 181
},
"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": "3546",
"rollout DB active rows": "3546",
"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=3511, amazon-bedrock=35",
"rollout DB rows": "3546",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "exec=3443, cli=93, subagent:thread_spawn=9, vscode=1",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 20384
},
"system.disk": {
"id": "system.disk",
"category": "disk",
"status": "ok",
"summary": "sufficient free disk space (679.4 GiB)",
"details": {
"CODEX_HOME available": "679.4 GiB",
"failure threshold": "1.0 GiB",
"warning threshold": "5.0 GiB",
"worktree available": "679.4 GiB"
},
"remediation": null,
"durationMs": 0
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language ja-JP",
"details": {
"EDITOR": "not set",
"LANG": "ja_JP.UTF-8",
"VISUAL": "not set",
"os": "Windows 10.0.26200 (Windows 11 Core) [64-bit]",
"os language": "ja-JP",
"os type": "Windows",
"os version": "10.0.26200"
},
"remediation": null,
"durationMs": 0
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "warning",
"summary": "height 22 rows - content may scroll off (recommended >=24)",
"details": {
"COLORTERM": "truecolor",
"TERM_PROGRAM": "vscode",
"VSCODE_INJECTION": "present",
"color output": "enabled",
"console input code page": "932",
"console output code page": "932",
"effective locale": "ja_JP.UTF-8",
"stderr console mode": "0x00000007 (VT processing: true)",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout console mode": "0x00000007 (VT processing: true)",
"stdout is terminal": "true",
"terminal": "VS Code",
"terminal size": "144x22",
"terminal version": "1.109.0"
},
"issues": [
{
"severity": "warning",
"cause": "height 22 rows - content may scroll off (recommended >=24)",
"measured": "144 x 22",
"expected": ">= 24 rows",
"remedy": "resize the window to at least 24 rows",
"fields": [
"terminal size"
]
}
],
"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": "auto-codex",
"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.153.4",
"check for update on startup": "true",
"last checked at": "2026-09-05T02:14:21.973748600Z",
"latest version": "0.153.4",
"latest version status": "current version is not older",
"npm update target": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"update action": "npm install -g @openai/codex",
"version cache": "C:\\Users\\okamo\\.codex\\version.json"
},
"remediation": null,
"durationMs": 299
}
}
}
Since switching to GPT-6 Astra, Codex CLI frequently enters a WebSocket reconnection loop during codex exec.
Once this happens, Codex can remain in the reconnect loop for approximately 10 minutes before finally falling back from WebSockets to HTTPS.
This means a single ~10-minute reconnect incident can potentially consume a very large number of purchased credits without making any visible progress.
the behavior changes immediately: Codex starts producing output and modifying/generating files normally over the HTTPS transport.
From the CLI's perspective, nothing visibly changes while the reconnect loop is occurring.
Instead, I monitor the purchased credit balance using the official Codex usage page:
during the reconnect loop.
This makes the unexpected consumption directly observable from OpenAI's own usage page rather than being inferred from local token counts or the CLI /status display.
A transport-level WebSocket failure should not repeatedly consume significant purchased Codex credits.
In particular, retrying a failed transport should not cause repeated billable model inference for the same unfinished turn.
or an equivalent configuration option.
This is directly observable by refreshing the official Codex usage page while the reconnect loop is occurring.
With GPT-6 Astra, the rate of consumption can be substantial. At approximately 3 credits every 10 seconds, a reconnect loop lasting around 10 minutes could consume roughly 180 purchased credits while apparently making no useful progress.
Once Codex gives up on WebSockets and switches to HTTPS, the same task begins working normally.
What version of Codex CLI is running?
codex-cli 0.153.4
What subscription do you have?
ChatGPT Plus with purchased Codex credits
Which model were you using?
gpt-6-astra
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
VS Code
Codex doctor report
{ "schemaVersion": 1, "generatedAt": "1788623592s since unix epoch", "overallStatus": "warning", "codexVersion": "0.153.4", "checks": { "app_server.status": { "id": "app_server.status", "category": "app-server", "status": "ok", "summary": "background server is not running", "details": { "control socket": "C:\\Users\\okamo\\.codex\\app-server-control\\app-server-control.sock", "daemon state dir": "C:\\Users\\okamo\\.codex\\app-server-daemon", "mode": "ephemeral", "pid file": "C:\\Users\\okamo\\.codex\\app-server-daemon\\app-server.pid (missing)", "settings": "C:\\Users\\okamo\\.codex\\app-server-daemon\\settings.json (missing)", "status": "not running", "update-loop pid file": "C:\\Users\\okamo\\.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 env vars present": "OPENAI_API_KEY", "auth file": "C:\\Users\\okamo\\.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": "C:\\Users\\okamo\\.codex", "config.toml": "C:\\Users\\okamo\\.codex\\config.toml", "config.toml parse": "ok", "cwd": "C:\\repository\\auto-codex", "enabled feature flags": "<redacted>", "feature flag overrides": "none", "feature flags enabled": "48", "log dir": "C:\\Users\\okamo\\.codex\\log", "mcp servers": "1", "model": "gpt-6-astra", "model provider": "openai", "sqlite home": "C:\\Users\\okamo\\.codex" }, "remediation": null, "durationMs": 0 }, "git.environment": { "id": "git.environment", "category": "git", "status": "ok", "summary": "git version 2.40.0.windows.1", "details": { ".git entry": "directory", "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe", "PATH git entries": "1", "git branch": "_c/20260905-1", "git build options": "git version 2.40.0.windows.1; cpu: x86_64; built from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a; sizeof-long: 4; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon", "git exec path": "C:/Program Files/Git/mingw64/libexec/git-core", "git version": "git version 2.40.0.windows.1", "repo detected": "true", "repo root": "C:\\repository\\auto-codex", "selected git": "C:\\Program Files\\Git\\cmd\\git.exe" }, "remediation": null, "durationMs": 51 }, "git.worktree.dev_drive": { "id": "git.worktree.dev_drive", "category": "git", "status": "warning", "summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance", "details": {}, "remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/en-us/<redacted>", "durationMs": 0 }, "installation": { "id": "installation", "category": "install", "status": "ok", "summary": "installation looks consistent", "details": { "PATH codex #1": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\codex", "PATH codex #2": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\codex.cmd", "PATH codex entries": "2", "current executable": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe", "install context": "npm (package C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)", "managed by Vite+": "false", "managed by bun": "false", "managed by npm": "true", "managed by pnpm": "false", "managed package root": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex", "npm update target": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex" }, "remediation": null, "durationMs": 131 }, "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": 93 }, "network.env": { "id": "network.env", "category": "network", "status": "ok", "summary": "network-related environment looks readable", "details": { "managed proxy": "not configured", "proxy env vars": "none", "respect system proxy": "disabled" }, "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 inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)", "reachability mode": "ChatGPT auth" }, "remediation": null, "durationMs": 91 }, "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", "provider name": "OpenAI", "proxy env vars": "none", "reasoning header": "false", "server model present": "false", "supports websockets": "true", "wire API": "responses" }, "remediation": null, "durationMs": 835 }, "runtime.provenance": { "id": "runtime.provenance", "category": "runtime", "status": "ok", "summary": "running npm on windows-x86_64", "details": { "commit": "unknown", "current executable": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe", "install method": "npm (package C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)", "platform": "windows-x86_64", "version": "0.153.4" }, "remediation": null, "durationMs": 0 }, "runtime.search": { "id": "runtime.search", "category": "search", "status": "ok", "summary": "search is OK (bundled)", "details": { "search command": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe", "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", "denied-read restrictions": "false", "execve wrapper helper": "none", "filesystem sandbox": "unrestricted", "network sandbox": "enabled", "sandbox backend": "<redacted>" }, "remediation": null, "durationMs": 0 }, "security.endpoint": { "id": "security.endpoint", "category": "security", "status": "warning", "summary": "endpoint protection detected; Codex exclusions are unverified", "details": { "Codex exclusions": "not verified", "endpoint products": "Microsoft Defender", "exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe" }, "issues": [ { "severity": "warning", "cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.", "measured": "not verified", "expected": "Codex application and helper exclusions", "remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.", "fields": [ "Codex exclusions" ] } ], "remediation": "ask your security administrator to verify Codex exclusions and required helper allowances", "durationMs": 11 }, "state.paths": { "id": "state.paths", "category": "state", "status": "ok", "summary": "state paths and databases are inspectable", "details": { "CODEX_HOME": "C:\\Users\\okamo\\.codex (dir)", "active rollout files": "3546 files, 2411753571 total bytes, 680133 average bytes", "archived rollout files": "0 files, 0 total bytes, 0 average bytes", "goals DB": "C:\\Users\\okamo\\.codex\\goals_1.sqlite (file)", "goals DB integrity": "ok", "log DB": "C:\\Users\\okamo\\.codex\\logs_2.sqlite (file)", "log DB integrity": "ok", "log dir": "C:\\Users\\okamo\\.codex\\log (dir)", "memories DB": "C:\\Users\\okamo\\.codex\\memories_1.sqlite (file)", "memories DB integrity": "ok", "queue DB": "C:\\Users\\okamo\\.codex\\queue_1.sqlite (file)", "queue DB integrity": "ok", "sqlite home": "C:\\Users\\okamo\\.codex (dir)", "state DB": "C:\\Users\\okamo\\.codex\\state_5.sqlite (file)", "state DB integrity": "ok", "thread history DB": "C:\\Users\\okamo\\.codex\\thread_history_1.sqlite (file)", "thread history DB integrity": "ok" }, "remediation": null, "durationMs": 181 }, "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": "3546", "rollout DB active rows": "3546", "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=3511, amazon-bedrock=35", "rollout DB rows": "3546", "rollout DB scan cap reached": "false", "rollout DB scan errors": "0", "rollout DB sources": "exec=3443, cli=93, subagent:thread_spawn=9, vscode=1", "rollout DB stale rows": "0" }, "remediation": null, "durationMs": 20384 }, "system.disk": { "id": "system.disk", "category": "disk", "status": "ok", "summary": "sufficient free disk space (679.4 GiB)", "details": { "CODEX_HOME available": "679.4 GiB", "failure threshold": "1.0 GiB", "warning threshold": "5.0 GiB", "worktree available": "679.4 GiB" }, "remediation": null, "durationMs": 0 }, "system.environment": { "id": "system.environment", "category": "system", "status": "ok", "summary": "OS language ja-JP", "details": { "EDITOR": "not set", "LANG": "ja_JP.UTF-8", "VISUAL": "not set", "os": "Windows 10.0.26200 (Windows 11 Core) [64-bit]", "os language": "ja-JP", "os type": "Windows", "os version": "10.0.26200" }, "remediation": null, "durationMs": 0 }, "terminal.env": { "id": "terminal.env", "category": "terminal", "status": "warning", "summary": "height 22 rows - content may scroll off (recommended >=24)", "details": { "COLORTERM": "truecolor", "TERM_PROGRAM": "vscode", "VSCODE_INJECTION": "present", "color output": "enabled", "console input code page": "932", "console output code page": "932", "effective locale": "ja_JP.UTF-8", "stderr console mode": "0x00000007 (VT processing: true)", "stderr is terminal": "true", "stdin is terminal": "true", "stdout console mode": "0x00000007 (VT processing: true)", "stdout is terminal": "true", "terminal": "VS Code", "terminal size": "144x22", "terminal version": "1.109.0" }, "issues": [ { "severity": "warning", "cause": "height 22 rows - content may scroll off (recommended >=24)", "measured": "144 x 22", "expected": ">= 24 rows", "remedy": "resize the window to at least 24 rows", "fields": [ "terminal size" ] } ], "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": "auto-codex", "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.153.4", "check for update on startup": "true", "last checked at": "2026-09-05T02:14:21.973748600Z", "latest version": "0.153.4", "latest version status": "current version is not older", "npm update target": "C:\\Users\\okamo\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex", "update action": "npm install -g @openai/codex", "version cache": "C:\\Users\\okamo\\.codex\\version.json" }, "remediation": null, "durationMs": 299 } } }What issue are you seeing?
Since switching to GPT-6 Astra, Codex CLI frequently enters a WebSocket reconnection loop during
codex exec.The following messages are repeatedly displayed:
Once this happens, Codex can remain in the reconnect loop for approximately 10 minutes before finally falling back from WebSockets to HTTPS.
The serious problem is that purchased Codex credits continue to be consumed while Codex is stuck in the reconnect loop.
In my observations, approximately 3 credits are consumed every 10 seconds during the reconnect loop, even though no useful output is being produced and no files are being modified.
This means a single ~10-minute reconnect incident can potentially consume a very large number of purchased credits without making any visible progress.
After the retries finally reach
5/5and Codex prints:the behavior changes immediately: Codex starts producing output and modifying/generating files normally over the HTTPS transport.
The observed sequence is:
How I am monitoring the credit consumption
This issue is easiest to observe after the included 5-hour or weekly usage limit has already been exhausted, so that subsequent usage is charged against purchased Codex credits.
I am specifically monitoring the purchased credit balance, not estimating consumption from the 5-hour/weekly percentage shown by Codex CLI.
There is an important difference between the two monitoring methods:
Codex CLI
/statusRunning
/statusduring the reconnect loop does not show the purchased credit balance decreasing.From the CLI's perspective, nothing visibly changes while the reconnect loop is occurring.
Therefore,
/statusdoes not expose the credit consumption described in this report.ChatGPT Codex usage page
Instead, I monitor the purchased credit balance using the official Codex usage page:
https://chatgpt.com/codex/settings/usage
While
ERROR: Reconnecting...is repeatedly displayed in the terminal, refreshing the usage page shows the purchased credit balance continuously decreasing.I observe approximately:
during the reconnect loop.
This continues even though:
ERROR: Reconnecting.../statusdoes not indicate any corresponding changeThe correlation is especially noticeable because the rapid credit consumption stops once the WebSocket retry loop ends and Codex falls back to HTTPS, at which point normal task progress resumes.
Therefore, the reproduction/measurement procedure is:
https://chatgpt.com/codex/settings/usage
codex exec.ERROR: Reconnecting... x/5is displayed, periodically refresh the official usage page./status; it does not show this purchased-credit depletion.5/5and falls back to HTTPS.This makes the unexpected consumption directly observable from OpenAI's own usage page rather than being inferred from local token counts or the CLI
/statusdisplay.What steps can reproduce the bug?
codex exec.ERROR: Reconnecting... x/5messages.5/5, Codex falls back to HTTPS.What is the expected behavior?
A transport-level WebSocket failure should not repeatedly consume significant purchased Codex credits.
In particular, retrying a failed transport should not cause repeated billable model inference for the same unfinished turn.
Ideally:
For example:
or an equivalent configuration option.
Additional information
The most important part of this issue is not simply that WebSockets are unstable.
The critical issue is:
Purchased Codex credits are continuously depleted while Codex is stuck in an automatic WebSocket reconnect loop, despite no useful work being produced.
This is directly observable by refreshing the official Codex usage page while the reconnect loop is occurring.
With GPT-6 Astra, the rate of consumption can be substantial. At approximately 3 credits every 10 seconds, a reconnect loop lasting around 10 minutes could consume roughly 180 purchased credits while apparently making no useful progress.
Once Codex gives up on WebSockets and switches to HTTPS, the same task begins working normally.
Related discussion about forcing HTTPS transport:
#27381 (comment)