Skip to content

Increase cap of sessions in VS Code extension #15368

Description

@iqdoctor

What version of the IDE extension are you using?

26.5318.11754

What subscription do you have?

Pro

Which IDE are you using?

VS Code

What platform is your computer?

Linux

What issue are you seeing?

Codex VS Code Plugin Feedback

Evidence in local extension code:

  • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/index-BX_E-kXD.js.map
    • embedded source ../../src/feedback/feedback-command.tsx
    • embedded source ../../src/feedback/feedback-success.tsx

Environment

  • VS Code extension: openai.chatgpt-26.5318.11754-linux-x64
  • Bundled extension CLI: codex-cli 0.116.0-alpha.10
  • System CLI: /usr/bin/codex -> codex-cli 0.116.0
  • Host: remote VS Code server on Linux
  • Codex data dir: /root/.codex

Problems

1. Session list is capped too aggressively

With intensive Codex usage, the session/thread list in the VS Code plugin becomes incomplete. In my case the plugin initially showed only 50 sessions, then after local bundle patching it showed 100, and only after forcing auto-pagination it showed 313. This makes the sidebar/task history unreliable for real workloads.

Expected:

  • the plugin should either load all recent local threads needed for search/resume,
  • or clearly support pagination / load more in the UI,
  • or at minimum not silently stop at a fixed hidden cap.

Observed local code paths:

  • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/app-server-manager-hooks-DC8Cu72L.js.map
    • embedded source ../../src/app-server/app-server-manager-constants.ts:9
      • RECENT_CONVERSATIONS_PAGE_SIZE = 50
    • embedded source ../../src/app-server/app-server-manager.ts:1161-1181
      • refreshRecentConversations() requests thread/list with limit = RECENT_CONVERSATIONS_PAGE_SIZE * recentConversationsPageCount
    • embedded source ../../src/app-server/app-server-manager.ts:1298-1315
      • loadMoreRecentConversations() requests thread/list with limit: RECENT_CONVERSATIONS_PAGE_SIZE
  • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/index-BX_E-kXD.js.map
    • embedded source ../../src/sidebar/sidebar-electron.tsx:144
      • sidebar pulls local threads via useConversationsMeta()
    • embedded source ../../src/header/recent-tasks-menu/recent-tasks-menu.tsx
      • recent/local tasks UI renders what it gets; there is no visible explicit paging UX for local conversations there

Local temporary workaround applied:

  • runtime bundle patched in:
    • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/app-server-manager-hooks-DC8Cu72L.js
  • changes:
    • raised page size from 50 to 500
    • added auto-pagination during recent conversation refresh until nextCursor is exhausted or 500 items are collected

2. Lost titles without disk fallback

Some threads lose their title in the plugin/local state DB even though a valid thread name still exists on disk. This makes sessions effectively disappear from normal search/use in the plugin.

Concrete example:

  • thread id: 019ca226-b30c-7181-bdf0-62b891464a25
  • disk/session index had:
    • /root/.codex/session_index.jsonl
    • thread_name = "Worker"
  • but plugin/local DB had:
    • /root/.codex/state_5.sqlite
    • title = ''
    • first_user_message = ''

As a result, the CLI could still find the session as Worker, but the VS Code plugin could not reliably surface it by name.

Observed local code paths:

  • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/app-server-manager-hooks-DC8Cu72L.js.map
    • embedded source ../../src/app-server/app-server-manager.ts:1389-1415
      • upsertRecentConversationState() uses thread.name or persisted title cache
      • no fallback to session_index.jsonl, rollout JSONL, or recovery history when metadata title is blank
    • embedded source ../../src/app-server/app-server-manager.ts:1472
      • new conversation state gets title: persistedTitle
  • /root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/index-BX_E-kXD.js.map
    • embedded source ../../src/local-conversation/get-local-conversation-title.ts
      • fallback logic uses only:
        • conversationState.title
        • first turn input text
        • parent subagent prompt
      • there is no disk/index fallback

Supporting local evidence:

  • thread index on disk:
    • /root/.codex/session_index.jsonl
  • thread state DB:
    • /root/.codex/state_5.sqlite
  • rollout file exists:
    • /root/.codex/sessions/2026/02/28/rollout-2026-02-28T05-49-31-019ca226-b30c-7181-bdf0-62b891464a25.jsonl
  • recovery text exists:
    • /root/.codex/recovery/019ca226-b30c-7181-bdf0-62b891464a25/history.jsonl

Local temporary workaround applied:

  • repaired blank titles directly in:
    • /root/.codex/state_5.sqlite
  • source of repair:
    • first from /root/.codex/session_index.jsonl
    • fallback from rollout/history on disk
  • backup created:
    • /root/.codex/state_5.sqlite.bak-20260321-042851

Suggested fixes

Session list cap

  • Avoid hidden hard caps for local recent threads in the extension UI.
  • Either:
    • auto-page until all recent threads are loaded,
    • or expose an explicit local "load more" UX,
    • or use the existing full traversal path analogous to listAllThreads() instead of only the first recent page.

Lost title fallback

  • On recent-thread hydration, if thread.name is blank and the persisted title cache is blank:
    • check session_index.jsonl for thread_name
    • if still blank, derive a title from rollout/recovery first user text
    • write repaired title back into the local thread state DB/index
  • This should be a metadata-layer repair, not a UI-render-time disk read.

Short version

Two plugin issues become visible under heavy real use:

  1. local session list silently truncates because recent conversations are page-capped;
  2. blank local DB titles are not repaired from disk, even when CLI-visible thread names still exist.

I reproduced both locally and applied temporary workarounds, but both should be fixed in the extension/app-server metadata path rather than by local runtime patching.

019d0ddb-8fb3-7873-a5e0-688f9437ef61

What steps can reproduce the bug?

Uploaded thread: 019d0ddb-8fb3-7873-a5e0-688f9437ef61

What is the expected behavior?

Open Tasks in Plugin, see View All (50) - hard limited 50 records

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionIssues related to the VS Code extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions