Bug: Answers Are Internally Truncated Unpredictably

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

(not duplicate of https://github.com/openai/codex/issues/36112)

What version of Codex CLI is running?

codex-cli 0.146.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.6-luna low

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

WSL/PS7

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1785514400s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.146.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/home/devuser/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/home/devuser/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/home/devuser/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/home/devuser/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/home/devuser/.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": "/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, 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": "38",
        "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": 100
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/usr/sbin/codex",
        "PATH codex #2": "/usr/bin/codex",
        "PATH codex #3": "/sbin/codex",
        "PATH codex #4": "/bin/codex",
        "PATH codex entries": "4",
        "current executable": "/usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install context": "npm (package /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed by pnpm": "false",
        "managed package root": "/usr/lib/node_modules/@openai/codex",
        "npm update target": "/usr/lib/node_modules/@openai/codex"
      },
      "remediation": null,
      "durationMs": 124
    },
    "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": 191
    },
    "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": 634
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on linux-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install method": "npm (package /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
        "platform": "linux-x86_64",
        "version": "0.146.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/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-arg0rbNFJi/codex-linux-sandbox",
        "execve wrapper helper": "/home/devuser/.codex/tmp/arg0/codex-arg0rbNFJi/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": "4 files, 7078293 total bytes, 1769573 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 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",
        "sqlite home": "/home/devuser/.codex (dir)",
        "state DB": "/home/devuser/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "/home/devuser/.codex/thread_history_1.sqlite (missing)",
        "thread history DB integrity": "skipped (missing)"
      },
      "remediation": null,
      "durationMs": 90
    },
    "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": "4",
        "rollout DB active rows": "4",
        "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=4",
        "rollout DB rows": "4",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=4",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 71
    },
    "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": 19
    },
    "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": 1
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.146.0",
        "check for update on startup": "true",
        "last checked at": "2026-07-31T14:22:49.453256538Z",
        "latest version": "0.146.0",
        "latest version status": "current version is not older",
        "npm update target": "/usr/lib/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/home/devuser/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 527
    }
  }
}

What issue are you seeing?

Some answers are getting truncated. When they are first displayed, the full answer is visible. After i reply, then if i scroll up, the full answer is no longer visible.

original five-item answer:
<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/71201ab8-41d3-430f-97ec-725fdf773b98" />

my quoting of one item from the list -- the item now missing from the list.
<img width="1876" height="354" alt="Image" src="https://github.com/user-attachments/assets/aa879448-1483-467a-9d93-72233509760d" />

scroll up and see only four visible items.
<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/5e5df819-8f51-4f99-93fd-7d54031763fb" />

agent knows it gave me five items. The title of the missing item matches what i quoted in my reply.
<img width="898" height="417" alt="Image" src="https://github.com/user-attachments/assets/3876a992-aee5-48c4-987c-04c2f6f3eb33" />

<img width="1870" height="274" alt="Image" src="https://github.com/user-attachments/assets/351cba52-5f31-45f2-9651-81e1e60928d3" />

scroll up and see the missing item magically restored:
<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/71201ab8-41d3-430f-97ec-725fdf773b98" />

What steps can reproduce the bug?

  1. submit a query which outputs a list.
  2. copy one item in the list by highlighting with mouse, and then CTRL-SHIFT-c
  3. begin to type your reply, and paste in the copied text
  4. scroll up. The list is truncated. The copied item, or some other item, is missing.
  5. ask agent to repeat full text of missing item
  6. the missing item now reappears in the previous answer

What is the expected behavior?

nothing in the history should disappear

Additional information

this is a blocker

Another example, showing where the title of one entry, which was originally visible when first generated, is now missing.

<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/05e5a190-3174-4a64-8b97-3571f99e36e2" />

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 27 days ago

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

  • #36112

Powered by Codex Action

johnaweiss · 23 days ago

Another example, in this case the user reply has vanished. How is this not a high-priority issue?

<img width="957" height="128" alt="Image" src="https://github.com/user-attachments/assets/8c27a05a-e6da-4108-bf5c-f248b4329bb9" />

johnaweiss · 22 days ago

this is insane. As i'm typing my replies, one line after another gets removed from agent's last reply. Is this supposed to be a "helpful" feature???? You can watch it in real time in this video. Watch line at the top starting with - _exit(). I scroll down, then i scroll back up. When i scroll back up, it's gone.

https://github.com/user-attachments/assets/33f3d34d-5f08-42dd-8f01-99b55e60b64a

johnaweiss · 19 days ago

another example. Parts of answers appear and disappear constantly.

<img width="139" height="238" alt="Image" src="https://github.com/user-attachments/assets/56a161e0-ccb6-40bb-a08f-b5d2b19594f8" /> <img width="121" height="180" alt="Image" src="https://github.com/user-attachments/assets/9f8ad044-45be-412e-adef-a53deddfd7ac" />

johnaweiss · 16 days ago

another example, showing user queries got blanked just 5 pages back in history

https://github.com/user-attachments/assets/9bda625d-4117-4699-b894-985a4ae6c975

johnaweiss · 15 days ago

another example. I watched this text get truncated while i was watching it. You can see it no longer makes grammatical or semantic sense, because a chunk of text was pulled from the middle."

"The generated binding can release result uses an ownership wrapper or compiler cleanup mechanism."

<img width="959" height="100" alt="Image" src="https://github.com/user-attachments/assets/d798016c-52ff-4bc2-b5e3-bfaa86a48c12" />

johnaweiss · 14 days ago

another example. This is a major bug. Why neglected?

<img width="959" height="113" alt="Image" src="https://github.com/user-attachments/assets/88dd15c8-b727-45aa-9464-094ab2f9d0bb" />