TUI crashes when using /side on long-running sessions.
Resolved 💬 3 comments Opened Jun 17, 2026 by Pimpmuckl Closed Jul 22, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.140.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
PS7 within Windows Terminal
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1781706225s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.140.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "C:\\Users\\jonat\\.codex\\app-server-control\\app-server-control.sock",
"daemon state dir": "C:\\Users\\jonat\\.codex\\app-server-daemon",
"mode": "ephemeral",
"pid file": "C:\\Users\\jonat\\.codex\\app-server-daemon\\app-server.pid (missing)",
"settings": "C:\\Users\\jonat\\.codex\\app-server-daemon\\settings.json (missing)",
"status": "not running",
"update-loop pid file": "C:\\Users\\jonat\\.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": "C:\\Users\\jonat\\.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\\jonat\\.codex",
"config.toml": "C:\\Users\\jonat\\.codex\\config.toml",
"config.toml parse": "ok",
"cwd": "C:\\Users\\jonat",
"enabled feature flags": "<redacted>",
"feature flag overrides": "unified_exec=true, memories=true, tool_suggest=false, plugin_sharing=false, default_mode_request_user_input=true",
"feature flags enabled": "30",
"log dir": "C:\\Users\\jonat\\.codex\\log",
"mcp servers": "4",
"model": "gpt-5.5",
"model provider": "openai",
"sqlite home": "C:\\Users\\jonat\\.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.54.0.windows.1",
"details": {
"PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
"PATH git entries": "1",
"git build options": "git version 2.54.0.windows.1; cpu: x86_64; built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64-build-installers/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.19.0; OpenSSL: OpenSSL 3.5.6 7 Apr 2026; zlib: 1.3.2; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
"git version": "git version 2.54.0.windows.1",
"repo detected": "false",
"selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
},
"remediation": null,
"durationMs": 45
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\\Users\\jonat\\AppData\\Roaming\\npm\\codex",
"PATH codex #2": "C:\\Users\\jonat\\AppData\\Roaming\\npm\\codex.cmd",
"PATH codex entries": "2",
"current executable": "C:\\Users\\jonat\\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\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed package root": "C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"npm update target": "C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex"
},
"remediation": null,
"durationMs": 249
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": {
"configured servers": "4",
"disabled servers": "2",
"stdio servers": "3",
"streamable_http servers": "1"
},
"remediation": null,
"durationMs": 3209
},
"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": 57
},
"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": 522
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\\Users\\jonat\\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\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\jonat\\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.140.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "C:\\Users\\jonat\\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",
"execve wrapper helper": "none",
"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": "C:\\Users\\jonat\\.codex (dir)",
"active rollout files": "60180 files, 20893702213 total bytes, 347186 average bytes",
"archived rollout files": "37572 files, 40868994831 total bytes, 1087751 average bytes",
"goals DB": "C:\\Users\\jonat\\.codex\\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\\Users\\jonat\\.codex\\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\\Users\\jonat\\.codex\\log (dir)",
"memories DB": "C:\\Users\\jonat\\.codex\\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"sqlite home": "C:\\Users\\jonat\\.codex (dir)",
"state DB": "C:\\Users\\jonat\\.codex\\state_5.sqlite (file)",
"state DB integrity": "ok"
},
"remediation": null,
"durationMs": 71738
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "warning",
"summary": "rollout files and state DB thread inventory differ",
"details": {
"default model provider": "openai",
"rollout DB active files": "10000",
"rollout DB active rows": "42020",
"rollout DB archive mismatches": "skipped (scan cap reached)",
"rollout DB archived files": "0",
"rollout DB archived rows": "36020",
"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=78022, lmstudio_local=18",
"rollout DB rows": "78040",
"rollout DB scan cap reached": "true",
"rollout DB scan errors": "0",
"rollout DB sources": "exec=37284, subagent:review=33646, subagent:thread_spawn=5938, cli=570, vscode=373, subagent:memory_consolidation=209, subagent:other=20",
"rollout DB stale rows": "skipped (scan cap reached)"
},
"issues": [
{
"severity": "warning",
"cause": "rollout scan was incomplete or found bad files",
"measured": "0 scan errors, 0 malformed names, scan cap reached: true",
"expected": "rollout directories are fully scannable",
"remedy": "Check file permissions and unexpected files under CODEX_HOME sessions.",
"fields": []
}
],
"remediation": null,
"durationMs": 35198
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-GB",
"details": {
"EDITOR": "not set",
"VISUAL": "not set",
"os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
"os language": "en-GB",
"os type": "Windows",
"os version": "10.0.26200"
},
"remediation": null,
"durationMs": 1
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"WT_SESSION": "present",
"color output": "enabled",
"console input code page": "850",
"console output code page": "850",
"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": "Windows Terminal",
"terminal size": "120x30"
},
"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": "jonat",
"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.140.0",
"check for update on startup": "true",
"dismissed version": "0.134.0",
"last checked at": "2026-06-17T14:17:36.327072800Z",
"latest version": "0.140.0",
"latest version status": "current version is not older",
"npm update target": "C:\\Users\\jonat\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"update action": "npm install -g @openai/codex",
"version cache": "C:\\Users\\jonat\\.codex\\version.json"
},
"remediation": null,
"durationMs": 350
}
}
}
What issue are you seeing?
After codex CLI sessions have been running for 12h+, using /side forces the TUI in a hang.
Side starting... is shown in the bottom right but the TUI itself just stays stuck.
What steps can reproduce the bug?
- Have a session run for 12h+
- Use
/side - More often than not, the TUI freezes, thread in app-server stays alive
What is the expected behavior?
- Have a session run for 12h+
- Use
/side - TUI enters
/side, thread in app-server stays alive
Additional information
I sent my local codex to investigate and it is pretty sure that the /side ingests the whole prior conversation just to throw it out right then and there. And with very large conversations, that can yield to the freeze.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce the equivalent failure through
/btw, which dispatches the same side-conversation flow as/side, on Windows with long-running sessions. I traced the current fork path onmain(f90e7deea6) and found a narrow response-projection optimization.Confirmed cause
The TUI creates side conversations as ephemeral forks.
thread/forkmust copy the source history so the forked model context remains intact, but the TUI does not need the complete inherited turn array returned in the fork response for this ephemeral side flow.Without
excludeTurns, the app-server reconstructs and serializes that inherited turn history and replays restored token usage before the ephemeral side conversation can become interactive. The cost grows with the parent session and can make the Windows terminal appear completely frozen.Proposed correction
Set
ThreadForkParams.exclude_turnsfrom the existing ephemeral flag:This preserves the important semantics:
/sideor/btwstill inherits the parent context;thread.turnsresponse projection and restored token-usage replay are skipped;excludeTurns: falseand return their turns as before.The app-server already has integration coverage proving that
thread/forkwithexcludeTurns: truekeeps the fork usable while omitting returned turns and restored token-usage replay. The TUI patch adds policy coverage asserting both sides of the condition: ephemeral forks usetrue, persistent forks remainfalse.Validation and patch
just fix -p codex-tui: passedcodex-tuirun: 3030 passed, with 6 unrelated Windows environment/locale failuresThe branch also contains the related DB-first
/resumepicker fix discussed in #22037. I have not opened an unsolicited PR because the repository requires a maintainer invitation. If this approach matches the intended behavior, I would be happy to open the prepared PR.Fixed in 0.145.0 from what I can tell.