Skip to content

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

Open

Description

@clamalo

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

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.

Activity

  1. added
    bug
    app
    iOS
    app-server
    on Aug 14, 2026
  2. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. guzifer commented on Aug 21, 2026

    @guzifer

    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.

  4. TobyIsADog commented on Sep 12, 2026

    @TobyIsADog

    ChatGPT Android: 1.2026.244 (2624421)
    Windows desktop package: 26.903.9818.0
    App-server: 0.153.4

    Here are additional test results from Android connected to a native Windows host. The phone displayed the task list, but two tasks with large tool outputs stayed blank or spinning while another task opened normally. The desktop app and running tasks remained usable.

    The client already used pagination. We observed this request sequence:

    1. thread/resume with excludeTurns=true.
    2. thread/turns/list to read the five most recent turns.
    3. Five simultaneous thread/items/list requests, each reading one turn with limit=100.

    For the comparison, we changed thread/items/list params.limit from 100 to 20 before sending, preserving request IDs, existing pagination cursors, sorting and other parameters. The useStateDbOnly=true change for the list timeout remained enabled.

    Both tasks that had failed to display then loaded normally. Expanding older content in one task triggered 23 more requests with pagination cursors, and older content and images appeared. After restarting only the phone app and reapplying the parameter changes, we checked both tasks again and they loaded successfully.

    During recovery, the Windows desktop app and primary app-server kept the same process IDs and start times. We did not restart these processes or edit conversation histories or databases. Request parameters were modified temporarily while the app was running, rather than through app settings.

    From the local data for one task, we counted all history items intended for display: 453 items, totaling approximately 71.9 million characters when serialized as JSON. About 99.72% of the characters were in mcpToolCall records, including call arguments, results and metadata. This describes all local display data for that task, not the size of one network response or page.

    During the failure, the host also logged "disconnecting slow connection after outbound queue filled". This resembles the behavior reported in #37526, but we have not confirmed whether this case involves the same queue capacity or code path, or established a causal relationship between disconnection and blank conversations.

    The experiment confirmed that these two tasks could display again. It did not establish that 20 items per page works for every task, and we did not check every historical item individually. We also cannot yet tell whether the problem lies in parsing, rendering, memory, the network or the server's message queue, or whether several stages contribute.

    Please consider setting a byte limit on the history loaded when a Remote task first opens, showing recent readable messages first, and loading larger tool outputs when the user needs them. Preserve the data and pagination cursors needed to access the full history. If loading fails, show a clear error that allows a retry instead of spinning indefinitely.

  5. raulblanko commented on Sep 14, 2026

    @raulblanko

    Additional live Windows evidence for the count-budget behavior is documented in this single detailed report under #44399, issue B.

    Installed Desktop package: 26.908.4834.0. JSONL and the history index were healthy and caught up. Two completed turns contained 39 and 1,158 indexed items. A multi-turn read_thread request returned 0 and 500 items respectively. Explicit one-turn page traversal recovered all 39 items of the older turn and returned a 100-item slice of the long turn.

    This adds a correctness/accessibility concern to the bootstrap budget: a populated older turn can be represented as empty, without usable per-turn completeness/continuation information. We have not measured a new cold-load latency or captured the Desktop's internal item cursor, so no such result is claimed here.

    Please include this healthy-storage Windows shape in the regression coverage, and preserve explicit partial/not-loaded states alongside any item or byte budget. The detailed evidence and ownership/release questions are kept in the linked comment to avoid duplicating the report across issues.


    Prepared and posted by OpenAI Codex (AI assistant) with the account owner's explicit authorization.

  6. Molly1116 commented on Oct 14, 2026

    @Molly1116

    Additional Windows + Android Remote measurements: fast local RPC, large first-page payloads

    I'm adding sanitized measurements from a Windows host exhibiting the same failure: the ChatGPT Android Remote task list and small tasks open normally, but two existing long-running tasks repeatedly time out while loading messages. The same affected task opened successfully once on a previous evening, then failed again. The original tasks remain usable on the Windows desktop.

    Environment

    • Windows 11, build 26200
    • Codex Desktop (Store package): 26.1007.2314.0
    • Bundled app-server: 0.162.0-alpha.17.2
    • Phone OS: Android 17
    • ChatGPT for Android app version: 1.2020.279 (1) (as displayed in the app; reported verbatim)
    • Two affected rollout JSONL files: 214.39 MiB / 3,495 JSONL records and 271.71 MiB / 3,341 JSONL records. These are raw rollout records, not display-item counts or wire payload sizes.

    Isolated local App Server benchmark (thread/items/list, from selected turns; response sizes measured from serialized JSON-RPC responses, not from Android's network connection):

    Example limit=100 limit=20 limit=10
    Turn from 271.71 MiB rollout 100 items, 4,412 KB, 198 ms 20 items, 221 KB, 12 ms 10 items, 124 KB, 6 ms
    Turn from 214.39 MiB rollout 100 items, 237 KB, 8 ms 20 items, 113 KB, 4 ms 10 items, 63 KB, 4 ms

    All timings are local isolated RPC measurements, not end-to-end remote load or rendering timings. These results show that the sampled server queries themselves are fast, while page payload sizes vary dramatically. They do not prove where Android is timing out.

    For the larger sampled turn, five successive limit=20 pages returned 100 items in total, and the collected IDs, order, and content matched a single limit=100 response. The five page sizes were approximately 221 KB, 1,436 KB, 556 KB, 1,261 KB, and 940 KB: this illustrates both valid cursor pagination and why a count-only budget cannot guarantee a bounded payload.

    Observed remote path and limitations

    • Host log entries include app_server.client_name="codex_chatgpt_android_remote" and five thread/items/list requests following a thread/turns/list request.
    • The Android Remote calls are handled by the native Rust codex.exe app-server via the Remote Control WebSocket transport, not by the desktop Electron UI's local JS bridge. Patching app.asar's desktop read wrapper would therefore target the wrong path.
    • A search of the available host logs did not identify disconnecting slow connection after outbound queue filled or oversize-envelope drops for these attempts. Absence in available logs does not rule out relay/backpressure, client deserialization, or rendering bottlenecks.
    • This benchmark did not capture paired phone-side timing/traces, so we are not claiming a confirmed network or client-rendering root cause. The tiny control task used in one local benchmark had no historical turns and is not a matched history-load control.

    Engineering request

    Please consider a byte-bounded and demand-driven initial Remote/mobile hydration policy rather than a 100-item page alone: prioritize the newest readable user/assistant messages and active-turn state; lazily fetch oversized tool/MCP outputs, while preserving per-turn cursor/partial states and every historical item on demand. Keep the composer operable independently of older-history hydration and expose a specific recoverable error/retry path.

    It would also help to add regression coverage for:

    1. a recent turn where one 100-item page is several MiB;
    2. pages with highly uneven individual item sizes;
    3. correctness of nextCursor and no missing/duplicated items when using small pages;
    4. Android Remote idle-vs-live task opening, plus bounded initial bytes and time-to-interactive;
    5. independent diagnostics/timestamps for server RPC, Remote transport, and mobile decode/rendering.

    Related cases: #49737 (same Android message-loading timeout wording), #38023 (idle task occasionally opens when live events arrive), and #36423 (different oversized-envelope failure path). These may involve more than one bottleneck, so I would avoid treating limit=20 as a universal fix.

    Privacy: Task IDs, local paths, account details, logs containing conversation contents, and host identifiers are intentionally omitted. Prepared from local measurements and posted with the account owner's authorization.

  7. yzxz1996 commented on Nov 6, 2026

    @yzxz1996

    Additional Windows Desktop + iOS Remote reproduction on Desktop 26.1103.31037

    This remains reproducible on a newer Windows host, even with only five local turns when the tool/MCP records are large. Short conversations open on the phone; this tool-heavy conversation repeatedly shows a loading-timeout error.

    Environment

    • Windows x64, build 26300.
    • Windows Store package: 26.1103.3517.0.
    • Embedded Desktop application version (package manifest): 26.1103.31037.
    • Bundled app-server: 0.167.0-alpha.3.2; matching public tag rust-v0.167.0-alpha.3.2, commit c40729ea5cf8e947481b130c59807273eda2f8e9.
    • ChatGPT iOS Remote client observed by the host: 1.2026.300.
    • The affected conversation uses historyMode: "paginated".

    Observed behavior and reproduction shape

    1. Connect the iPhone to the Windows Desktop host through Codex Remote.
    2. Confirm that a short conversation loads normally.
    3. Open an existing paginated conversation whose recent completed turns contain many large tool/MCP records.
    4. The latest assistant text can already be visible, but the UI reports a loading-timeout error. English translation: Loading this task's messages timed out. Please retry.
    5. Retrying with the iOS app kept in the foreground still fails.

    The host received thread/resume, thread/turns/list, and multiple thread/items/list requests during failed opens. This is therefore not simply a missing host or a complete failure to dispatch history requests.

    Storage and payload measurements

    The history database passed PRAGMA quick_check; all 440 indexed items were valid JSON, no target items had missing turn rows, and the projection offset matched the completed rollout size.

    The following are offline measurements of compact JSON arrays reconstructed from persisted display items, not captured iOS network response sizes:

    Selected data Item count JSON bytes
    All five local turns, full display items 440 6,343,218
    Same five turns, first user + last assistant per turn 10 16,610
    Latest completed turn, full display items 192 3,563,957
    Latest turn, first user + last assistant 2 1,219

    Splitting the latest turn into ascending 100-item pages produced arrays of 2,211,885 and 1,352,073 bytes. Actual mobile request limits and wire payload sizes were not captured. This reinforces why a count limit alone is not a useful byte bound.

    A local Desktop read_thread helper returned the latest turn in about 98 ms with outputs omitted and per-item text previews capped. This is not an equivalent mobile detail request and is not an end-to-end latency measurement. Ordinary provider HTTP and a Responses WebSocket handshake passed, but those checks do not establish the health of the separate Remote Control path.

    Code observations, with scope limits

    Read-only inspection of the installed Desktop bundle found:

    • Default detail requests of 100 items, with page-size halving specifically for decoded message length too large; ordinary timeout errors do not trigger that size fallback.
    • An early summary publication path already exists. Some subsequent ordinary hydration/resume paths still await selected detail pages before declaring history_ready; this is different from claiming that every first render waits for the full transcript.
    • A default 30-second internal Desktop RPC deadline. In one sendCatalogRequest branch, scheduling timeoutMs is not forwarded as the internal RPC timeout. A controlled replay of that extracted method with mocked scheduling/transport confirmed that requesting 120 seconds reached the scheduler but not the internal transport options. Queue-budget and RPC-deadline semantics may intentionally differ; please make them explicit rather than assuming changing a scheduling timeout changes both.
    • Some inspected cancellation call sites retire result ownership without explicitly aborting the already-issued RPC.

    These Desktop JavaScript findings concern Desktop's own bridge/hydration paths. They do not prove the iOS client uses the Electron bridge or shares its 30-second deadline. The observed mobile requests are handled by the native app-server remote transport.

    There was also one host event matching #37526:

    disconnecting slow connection after outbound queue filled: <client>
    

    The exact bundled version still uses 128-message remote client queues and disconnects on a full outbound queue. However, a later failed retry did not produce another queue-full event in the inspected logs, so this is not being presented as the confirmed cause of every timeout. The shared unacknowledged-frame gate also deserves per-stream fairness testing. Its ACKs are backend-generated receipt cursors, not evidence of phone rendering progress.

    Requested improvements

    1. Make a small summary sufficient for usable history/composer state. Load large tool outputs on expansion or viewport demand, and keep detail failures local to the affected region.
    2. Add byte-aware page budgets and progressive publication. Preserve cursors, explicit partial/not-loaded states, and access to every historical item. A smaller fixed item count alone can increase round trips without bounding bytes.
    3. Separate queue deadlines, per-RPC deadlines, and overall hydration deadlines; propagate intended values consistently and cancel superseded reads on retry/reconnect. A clearly scoped user-adjustable history-loading deadline would also help, but increasing a global timeout alone is insufficient.
    4. Review per-stream byte-based backpressure and fair scheduling so a large response cannot block small RPC/control messages. Raising the 128-message capacity alone is not a complete solution.
    5. Add diagnostics for request/page bytes, dispatch/completion/cancellation timestamps, queue occupancy and ACK age, plus mobile decode/render/first-interactive timings. This would distinguish host, relay, and client bottlenecks.

    No live app patch was applied. No raw logs, screenshots, conversation text, local paths, account/host identifiers, or live task/request IDs are included in this comment.

    Prepared and posted by OpenAI Codex with the account owner's explicit authorization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbugiOSperformanceremote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions