Paginated thread bootstrap loads up to 500 items without a byte limit, so one large turn remains slow

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

Summary

A converted paginated task can still take tens of seconds to open because Codex Desktop uses a count-based initial item budget. It loads up to 500 recent items, without a byte-size limit.

One recent turn can therefore fill almost the complete initial window with large commandExecution items. Pagination prevents old history from loading, but it does not make the task interactive quickly.

The same remote task was slow in Codex Desktop on macOS and in Codex mobile. Mobile sometimes reported:

Error loading messages: Codex request timed out.

Environment

  • Codex Desktop: 26.810.41047, build 6570
  • Platform: macOS, Apple Silicon
  • Task host: remote Linux App Server over SSH
  • Mobile used a separate reverse-tunnel route to the same remote App Server
  • The task was confirmed as historyMode: "paginated"

Private task IDs, host names, paths, prompts, and outputs are omitted.

Reproduction shape

The affected task had:

  • rollout size: about 48.9 MiB
  • 37 turns
  • 974 persisted display items
  • about 14.1 MiB of serialized display-item data
  • latest completed turn: 420 items and about 10.8 MiB
  • commandExecution: 207 items and about 13.3 MiB across the task

Cold-load observations:

  • stable thread/resume: about 0.26 seconds
  • cold desktop hydration: about 28.8 seconds
  • warm cached reopen: about 1.1 seconds
  • ten sequential thread/items/list requests were observed during the cold load
  • some attempts reached the client timeout at about 65 seconds
  • mobile also had long waits and a request-timeout error

This points to the initial item payload and client hydration, not rollout parsing or SQLite query time.

Desktop source finding

The installed Desktop bundle has a paginated tail-hydration path that:

  1. requests the newest five turns with itemsView: "notLoaded";
  2. calls thread/items/list repeatedly;
  3. uses a shared budget of min(requested turn limit, 5) * 100, which is 500 items for the initial five-turn request;
  4. asks for up to 100 items per item request;
  5. stops at 500 items or when the selected turns are exhausted;
  6. keeps cursors for older items.

The bundle also prevents the legacy full-history background drain for paginated tasks. The problem is therefore not that pagination is ignored. The problem is that the initial budget is based only on item count.

In this case, the newest 420-item turn alone contained about 10.8 MiB, so it remained almost fully inside the 500-item bootstrap window.

Expected behavior

A paginated task should become interactive after a small, byte-bounded bootstrap response, even when the newest turn contains many large command outputs.

The client should show the newest user and assistant messages quickly. Large command output and reasoning detail should load only when needed, or use compact placeholders.

Suggested direction

  • Add a byte-size budget to initial item hydration.
  • Use a much smaller initial item window when serialized items are large.
  • Load full command output only when the user expands or scrolls to it.
  • Keep user messages, assistant messages, file changes, turn status, and active output in the fast path.
  • Do not block the composer or active-turn status on old command-output hydration.
  • Apply the same bounded behavior to remote/follower and mobile paths.

Suggested regression test

Create a paginated fixture where the newest turn contains about 400 items and more than 10 MiB of command output.

Verify that:

  1. the first interactive render transfers a bounded payload;
  2. the composer becomes usable without loading all large output items;
  3. the complete output remains available on demand;
  4. desktop and remote/follower clients do not reach their request timeout;
  5. the original rollout and model-visible context remain unchanged.

Related issues

  • #21211 — broad eager history hydration and renderer performance
  • #34663 — CLI/TUI full-history resume behavior
  • #33786 — repeated large-thread replay on Desktop

This report is narrower than those issues: it reproduces after the task is already converted to paginated history, and it identifies the 500-item, count-only bootstrap budget as the remaining large-payload path.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 13 days ago

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

  • #38023

Powered by Codex Action

shleder · 11 days ago

The 48.9 MiB paginated rollout with a 10.8 MiB newest turn is a useful healthy-persistence scale case for codex-rescue. Rescue won’t fix Desktop/mobile’s count-only hydration budget; I’m testing whether it can inspect the same durable session in a bounded way without loading the large display-item payload into a client runtime.

If you still have the affected local/remote session store available, could you run:

pipx install codex-rescue
codex-rescue sessions
codex-rescue doctor --latest

A healthy result is expected and useful here because stable thread/resume is already fast. Please don’t salvage solely for the hydration delay; I’m interested in scan time, exit code, selected session, and whether the source rollout remains unchanged.

Sanitized output only, please—no raw rollouts/SQLite, command output, prompts, credentials, or private paths. Repo: https://github.com/shleder/codex-rescue

guzifer · 7 days ago

I can confirm this is still a severe regression on the current unified ChatGPT/Codex desktop build, and it is affecting iPhone Remote access to most existing operational tasks.

Environment

  • macOS, Apple Silicon, always-on Mac mini host
  • ChatGPT/Codex Desktop: 26.818.31338 (build 6892)
  • bundled app-server observed: 0.149.0-alpha.4
  • ChatGPT iPhone app using Codex Remote
  • The desktop app was updated on 2026-08-21. These same tasks opened normally from mobile before that update.

Reproduction and contrast

  • A newly created tiny task (1 turn, 5 items, about 2.5 KiB) opens on mobile.
  • Existing paginated tasks fail to render or spin indefinitely. Representative projected histories:
  • about 13.7 MiB / 3,040 items / 125 turns
  • about 10.4 MiB / 4,181 items
  • about 9.8 MiB / 2,898 items
  • Reinstalling the mobile app, clearing cache, re-pairing, switching Wi-Fi/5G, and restarting the desktop app did not provide a lasting fix.
  • The task directory and sidebar may load while opening the actual task remains stuck. Occasionally a task opens briefly, then stops loading again.

Host-side evidence

For one failed mobile open, the app-server received within one second:

thread/resume
thread/turns/list
thread/items/list
thread/items/list
thread/items/list
thread/items/list
thread/items/list

The host stayed connected and showed no matching app-server error. The mobile connection was active, and the server composed the resume response normally. This strongly matches the count-only bootstrap issue described here: mobile receives several full item pages for recent turns and then stalls while loading/rendering them.

The app-server identifies the Remote client as codex_chatgpt_android_remote even though the observed client is the ChatGPT iPhone app; I am including that detail in case the identifier is shared or routing is incorrect.

Operational impact

This is not just a slow open. Existing task history is effectively unavailable on mobile, while tiny tasks still work. Creating one successor task per old task is not a workable mitigation for dozens of long-lived operational tasks.

Requested behavior

Please byte-bound the initial Remote/mobile bootstrap, for example around 50 KiB of newest human-readable content, while retaining cursors for older pages. Prioritize recent user/assistant messages and load command output, reasoning, and older details only on demand. The original task and model-visible history must remain unchanged.

This evidence also distinguishes the issue from pairing or network failure: the host receives the requests and remains online; the failure begins at paginated history hydration/rendering after the desktop update.