Skip to content

[desktop] read_thread/wait_threads returns items=[] for completed turns visible in UI #43468

Open

Description

@githubkrit

What version of the Codex App are you using (From “About Codex” dialog)?

26.901.51231 (build 8109)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

For some newly completed turns in existing local tasks, the desktop UI displays the final assistant response, but cross-task reads return the turn as completed with no error and an empty items array. Task status and update time advance, while the task summary remains stale.

The symptom was observed before and after updating/relaunching the desktop app.

What steps can reproduce the bug?

  1. Complete a short turn in an existing local task.
  2. Confirm its final assistant response is visible in the desktop UI.
  3. From another task, use the supported cross-task read/wait surface for the completed task.
  4. Observe status=completed, error=null, and items=[].
  5. Inspect the task list and observe a current status/time with an old summary.

The same result occurs with an explicit local host ID and with the host ID omitted. It also occurs for a four-second reporting-only turn, so a long response is not required.

Exact task and turn identifiers were supplied through private Codex feedback and are intentionally omitted from this public issue. Token-limit and context-window usage are unknown.

What is the expected behavior?

The cross-task result should include at least the completed turn's final agentMessage, and the task summary should refresh.

Additional information

Additional evidence:

  • The desktop renderer receives the exact turn-complete event.
  • Native thread/read, thread/turns/list, and thread/items/list calls return with no error.
  • The UI renders the final assistant response.
  • A historical turn in the same task still projects correctly.
  • No warning or error is logged around the affected completion.

This suggests the loss occurs after the native App Server response, in the cross-task projection/summary layer.

Privacy:

Exact task IDs, turn IDs, local paths, project names, prompt contents, assistant receipt contents, and raw logs are intentionally omitted. They can be supplied privately through a Codex feedback session if maintainers request them.

Activity

  1. added
    app
    on Sep 7, 2026
  2. added
    bug
    app-server
    on Sep 7, 2026
  3. github-actions commented on Sep 7, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. johnsilvavlogs commented on Sep 7, 2026

    @johnsilvavlogs

    Additional remote-host reproduction on September 7, 2026, closely related to this issue and #40977. Thank you for investigating this history-retrieval family.

    Environment: macOS Codex Desktop 26.901.51231 (build 8109), reading a connected Windows Codex task. The Windows worker's returned process evidence identifies package 26.901.6511.0; its current About dialog was not independently checked.

    Observed:

    • The coordinating task reported native UI messages through approximately 14:36 UTC while cross-task reads stopped at early progress/tool content around 14:24 UTC.
    • A fresh diagnostic task reproduced the mismatch at 14:36:59 UTC: wait_threads advanced its revision from 19 to 20 and reported the target turn completed/worker idle, but its latest assistant message was still an early progress update.
    • read_thread with explicit remote host, includeOutputs:true, and turnLimit:2 returned 42 items in that completed turn and 158 in the preceding turn. The turn page reported hasMore:false.
    • Omitting the host and using turnLimit:1, includeOutputs:false returned the same 42 items and the same final item ID. Only two early assistant commentaries were present; the final assistant response was absent.
    • At 14:39:01 UTC, turnLimit:10 returned a newer completed turn with 0 items, the affected completed turn still with 42 items, and the older interrupted turn with 425 items. hasMore:false again. This rules out a simple 200-item-per-turn cap as the explanation for the 42-item result. We did not send work to or otherwise alter the target task.
    • Local Desktop logs show fresh successful thread/read, thread/turns/list, and thread/items/list requests while renderer events for the same turn continue beyond the retrieved transcript. There was one later thread not loaded response followed by successful reads; that isolated error does not explain the earlier successful-but-incomplete results.

    Read-only inspection of the installed Desktop implementation suggests a narrower hypothesis: for a loaded paginated conversation, listThreadTurns passes the conversation's paginatedHistory.itemsBackwardsCursor into the item reader. Item reads then proceed descending from that anchor. A stale snapshot anchor could therefore omit newly appended items even though turn metadata is fresh. The public read serializer does not expose per-turn itemsView/item-pagination state, so the caller cannot distinguish this from a complete transcript. The exact live anchor/backend results were not captured, so this is a code-informed hypothesis, not a proven root cause.

    The inspected item loader also has a total request budget of min(turnLimit, 5) * 100 items, and the public turn-page hasMore describes older turns rather than all item completeness. Increasing the limit changed older history coverage but did not recover the affected turn's newer messages.

    Expected: fresh completed-turn reads should expose the final assistant response or explicitly report incomplete item hydration and provide a supported continuation. Completion/status freshness should not be mistaken for transcript completeness.

    No restart, cache edits, signed-bundle changes, database edits, or foreground navigation were used for this diagnostic reproduction. Raw logs, private task IDs/paths, source code, account information, and screenshots are intentionally excluded.

    Follow-up evidence reported by the coordinating task later the same day:

    • After the user manually quit and reopened Windows Codex, previously empty final turns became readable.
    • A subsequent short read-only verification turn in the same Windows task completed normally and the worker became idle, but read_thread again returned items:[] while the task was loaded.
    • The coordinator then performed the already-authorized retirement of that accepted worker (unpin and archive). An immediate read_thread returned thread status notLoaded and the full verification turn, including command output and the final assistant message, without further foreground navigation or restart.

    This provides an additional loaded-versus-unloaded lifecycle correlation and strengthens the case for inspecting the loaded paginated reader/snapshot state. It does not by itself isolate which retirement action changed the read path or prove the exact cursor mechanism. Archiving was legitimate worker retirement, not a proposed general recovery procedure: do not archive arbitrary active or user-owned tasks to work around this bug. The diagnostic task did not perform those lifecycle actions; this addendum records the coordinator's observation. Private identifiers and screenshots remain omitted.

  5. bigbsince83 commented on Sep 8, 2026

    @bigbsince83

    On September 8, 2026, I reproduced the completed-turn/empty-items failure on macOS Desktop 26.901.51231 (build 8109), bundled CLI 0.153.4, with paginated task history.

    After a complete app restart, a cross-task read of the unloaded affected task recovered its previously missing replies. I then loaded that same task and sent one new text-only instruction to produce a single final answer without tools or file access. No voice session was started after restart. The new turn completed in 7.606 seconds and the task became idle, but read_thread returned items=[] and wait_threads returned no assistant message. Older turns remained readable in the same read.

    Read-only storage inspection found the exact new final and completion in both the rollout and history projection, under matching task and turn identities. The projection was fully caught up to the rollout's byte length and ordinal count. There were no ordinal gaps, duplicates or backwards transitions. Thus, in this reproduction, empty results cannot be explained by a missing final, lagging projection, duplicate ordinal or split task identity.

    Read-only inspection of the installed implementation suggests the loaded paginated conversation path passes a cached conversation-level itemsBackwardsCursor into full per-turn item reads. A stale boundary could exclude newly appended items while turn metadata remains current. I did not capture the actual failing cursor, so this is a code-informed hypothesis rather than a confirmed root cause. Please investigate full-history task-tool reads inheriting an older UI pagination boundary, and add regression coverage for a resumed task followed by new completed turns.

    Separately, before restart, the desktop view showed a missing completed reply and continued Thinking. The post-restart screen state was not independently verified. I am not assuming the visible activity issue and the cross-task reader failure share one cause.

    Expected: new completed-turn reads include the final response, or explicitly disclose incomplete hydration and offer a supported continuation. A supported repair procedure or corrected app build would help. Restart alone recovers historical replies temporarily but did not repair retrieval of subsequent replies.

    No app-bundle changes, database edits, transcript edits, feature overrides, archive/unarchive workaround or replacement task were used for this reproduction. This supplement excludes private conversation content, task/turn IDs, local paths, raw logs, screenshots and account details. Exact local evidence has been retained for a separately authorized private support exchange if needed.

    Usage and billing follow-up: Does OpenAI offer any bug-related usage reimbursement or service credit, and if so, how should affected users request review? The standard usage guidance says Support does not manually reset usage limits; I am asking whether a separate credit or refund review applies when paid-plan usage or purchased credits were spent reproducing and documenting an app defect such as this one. Please point us to the appropriate support channel and the evidence needed.

  6. Countermarch commented on Sep 8, 2026

    @Countermarch

    Additional reproduction on September 8, 2026, using two Macs through built-in Remote.

    Desktop task reader returns empty items for newly completed turns until app restart

    Environment: macOS ChatGPT desktop 26.901.51231 (build 8109), bundled Codex/app-server 0.153.4. Reproduced while coordinating two Macs through built-in Remote; the same read failure also affects a task on the coordinator's own host.

    Reproduction

    1. Use an existing task as a receiver through native send_message_to_thread.
    2. Ask it to return a unique literal marker, without tools or business work.
    3. Wait for completion through wait_threads.
    4. Read its newest turn with read_thread, includeOutputs=true, turnLimit=1.
    5. Observe completed status and timestamps, but items=[]; wait_threads also omits the final message.
    6. Older turns remain readable.
    7. Quit and reopen the coordinator's desktop app. The previously missing completed turn becomes readable.
    8. Send another marker-only request. The new turn again reports completion but has no readable items.

    Expected: fresh completed output is retrievable without restarting the app. The coordinator can verify the receiver's actual result.

    Actual: restart recovers historical output only; subsequent output is omitted again. The original task's persisted local history contains its omitted assistant messages and tool response. Native Remote logs show successful thread/items/list response routing without transport errors.

    Suspected mechanism, not proven live root cause

    Read-only inspection of the installed app's task-reader path shows that paginated turn-item reads reuse the conversation's saved itemsBackwardsCursor. A fresh independent read may therefore use a boundary older than newly completed turns. The live cursor value was not observable through exposed tools.

    An offline synthetic test using captured reader functions reproduces empty newer turns with an old boundary, and retrieves newer plus older items when the independent read starts with a fresh boundary. A subsequent appended item is also returned without restart. This validates a plausible mechanism only; it is not a production patch.

    Candidate engineering direction: separate live independent task reads from historical snapshot pagination, preserving appropriate consistency semantics for each. Avoid globally discarding historical cursors. Ensure read_thread and wait_threads can expose new completed output across repeated turns.

    Acceptance: several consecutive marker-only requests return their exact output without restart, on local and Remote receivers; older history remains paginated correctly; a dropped acknowledgment can recover the same result without rerunning work.

    Separate approval-review defect

    An explicitly delegated read-only diagnostic was asked to return process IDs, parent IDs, start times and executable names to its same user's coordinator on the other connected Mac. Automatic approval review rejected both the original and a minimized return message because it did not recognize authority to disclose diagnostic metadata to that parent. Native history later exposed the failed calls and rejection explanation. This is a separate issue from empty history reads; do not weaken permission settings as a workaround.

    This report intentionally omits account identifiers, actual task/host/process IDs, local home paths, business content, credentials and full session logs.

  7. yukieno commented on Sep 9, 2026

    @yukieno

    Additional post-update reproduction on September 9, 2026.

    Environment: macOS, native local desktop execution; desktop 26.903.61454 (build 8378), bundled CLI 0.153.4.

    Two consecutive harmless, one-line follow-ups to the same existing task completed successfully. In both tests, wait_threads returned no final assistant message and read_thread returned items=[] for the newest completed turn. No restart, archive/unarchive, target navigation or history edit occurred between the tests. Read-only storage verification confirmed that both exact expected final answers were persisted.

    Additional isolation: a separate read-only client using the official local codex app-server stdio API retrieved the expected latest final answer with thread/items/list, the exact turn ID, and cursor:null. No task resume, task write, database edit or signed-app modification was used by that client.

    This supports investigating the desktop cross-task reader's snapshot/item-cursor handling rather than missing generation or persistence. A stale cached cursor is a hypothesis, not a confirmed live root cause.

    Please provide a supported fix or corrected desktop build, with regression coverage for repeated follow-ups: both read_thread and wait_threads should return each newest final answer without unloading the task, while preserving historical pagination.

    No private task content, task/host/account identifiers, project names, local paths, credentials, screenshots or raw logs are included or attached.

  8. damonxc7777-ops commented on Sep 9, 2026

    @damonxc7777-ops

    Additional reproduction on macOS arm64, desktop 26.903.61454 (build 8378), bundled codex-cli 0.153.4.

    For three completed turns in one local conversation, cross-task read_thread returned latest-to-oldest item counts 0/3/33. The latest turn's six items and complete 691-character final were present in both the rollout and SQLite history projection, with identical final text and the projection at EOF. Changing turnLimit and includeOutputs did not recover the latest body.

    We extracted the unmodified listThreadTurns, B3t and ZS reader functions from the installed bundle and ran them with synthetic data and a mocked client in memory. Under the explicit assumption that an item cursor is a snapshot upper bound:

    • Old snapshot boundary: 0/3/33.
    • Fresh null cursor: 6/3/33.
    • Old boundary, latest turn only: 0.
    • Boundary advanced beyond the latest turn: 6/3/33.
    • Direct full-read branch without cached pagination state: 6/3/33.

    The empty newer turn was still marked itemsView=full and hasLoadedOldest=true. This supports the already-reported concern that current turn metadata can be combined with an older item snapshot.

    We have not captured the failing live cursor or branch selection. These controls demonstrate a possible mechanism, not the live root cause or a verified fix. No real server, model, database write, application modification or production operation was involved in the synthetic controls.

    Please include resumed local paginated conversations followed by repeated new completed turns in regression coverage for read_thread and wait_threads.

    Privacy: no private conversation or account IDs, company/project names, workspace paths, prompts, assistant text, screenshots, credentials or raw logs are included.

  9. micronex-13652 commented on Sep 12, 2026

    @micronex-13652

    Additional Windows reproduction: stale resume boundary and the 500-item budget in explicit full-history reads

    This is an independent Windows reproduction with an offline execution of the installed reader functions, plus a same-version native App Server control. It adds a concrete reproduction of the cursor hypothesis discussed above.

    Environment and scope

    • Windows x64, reported OS version 10.0.26100.
    • Installed OpenAI.Codex MSIX package: 26.903.9818.0 (package metadata, not an independently captured About-dialog version).
    • Running Codex/App Server executable: codex-cli 0.153.4.
    • Local host; existing task with historyMode: paginated.
    • The user reported missing hours of previously visible work in a long-running task. The diagnostic directly verified the task-tool read failure and persisted storage. The visible task UI itself was not independently captured, so the UI symptom and the precisely reproduced read-path failure should be distinguished.

    Observed failure and storage checks

    Fresh read_thread calls found recent turns and correct completion/error metadata, but returned empty items. wait_threads also exposed no latest assistant message for the current turn.

    A ten-turn read returned these item counts, newest first:

    [0, 0, 0, 0, 0, 500, 0, 0, 0, 0]
    

    All 500 returned items belonged to one older turn. Repeated reads, including an explicit older-turn page cursor, did not recover the newer messages.

    The rollout JSONL and SQLite history projection both contained the omitted items. At the first export, all 7,388 completed-item IDs in the inspected rollout prefix matched the projection exactly. The projection cursor reached the corresponding complete JSONL prefix. The source files and installed app bundle were not edited.

    Stable, closed turns provide the following comparison; the latest in-progress turn is deliberately excluded from this table:

    Closed turn, relative order Desktop task-tool items Direct native server items Offline corrected-route items
    Older turn before the observed gap 500 662 662
    First closed turn after the gap 0 518 518
    Next closed turn 0 351 351
    Next closed turn 0 852 852
    Most recent closed turn, over six hours of work 0 1,580 1,580

    The empty results affect both successfully completed and failed turns. Two historical turns ended with serverOverloaded; that does not explain the empty successfully completed turns or the intact persisted items.

    Same-version native control

    A separate App Server 0.153.4 process was started with an isolated copy of this task's rollout and history metadata. The allowed requests were only:

    initialize / initialized
    thread/read
    thread/turns/list
    thread/items/list
    

    No task was resumed, no turn was started, and no working tool was invoked. The diagnostic server exited normally.

    • Native thread/turns/list with itemsView: full returned the complete item collections.
    • Per-turn thread/items/list returned all 1,580 items over 16 pages, without duplicates.
    • The older 662-item turn was recovered over seven pages.
    • This rules out missing persisted data and demonstrates that this server version can read the same data correctly.

    Reader mechanism reproduced

    The inspected desktop asset is webview/assets/app-initial-f094ef01c64d.js, SHA-256:

    364622097D1440B55BCD85B1068245A773F5821F4FD6C1E2DE73E5789487C75A
    

    Build-specific symbols relevant to this reproduction are listThreadTurns, V3t, XS, G3t, and W3t.

    For a loaded local paginated conversation, listThreadTurns passes the conversation's saved paginatedHistory.itemsBackwardsCursor into V3t, including when the caller explicitly requests itemsView: full.

    The resulting behavior is:

    1. Turn headers are fetched fresh, initially without items.
    2. Item reads for each turn start descending from the saved conversation-level boundary.
    3. A newer turn whose items all lie after that boundary returns no items.
    4. An empty page with no next cursor is classified as itemsView: full and hasLoadedOldest: true.
    5. The item loader exits early for hasLoadedOldest: true. The task-tool serializer also omits per-turn item-pagination/completeness metadata, leaving the caller with a successful-looking empty transcript.
    6. Independently of the stale boundary, the helper applies a shared budget of min(turnLimit ?? 5, 5) * 100 items, even for an explicit full request. In this case the older turn consumes the 500-item budget.

    The literal cursor value in the running renderer was not directly observed. A representative boundary in the gap between the older turn and subsequent turns reproduced the observed output exactly. This is a verified reproduction of the mechanism, not a claim to have captured that private in-memory variable.

    Offline reproduction and candidate correction

    The installed reader functions and local routing method were extracted and executed unchanged outside the app, against a read-only fixture containing ordered item IDs/types and turn metadata. The fixture adapter's pagination was checked against 23 actual native response pages: page counts, next cursors, and backwards cursors all matched.

    With the old boundary, requests for 1, 3, 6, and 10 turns reproduced the corresponding observed ID sequences, not just matching counts:

    1 turn:   [0]
    3 turns:  [0, 0, 0]
    6 turns:  [0, 0, 0, 0, 0, 500]
    10 turns: [0, 0, 0, 0, 0, 500, 0, 0, 0, 0]
    

    Clearing the old boundary alone restores access to newer items but leaves the shared page budget, so it is not a complete implementation of explicit full reads.

    For a proof-only correction, the local routing condition was changed so an explicit full request uses the already existing G3t/W3t path: fresh per-turn cursors and pagination until completion. The other view routes were retained. All four cases then returned every expected item ID with full completeness.

    This correction was tested only outside the installed application. It is an engineering direction, not a production patch: other callers, historical-snapshot consistency, remote behavior, cancellation, and large-history performance still need review.

    Suggested regression coverage

    • Resume/load a local paginated task, then append and complete several new turns without restarting.
    • Verify that independent full reads and waits expose the new final messages.
    • Verify old and new items across more than 500 total items and multiple turns.
    • Preserve intentional historical-snapshot pagination; do not globally discard cursors.
    • Never classify a cursor-filtered empty result as the full current transcript.
    • If bounded reads are intentional, expose incomplete item state and a supported continuation rather than silently dropping messages.

    Private task/turn IDs, project names, local user paths, prompt/response contents, raw transcripts, account details, source bundles, and the full performance trace are omitted. Local evidence and the reproducer were retained. This diagnostic was prepared with Codex at the user's explicit request.

  10. raulblanko commented on Sep 14, 2026

    @raulblanko

    We have an additional Windows 26.908.4834.0 occurrence of a completed populated turn being exposed as items:[]. The detailed read-only evidence is in #44399, issue B.

    The important distinction in our case: the older completed turn contains 39 indexed items and becomes fully readable when explicitly requested through the returned turn-page cursor. In the initial multi-turn read, a later 1,158-item turn receives 500 items while that older turn receives zero. The transcript has contiguous ordinals, the projection is at EOF, and both completed turns have their final messages and completion metadata.

    This supports the budget-starvation/incomplete-as-empty subset discussed above. It does not establish the same cause for every newer-turn omission, cached-cursor problem, or mixed-format indexing gap reported here.

    Please preserve per-turn completeness and continuation information at the public reader boundary, and identify the Desktop owner/fixed Windows build for this remaining subset. The linked report contains the exact comparison and requested regression scenario; no private transcript or task identifiers are posted.


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

  11. unlok commented on Sep 15, 2026

    @unlok

    I’m seeing the same symptoms on macOS when one chat monitors another through read_thread and wait_threads.

    The monitored chat is actively working: its UI and local session JSONL contain new assistant messages and tool calls. However:

    • read_thread returns the correct current turn with items: [].
    • wait_threads reports active / inProgress, but latestAssistantMessageId and latestToolMarkerId are null.
    • Calling without afterCursor gives the same result.

    After pausing the monitored chat, its status correctly changes to idle / completed, but both tools still omit the turn’s content. The final message is present in the local JSONL.

    Restarting the desktop app restores access to that completed turn through both tools. However, after continuing the same chat, the new turn immediately becomes invisible to the monitoring chat again, despite messages and tool activity being visible in the UI.

    This affects both live progress monitoring and reading completed results. The monitoring chat can mistake missing data for an absence of activity.

    I can provide exact thread/turn IDs and sanitized tool responses privately.

  12. wstczyw commented on Sep 16, 2026

    @wstczyw

    Additional Windows reproduction (2026-09-16): two completed follow-up turns are empty through the Desktop task tools but readable through the public App Server.

    Environment:

    • Installed OpenAI.Codex Windows package: 26.908.9136.0 (package metadata, not About-dialog version).
    • Separately invoked local CLI/App Server: codex-cli 0.154.0. This is not a verification of the Desktop bundled server version.

    Reproduction:

    1. Send a bounded read-only task to an existing visible local task using send_message_to_thread. Require a short substantive answer and a harmless continuity marker.
    2. Await completion through wait_threads.
    3. Read the exact task using read_thread, including outputs.
    4. Send a second turn to the same task asking it to recall the first turn's marker and substantive conclusions, without tools or delegation.
    5. Await completion and read both exact turns.
    6. Independently start the local App Server over stdio, initialize it, and call thread/read with includeTurns:true for the same task. Do not resume the task or start another turn.

    Observed:

    • Both Desktop turn records reported completed without an error.
    • wait_threads exposed latestAssistantMessageId=null and latestAssistantMessage=null.
    • read_thread returned items:[] for both turns, including a subsequent reread.
    • The independent App Server returned a final-answer agentMessage for each of those exact same turn IDs.
    • The second answer correctly retained the first turn's marker and substantive conclusions. These were not date-only or acknowledgment-only replies.

    This comparison demonstrates persisted, retrievable final answers despite empty Desktop task-tool results in this reproduction. It does not identify the exact faulty cursor, cache, serializer, or renderer branch. The separate server could have performed normal read-time hydration; no pre/post storage comparison was performed.

    An earlier turn in the same task later became readable through the Desktop tool. That earlier turn also contained an unwanted reverse delegation, so it should not be treated as a clean control. The two turns above explicitly prohibited forwarding and delegation.

    Suggested regression coverage:

    • Existing local task, two consecutive completed follow-ups, exact turn identity preserved.
    • Desktop read_thread and wait_threads expose each newest substantive final answer.
    • Empty/incomplete projections are distinguishable from a genuinely empty answer.
    • Do not rerun business work merely to recover a missing reply.

    No application patch, direct database edit, or custom scheduler was used. This comment omits private task/turn IDs, prompts, response text, project/company names, local paths, credentials, raw logs, and business data.

    Prepared and posted by an AI assistant with the account owner's explicit authorization.

  13. hide-in-trash commented on Sep 19, 2026

    @hide-in-trash

    Additional Windows reproduction and newer-package inspection, 2026-09-19. This adds evidence from desktop MSIX 26.915.3509.0 and an offline inspection of 26.915.4065.0 to the cached-boundary observations already discussed here.

    Desktop read_thread returns empty items for turns created after thread resume

    Environment

    • Windows x64 desktop MSIX: OpenAI.Codex 26.915.3509.0.
    • Bundled backend: codex-cli 0.155.0-alpha.9; running binary SHA256 matches the installed resources/codex.exe.
    • Built-in codex_app tools load successfully; list_threads works.
    • Affected tasks use paginated history.

    Observed behavior

    For multiple already-loaded tasks, read_thread returns valid completed turn metadata but items: [] for turns created after the most recent thread/resume. Older turns return their items. The same issue affects ordinary user-driven replies in the calling task, so it is not limited to cross-task messages or a particular response format.

    For two tasks, completed missing replies were verified in the read-only persisted history store. Selected final texts also match the raw rollout. No database reset, production restart, or installed-code modification was performed.

    One task was resumed at 04:28:24.777 UTC. Its preceding turn returns all 24 stored items; its next turn, starting at 04:28:25 UTC, returns 0 of 7 stored items. A second task exhibits the same before/after boundary. Unloaded history and an idle task with only pre-resume turns read successfully.

    Suspected path

    In app-initial-f61fcec072b5.js:

    1. read_thread calls manager.listThreadTurns with itemsView full.
    2. readThreadTurnsPage uses the cached conversation.paginatedHistory.itemsBackwardsCursor as the item start cursor for every listed turn.
    3. cFt requests the latest turn list, then Wm calls thread/items/list with that older item boundary.
    4. An empty response with nextCursor null is marked itemsView full / hasLoadedOldest true.

    wait_threads uses the same listThreadTurns path. Empty items can prevent extraction of the latest assistant message. A null message from an in-progress turn alone is not sufficient to diagnose this failure.

    We did not capture the actual production request cursor. This is a supported root-cause hypothesis, not a fully instrumented production proof.

    Bounded offline reproduction

    Use an isolated CODEX_HOME and the bundled backend, with three indexed completed turns containing 4, 2, and 6 items respectively. No model turns or production server connection are needed.

    1. Read all items newest-first with limit 8 to obtain a native nextCursor covering the two newer turns.
    2. Call thread/items/list separately for each turn with that cursor.
    3. Results are 4, 0, 0. Starting each turn at cursor null returns 4, 2, 6.
    4. Replay those native responses through the extracted original cFt: new turns are empty and marked full. Starting item reads at null restores the expected IDs, chronology, and final text hashes.

    Newer official package checked without installing

    The official Windows x64 download supplied package 26.915.4065.0 on 2026-09-19. Its frontend asset app-initial-6c4523b43a11.js still uses the cached itemsBackwardsCursor in this path. Its extracted pagination function reproduces the same outcome with the captured native responses. This was not an end-to-end test of the upgraded desktop/backend.

    Proposed direction

    Separate tool reads of current saved history from UI snapshot pagination. For read_thread and wait_threads, start item pagination at null or a freshly established appropriate boundary. Preserve the existing snapshot cursor for historical UI pages, resume, and revert. Retain item budgets, per-turn caps, ordering, deduplication, and cursor/turn-ID guards.

    Please verify behavior for loaded and unloaded tasks, new turns after resume, running and completed turns, history pagination, and wait_threads cursor/revision deduplication.


    Prepared and posted by OpenAI Codex (AI assistant) with the account owner's explicit authorization. Private task/turn IDs, account identifiers, project names, local user paths, conversation contents, raw logs, databases, and source bundles are not included.

  14. dex-tripnull commented on Sep 19, 2026

    @dex-tripnull

    Additional Windows Desktop corroboration: cross-task reads have reported completed turns with error: null and items: [], while independent UI/task artifact evidence showed that those turns produced a substantive final response. Older turns from the same tasks remained readable. The symptom appeared in both local and remote-task coordination, so completed status alone was insufficient to accept or relay the result. We did not infer a root cause, use transcript surgery, or retry an uncertain task send. Private task IDs, paths, prompts, transcripts, and raw logs omitted.

  15. mkloppel commented on Sep 19, 2026

    @mkloppel

    Additional reproducible evidence from two Windows desktop hosts using built-in Remote, observed 2026-09-19.

    Both hosts are now running MSIX package OpenAI.Codex 26.915.4065.0 (verified installed package and target running executable path). The issue originally occurred with target package 26.908.9136.0 and survives updating it to match. Target model: gpt-5.6-sol, medium reasoning.

    Controlled sequence:

    1. Send a prompt to an existing remote task with send_message_to_thread.
    2. The target completes normally. Its final assistant reply is visible in the UI and present in the persisted rollout JSONL with task_complete.
    3. wait_threads reports completed / error:null but latestAssistantMessage:null. read_thread returns the same completed turn with items:[]. Older turns in the same task are readable.
    4. Fully exit/reopen ONLY the coordinating desktop app, leaving the target running. Previously empty completed turns become readable, including final answers and command output.
    5. Send a new one-line, no-tools marker prompt. It completes in 2639 ms. The new turn again returns items:[], while its preceding turn still returns 12 items including the final answer.
    6. Update/relaunch the target to match package 26.915.4065.0. The old marker becomes readable, but a new post-update turn (17355 ms) again returns empty contents through both tools. The target's own local read_thread also returns items:[] for this turn.

    For three affected turns, read-only inspection of the target rollout found respectively 51/3/13 response_item records, each with exactly one final assistant message and one task_complete. No session/database edits were made. This is not just a missing stream event, slow completion, answer length, or required version mismatch. The fresh failing tests also occurred after disabling the target screensaver; no evidence implicates it.

    Source-backed hypothesis, NOT a proven raw-RPC root cause: in the coordinating package's shipped app-initial JS, readThreadTurnsPage passes conversation.paginatedHistory.itemsBackwardsCursor to the paginated helper for full-item reads. That helper uses this initial cursor for each requested turn and can label an empty result as itemsView:full when nextCursor is null. A resume-time snapshot boundary reused for newly created turns is consistent with the restart/new-turn pattern. An isolated test of that shipped helper with simulated cursor responses yields zero items for an old cutoff and one item with cursor:null. We did not capture the exact live RPC cursor values, so this remains a lead rather than a confirmed fix.

    Suggested regression case: connect/resume a paginated target, read existing history, complete a NEW target turn, then verify both read_thread and wait_threads return its final agentMessage without reconnecting. Repeat for remote and target-local reads.

    Private hostnames, share addresses, task/turn IDs, prompts, personal paths, and raw logs are intentionally omitted. Sanitized investigation evidence is retained locally.

  16. yfz649543201-dotcom commented on Sep 20, 2026

    @yfz649543201-dotcom

    Windows desktop: read_thread returns empty items for completed new turns while core history APIs return content

    Additional Windows evidence for #43468. This adds a same-bundled-core, isolated cursor comparison to the existing reports; it is not a claim that every report has one proven cause.

    Environment

    • Windows x64.
    • Desktop package version: 26.915.4065.0.
    • Bundled core executable reports: codex-cli 0.155.0-alpha.9.2.
    • Existing paginated conversations; observed in two different projects.

    Actual behavior

    After an application restart, completed new turns in both existing conversations are returned by the desktop read_thread tool with correct turn metadata but items: []. Older, pre-restart turns remain readable. Increasing the requested turn count or enabling tool outputs does not recover the new content.

    The affected new turns really executed. Their persisted messages and the matching history projection entries are present. The same bundled core, reading an isolated copy with the complete history chain and its projection, returns the missing items through the public history APIs. No live database was repaired or rewritten.

    This report is specifically about the tool history-read path. It does not establish that the current on-screen conversation UI is blank, that data was deleted, or that every earlier history-display complaint has this cause.

    Expected behavior

    Reading recent completed turns should return their available messages, including turns completed after the conversation was loaded/resumed, without requiring an application restart.

    Reproduction / regression scenario

    1. Open or resume an existing paginated conversation.
    2. Complete a small new turn containing a recognizable, non-sensitive marker.
    3. From another task, request the affected conversation's most recent turns using read_thread, including outputs.
    4. Check whether the completed new turn has an empty items array while an earlier turn is readable.
    5. Compare the same turn using the public core APIs in an isolated copy containing the complete history chain and the corresponding projection:
      • thread/turns/list with itemsView: "full".
      • thread/items/list with the target turn ID, sortDirection: "desc", and cursor: null.
    6. Repeat in a second conversation. Existing production data is not necessary; a synthetic paginated conversation would be preferable for a maintainer regression test.

    These steps describe the observed existing-conversation scenario. A brand-new synthetic history has not yet been shown to reproduce the desktop symptom.

    Controlled cursor comparison

    In the isolated copy, obtain a real nextCursor from thread/items/list on an earlier completed turn (sortDirection: "desc", limit: 1). Compare reading the newer target turn with that older cursor versus cursor: null.

    Anonymized sample New turn read with older API-returned cursor Same turn read with cursor: null
    Conversation A, new turn 1 0 items 3 items
    Conversation A, new turn 2 0 items 15 items
    Conversation B, new turn 1 0 items 13 items

    All six count assertions passed and the control test was repeated successfully. Cursors were returned by the API, not manually constructed. thread/turns/list with either full or summary also returned content in the isolated core comparison.

    Candidate mechanism, not a confirmed live-memory root cause

    Read-only inspection of the installed desktop adapter indicates that read_thread requests full items, but an already-loaded paginated-conversation path can combine newly listed turn metadata with the conversation's saved history snapshot cutoff (itemsBackwardsCursor) when fetching each turn's items. The UI history path separately merges local newer turns; the tool response path does not appear to perform the equivalent merge.

    The controlled comparison demonstrates why an older cutoff can exclude new-turn content. However, the actual cutoff value in the running desktop process was not captured. Therefore this is a candidate explanation consistent with the symptom, not proof of the exact live cursor or of a core storage defect. An old cursor excluding newer items is expected API behavior; the suspected defect is its use for a latest-content tool query without including the newer items.

    Please investigate the desktop tool adapter's snapshot/live-tail handling. A fix should preserve intentional UI snapshot pagination while returning the correct newer content to read_thread.

    Suggested acceptance checks

    • After resume and a new completed turn, read_thread returns that turn's message immediately, without restarting.
    • The returned content matches the new marker rather than a prior turn.
    • Paging backward preserves older messages without missing or duplicating items.
    • Repeat across two conversations and test actual UI display separately.

    Privacy / scope

    Prepared by an AI assistant with the affected user's permission for public submission. It contains only versions, anonymized reproduction details, and test counts. No original conversation text, task IDs, project names/files, account information, authentication material, complete logs, database files, extracted application source, or screenshots are included.

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-serverbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions