$ codex doctor --json
{
"schemaVersion": 1,
"generatedAt": "1786402395s since unix epoch",
"overallStatus": "ok",
"codexVersion": "0.147.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is running",
"details": {
"app-server version": "0.147.0",
"control socket": "/home/devuser/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/devuser/.codex/app-server-daemon",
"mode": "persistent",
"pid file": "/home/devuser/.codex/app-server-daemon/app-server.pid (file)",
"settings": "/home/devuser/.codex/app-server-daemon/settings.json (file)",
"status": "running",
"update-loop pid file": "/home/devuser/.codex/app-server-daemon/app-server-updater.pid (file)"
},
"remediation": null,
"durationMs": 194
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "/home/devuser/.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": "/home/devuser/.codex",
"config.toml": "/home/devuser/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/mnt/c/Users/Naj/git/daemon",
"enabled feature flags": "shell_tool, view_image, 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, in_app_updates, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, item_ids, skill_mcp_dependency_install, skill_search, 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": "39",
"log dir": "/home/devuser/.codex/log",
"mcp servers": "0",
"model": "gpt-5.6-luna",
"model provider": "openai",
"sqlite home": "/home/devuser/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.55.0",
"details": {
".git entry": "directory",
"PATH git #1": "/usr/sbin/git",
"PATH git #2": "/usr/bin/git",
"PATH git #3": "/sbin/git",
"PATH git #4": "/bin/git",
"PATH git entries": "4",
"git branch": "main",
"git build options": "git version 2.55.0; cpu: x86_64; built from commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: enabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.21.0; OpenSSL: OpenSSL 3.6.3 9 Jun 2026; zlib-ng: 2.3.3; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.55.0",
"repo detected": "true",
"repo root": "/mnt/c/Users/Naj/git/daemon",
"selected git": "/usr/sbin/git"
},
"remediation": null,
"durationMs": 204
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/devuser/.local/bin/codex",
"PATH codex #2": "/usr/sbin/codex",
"PATH codex #3": "/usr/bin/codex",
"PATH codex #4": "/sbin/codex",
"PATH codex #5": "/bin/codex",
"PATH codex entries": "5",
"current executable": "/home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin/codex",
"install context": "standalone (unix, package /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl, bin /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin, resources /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-resources, path /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "false",
"managed by pnpm": "false",
"managed package root": "not set"
},
"remediation": null,
"durationMs": 19
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "no MCP servers configured",
"details": {},
"remediation": null,
"durationMs": 0
},
"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": 281
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 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": 1046
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running standalone on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin/codex",
"install method": "standalone (unix, package /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl, bin /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin, resources /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-resources, path /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.147.0"
},
"remediation": null,
"durationMs": 1
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/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": "OnRequest",
"codex-linux-sandbox helper": "/home/devuser/.codex/tmp/arg0/codex-arg0pOpV4K/codex-linux-sandbox",
"execve wrapper helper": "/home/devuser/.codex/tmp/arg0/codex-arg0pOpV4K/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": "/home/devuser/.codex (dir)",
"active rollout files": "55 files, 171712550 total bytes, 3122046 average bytes",
"archived rollout files": "1 files, 28150 total bytes, 28150 average bytes",
"goals DB": "/home/devuser/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/home/devuser/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/home/devuser/.codex/log (missing)",
"memories DB": "/home/devuser/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "/home/devuser/.codex/queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "/home/devuser/.codex (dir)",
"standalone release cache": "3 entries in /home/devuser/.codex/packages/standalone/releases",
"state DB": "/home/devuser/.codex/state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "/home/devuser/.codex/thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 2591
},
"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": "55",
"rollout DB active rows": "55",
"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=56",
"rollout DB rows": "56",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "vscode=42, cli=12, subagent:other=2",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 227
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language C",
"details": {
"EDITOR": "not set",
"LANG": "C.UTF-8",
"VISUAL": "not set",
"os": "Arch Linux [64-bit]",
"os language": "C",
"os type": "Arch Linux",
"os version": "Unknown"
},
"remediation": null,
"durationMs": 23
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"DISPLAY": "present",
"WAYLAND_DISPLAY": "present",
"WSL_DISTRO_NAME": "present",
"WSL_INTEROP": "present",
"WT_SESSION": "present",
"color output": "enabled",
"effective locale": "C.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "Windows Terminal",
"terminal size": "133x35"
},
"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": "daemon",
"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.147.0",
"check for update on startup": "true",
"last checked at": "2026-08-10T18:44:28.984212613Z",
"latest version": "0.147.0",
"latest version status": "current version is not older",
"update action": "standalone installer",
"version cache": "/home/devuser/.codex/version.json"
},
"remediation": null,
"durationMs": 538
}
}
}
android app lost connection. The could not reconnect. Found out a state server was running.
Codex can leave an app-server process running without the daemon's corresponding management state.
In this state, the app-server continues running, but Codex no longer considers it managed by codex app-server daemon. This leaves the system in an inconsistent state where codex remote-control start cannot start normally.
Starting app-server daemon with remote control enabled...
Error: app server is running but is not managed by codex app-server daemon
Both processes had been running since August 7.
while the daemon directory still contained the corresponding .pid.lock files.
The lock files were not actively held by any process.
Starting app-server daemon with remote control enabled...
This machine is available for remote control as BOOMBOX.
Daemon used app-server:
path: /home/devuser/.codex/packages/standalone/current/codex
version: 0.147.0
The lifecycle of the app-server and daemon state should remain consistent.
If the daemon is restarted, crashes, is upgraded, or otherwise loses its state, it should not leave behind an app-server that continues running indefinitely without being managed by the daemon.
An app-server survived for several days while the daemon's PID tracking state disappeared.
This produced an unmanaged/stale app-server that blocked subsequent remote-control start operations.
The user cannot start remote control normally once this state occurs.
Manual process inspection and termination were required to recover the system.
Please investigate what lifecycle event can produce this state. The processes appeared to survive since August 7 while the daemon PID files were absent. Possible triggers worth investigating include Codex upgrades, daemon crashes, WSL restarts, or abnormal process termination.
after running remote and interacting successfully with android app for at least 1 day, remote stopped connecting. Then got this
$ codex remote-control start
Starting app-server daemon with remote control enabled...
Error: app server is running but is not managed by codex app-server daemon
What version of Codex CLI is running?
codex-cli 0.147.0
What subscription do you have?
Plus
Which model were you using?
Luna various
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal (WSL / PowerShell)
Codex doctor report
What issue are you seeing?
android app lost connection. The could not reconnect. Found out a state server was running.
Bug: app-server becomes unmanaged/stale after daemon state is lost
Summary
Codex can leave an app-server process running without the daemon's corresponding management state.
In this state, the app-server continues running, but Codex no longer considers it managed by codex app-server daemon. This leaves the system in an inconsistent state where codex remote-control start cannot start normally.
Environment
Codex version: 0.147.0
Environment: Linux/WSL
Executable:
/home/devuser/.codex/packages/standalone/current/codex
Observed state
codex remote-control start reported:
Starting app-server daemon with remote control enabled...
Error: app server is running but is not managed by codex app-server daemon
An app-server was running:
PID 4412
/home/devuser/.codex/packages/standalone/current/codex app-server --remote-control --listen unix://
A daemon updater process was also running:
PID 4424
/home/devuser/.codex/packages/standalone/current/codex app-server daemon pid-update-loop
Both processes had been running since August 7.
However, the daemon's PID files were missing:
~/.codex/app-server-daemon/app-server.pid
~/.codex/app-server-daemon/app-server-updater.pid
while the daemon directory still contained the corresponding .pid.lock files.
The lock files were not actively held by any process.
The daemon settings still contained:
{
"remoteControlEnabled": true
}
codex app-server daemon stop also reported:
Error: app server is running but is not managed by codex app-server daemon
Recovery
The unmanaged app-server process (PID 4412) was manually terminated:
kill 4412
After that, running:
codex remote-control start
immediately succeeded:
Starting app-server daemon with remote control enabled...
This machine is available for remote control as BOOMBOX.
Daemon used app-server:
path: /home/devuser/.codex/packages/standalone/current/codex
version: 0.147.0
Expected behavior
The lifecycle of the app-server and daemon state should remain consistent.
If the daemon is restarted, crashes, is upgraded, or otherwise loses its state, it should not leave behind an app-server that continues running indefinitely without being managed by the daemon.
The daemon should either:
cleanly terminate the app-server when its management state is lost, or
reliably reconstruct/adopt the existing app-server state.
Actual behavior
An app-server survived for several days while the daemon's PID tracking state disappeared.
This produced an unmanaged/stale app-server that blocked subsequent remote-control start operations.
Impact
The user cannot start remote control normally once this state occurs.
Manual process inspection and termination were required to recover the system.
Additional question
Please investigate what lifecycle event can produce this state. The processes appeared to survive since August 7 while the daemon PID files were absent. Possible triggers worth investigating include Codex upgrades, daemon crashes, WSL restarts, or abnormal process termination.
What steps can reproduce the bug?
after running remote and interacting successfully with android app for at least 1 day, remote stopped connecting. Then got this
$ codex remote-control start
Starting app-server daemon with remote control enabled...
Error: app server is running but is not managed by codex app-server daemon
What is the expected behavior?
Don't lose connection, don't leave stale codex running
Additional information
No response