openai / openai/codex

VS Code extension: paginated thread stops loading older turns although App Server history is complete

Open
#46,221 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug extension session
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the IDE extension are you using?

26.908.40401

What subscription do you have?

ChatGPT Plus

Which IDE are you using?

Visual Studio Code 1.138.0

What platform is your computer?

Windows 11 x64

What issue are you seeing?

A long-running local Codex thread using history_mode=paginated became visually truncated in the VS Code extension after reopening it.

The thread itself was not lost. Read-only diagnostics showed that the underlying history remained complete:

  • thread/turns/list could traverse all 129 visible turns.
  • itemsView=full returned 13,487 items across those turns.
  • No turns were empty.
  • Pagination cursors remained valid.
  • SQLite integrity checks passed.
  • The end of the conversation history was reachable through the local App Server.

Despite this, the VS Code extension initially rendered only the most recent 3 turns, and scrolling upward did not load older history.

I reproduced the same behavior using a clean VS Code profile and an isolated extension environment, which suggests this was not only a normal-profile/cache issue.

I also observed warnings in the same general family as:

dropping turn-scoped item for unknown turn id

A temporary local client-side workaround restored progressive loading of the older history and allowed the full conversation to be navigated again. I am intentionally not including implementation details of that workaround here, but I can provide additional sanitized diagnostics if useful.

Related issues reviewed: #35304 and #45203.

This case appears different from #45203 because the affected thread had complete turn items rather than items=[].

What steps can reproduce the bug?
  1. Use a long-running local Codex thread in VS Code with history_mode=paginated.

  2. Restart or reopen VS Code and open the same thread.

  3. Scroll upward through the conversation.

  4. In the affected state, only a small recent subset of turns remains visible and older turns do not load.

  5. Query the same thread through the local Codex App Server using:

    • thread/turns/list
    • itemsView=full
    • thread/items/list
  6. Compare the App Server result with what the VS Code extension renders.

In my affected case, the App Server could traverse the complete history (129 turns and 13,487 items), while the VS Code client initially rendered only 3 recent turns and did not continue loading older ones.

The issue also reproduced with a clean VS Code profile and isolated extension environment.

What is the expected behavior?

If the paginated thread history and its items are complete and valid, scrolling upward in the VS Code extension should continue loading older turns until the beginning of the thread.

The client should not stop historical backfill while the App Server still exposes valid older-history cursors and complete turn data.

Additional information

Environment:

  • VS Code: 1.138.0
  • OpenAI VS Code extension: 26.908.40401
  • Bundled Codex CLI: 0.154.0-alpha.6.2
  • Windows 11 x64
  • Thread history mode: paginated

Observed history:

  • Visible logical turns: 129
  • Total items returned with full hydration: 13,487
  • Empty turns: 0
  • End of history successfully reached through the App Server

The issue appeared temporally after updating/restarting VS Code 1.138.0, which introduced expanded Codex session/agent-host functionality, but I do not have evidence that the VS Code update itself caused this bug.

No conversation data needed to be deleted or rebuilt to recover the history.

I can provide additional sanitized logs or read-only diagnostic results if maintainers need them.

Related:

  • #35304
  • #45203

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce with a long-running paginated thread in VS Code, then compare the extension’s rendered history with thread/turns/list, itemsView=full, and thread/items/list from the local App Server. Check the behavior after reopening and while scrolling upward, including the reported unknown-turn-id warning. Done means valid older turns continue loading to the beginning when App Server history and cursors are complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.