Increase cap of sessions in VS Code extension
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()requeststhread/listwithlimit = RECENT_CONVERSATIONS_PAGE_SIZE * recentConversationsPageCount- embedded source
../../src/app-server/app-server-manager.ts:1298-1315 loadMoreRecentConversations()requeststhread/listwithlimit: 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
50to500 - added auto-pagination during recent conversation refresh until
nextCursoris exhausted or500items 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.jsonlthread_name = "Worker"- but plugin/local DB had:
/root/.codex/state_5.sqlitetitle = ''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()usesthread.nameor 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.nameis blank and the persisted title cache is blank: - check
session_index.jsonlforthread_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:
- local session list silently truncates because recent conversations are page-capped;
- 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_
16 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Added focused follow-up comments to two related issues:
Why this may help a coding agent process the duplicates better:
What I intentionally did not do:
#14389, because it is already closedCodex VS Code Plugin Session Repair Notes
Date: 2026-03-21
Scope
This note captures a repeatable workflow for debugging and hot-patching future Codex VS Code extension releases when:
This was validated on:
openai.chatgpt-26.5318.11754-linux-x64codex-cli 0.116.0-alpha.10/usr/bin/codex->codex-cli 0.116.0Symptoms Seen
1. Hidden recent-thread cap
Observed sequence:
50local sessions100nextCursor, plugin showed313Conclusion:
2. Blank-title sessions
Concrete example:
019ca226-b30c-7181-bdf0-62b891464a25~/.codex/session_index.jsonlstill hadthread_name = "Worker"~/.codex/state_5.sqlitehad:title = ''first_user_message = ''Effect:
WorkerPrimary Local Paths
/root/.vscode-server/extensions/openai.chatgpt-*/webview/assets//root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/app-server-manager-hooks-DC8Cu72L.js/root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/app-server-manager-hooks-DC8Cu72L.js.map/root/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/webview/assets/index-BX_E-kXD.js.map/root/.codex/state_5.sqlite/root/.codex/session_index.jsonl/root/.codex/sessions//root/.codex/recovery/Root Cause Notes
Recent-thread cap
From the embedded sources in the sourcemap:
src/app-server/app-server-manager-constants.tsRECENT_CONVERSATIONS_PAGE_SIZE = 50src/app-server/app-server-manager.tsrefreshRecentConversations()requeststhread/listwith:limit = RECENT_CONVERSATIONS_PAGE_SIZE * recentConversationsPageCountloadMoreRecentConversations()requeststhread/listwith:limit: RECENT_CONVERSATIONS_PAGE_SIZEsrc/sidebar/sidebar-electron.tsxuseConversationsMeta()Interpretation:
Blank-title sessions
From the embedded sources in the sourcemap:
src/app-server/app-server-manager.tsupsertRecentConversationState()relies on:thread.namesession_index.jsonlsrc/local-conversation/get-local-conversation-title.tsconversationState.titleInterpretation:
title, the plugin can fail to surface a session by name even when disk data still existsHow To Inspect New Releases
1. Find the current hashed asset names
2. Check the embedded source map for the hardcoded page size
Look for:
RECENT_CONVERSATIONS_PAGE_SIZE = 503. Check the live compiled JS bundle for patch needles
Quick Hot Patch For Future Versions
A. Raise the recent-thread page size to 500
Use the actual current hashed bundle path.
B. Force auto-pagination until 500 items or no
nextCursorThis is what was needed after the simple
50 -> 500patch still only surfaced100.C. Syntax check
D. Reload VS Code
In VS Code:
Developer: Reload WindowBlank Title Repair
Goal
Repair
threads.titleinstate_5.sqlitefrom disk-backed sources:session_index.jsonlhistory.jsonlOne-off repair script
Validation Commands
Count blank titles
Inspect a specific thread
Check how many repaired titles still look bad
Notes
Related GitHub Issues
https://github.com/openai/codex/issues/15368https://github.com/openai/codex/issues/14812#issuecomment-4102065616https://github.com/openai/codex/issues/15060#issuecomment-4102065633https://github.com/openai/codex/issues/15368#issuecomment-4102425406Follow-up from 2026-03-22.
The extension version was still unchanged on my machine:
openai.chatgpt-26.5318.11754-linux-x64I verified that the previous hot patches were still present in the active bundle:
50 -> 500page-size change inrefreshRecentConversations()50 -> 500page-size change inloadMoreRecentConversations()nextCursorDespite that, the visible local session count had dropped again, this time to
200instead of the previously observed313.That suggests the issue is deeper than just
RECENT_CONVERSATIONS_PAGE_SIZE = 50. The more reliable workaround was to bypass the initial recent-page request entirely and makerefreshRecentConversations()use the existing full traversal path:listAllThreads({ modelProviders: null, archived: false })So the refined diagnosis is:
thread/listrecent-loading path,listAllThreads()is currently a stronger workaround than only raising the page size and chasingnextCursor.Follow-up: after another VS Code extension auto-update, I re-applied the same local runtime patch to the new bundle and the full thread list became visible again.
Current extension version:
26.5325.31654Patched bundle:
/root/.vscode-server/extensions/openai.chatgpt-26.5325.31654-linux-x64/webview/assets/app-server-manager-hooks-XL0eRatK.jsLocal workaround re-applied:
refreshRecentConversations()switched from the initialthread/listpage tolistAllThreads({ modelProviders: null, archived: false })loadMoreRecentConversations()raised from50to500Observed result after
Developer: Reload Window:414sessions againThis is another data point that the store update simply overwrites the patched webview bundle, and that the underlying issue is still the same recent-thread loading path rather than missing local session data.
Follow-up: in a newer VS Code extension build, the underlying issue is still reproducible, but the recent-thread loading logic has moved to a different compiled asset/module.
Current extension version:
26.5415.20818Relevant asset now:
/root/.vscode-server/extensions/openai.chatgpt-26.5415.20818-linux-x64/webview/assets/app-server-manager-signals-Dcn6qX09.jsIn older builds, the patch point was in
app-server-manager-hooks-*.In this build, the relevant patch points moved to the delegated recent-thread loader methods:
refetchThreadList(...)loadNextThreadListPage(...)Local workaround re-applied successfully:
refetchThreadList(...)switched from the initiallistRecentThreads({ limit: 50 * this.pageCount, cursor: null })path to a full traversal throughlistAllThreadsRequest(lv(...)in the compiled bundle)loadNextThreadListPage(...)raised from50to500This looks like the same product bug, but it is useful to note that the implementation moved. That makes the regression easy to carry forward across releases even when the symptom stays identical.
Follow-up after another VS Code extension update: same symptom and same conceptual workaround, but the compiled asset/module moved again.
Current extension version:
26.5417.40842Relevant asset now:
/root/.vscode-server/extensions/openai.chatgpt-26.5417.40842-linux-x64/webview/assets/send-app-server-request-C98EYioR.jsPreviously the recent-thread loader had moved to
app-server-manager-signals-*; in this build it is now bundled undersend-app-server-request-*.The conceptual patch points are still the same:
refetchThreadList(...)loadNextThreadListPage(...)Local workaround re-applied successfully:
mv(...)in this minified bundle, corresponding tolistAllThreadsRequest)50to500So the underlying bug appears unchanged, but the implementation keeps moving between compiled assets. This is useful for any coding agent working on the issue because searching only the old bundle names will miss the current patch point.
I am seeing the same issue on macOS with Codex Desktop
26.422.21637(CFBundleVersion 2056).The important part: local data is not missing. The threads exist in
~/.codex/state_5.sqlite, but Codex Desktop only loads a global window of recent threads and then projects appear incomplete or as if they had no chats.Current local evidence:
~/.codex/state_5.sqlitehas the expected project threads:Crv_PM: 14 active threadsWebPhotoCRV: 8 active threadsAyudaCodex: 5 active threads~/.codex/.codex-global-state.jsonis not empty:active_roots: 3thread_titles: 27thread_order: 27~/.codex/session_index.jsonl: 27 entries~/Library/Application Support/Codex/sentry/scope_v3.jsonrepeatedly reports:thread_count_total: 50thread_count_loaded_recent: 50I also inspected
/Applications/Codex.app/Contents/Resources/app.asarand found the recent thread loader starts with:This matches the observed behavior: if a workspace/project has threads outside the initial global recent window, the Desktop UI does not show the complete project even though the local SQLite data is present.
I tried the usual safe steps:
Codex.appglobal-stateandsession_indexNone of those fixed the issue because the underlying thread data was already present.
Expected behavior:
cwd/workspace, not only rely on the initial global recent-thread window.RECENT_CONVERSATIONS_PAGE_SIZEshould be configurable or much larger.By projectshould not show incomplete projects just because their threads fell outside the initial recent window.This is a serious workflow blocker for projects with more than a handful of threads.
Additional local finding after deeper testing. This may help isolate the actual Desktop reindexing bug:
the issue is not only the 50 global recent-thread limit. There is also a reindexing/source-of-truth mismatch.
Root cause observed locally:
Codex Desktop does not reliably render project thread visibility from
state_5.sqliteorsession_index.jsonlalone. The UI state appears to be derived from themtimeof therollout-*.jsonlfiles under:Follow-up after another VS Code extension update: same symptom and same conceptual workaround, but the compiled asset/helper moved again.
Current extension version:
26.5422.21459Relevant asset now:
/root/.vscode-server/extensions/openai.chatgpt-26.5422.21459-linux-x64/webview/assets/app-server-manager-signals-DaIWbgQQ.jsIn the previous reapply, the relevant logic had moved under
send-app-server-request-*.In this build, the active patch target is back under
app-server-manager-signals-*.The conceptual patch points are still the same:
refetchThreadList(...)loadNextThreadListPage(...)Local workaround re-applied successfully:
listRecentThreads({ limit: 50 * this.pageCount, cursor: null })to the full traversal helper (ey(...)in this minified bundle)50to500So the underlying bug still appears unchanged, but the implementation keeps moving between compiled assets and helper names (
lv(...)->mv(...)->ey(...)). That makes the regression easy to carry forward across releases, and it means searching only older bundle names will miss the current patch point.Additional external confirmation: after another update, the same bug remains but the compiled patch target moved again.
In extension version
26.5422.21459, the relevant logic moved to:webview/assets/app-server-manager-signals-DaIWbgQQ.jsThe conceptual patch points are still:
refetchThreadList(...)loadNextThreadListPage(...)50A local workaround reportedly changed the initial refresh from:
listRecentThreads({ limit: 50 * this.pageCount, cursor: null })to a full traversal helper, and raised load-more page size from
50to500.This reinforces that the underlying bug is unchanged, but the compiled implementation keeps moving between builds. A local bundle patch is therefore not a maintainable solution.
Please expose an official setting or fix project thread loading so project views query all local threads by project/cwd instead of depending on the latest 50 global recent threads.
Follow-up after another VS Code extension auto-update: the regression happened again, but this time the compiled asset/helper did not move.
Current extension version:
26.5422.30944Relevant asset:
/root/.vscode-server/extensions/openai.chatgpt-26.5422.30944-linux-x64/webview/assets/app-server-manager-signals-DaIWbgQQ.jsCompared with
26.5422.21459:app-server-manager-signals-DaIWbgQQ.jsrefetchThreadList(...)andloadNextThreadListPage(...)ey(...)But the store update still restored the original recent-thread behavior:
listRecentThreads({ limit: 50 * this.pageCount, cursor: null })limit: 50Local workaround re-applied successfully:
ey(...)50to500node --checkpasses for the patched bundleThis adds a slightly different data point: the bug/regression is not only caused by implementation moving between compiled assets. Even when the asset and helper remain stable across builds, the extension update overwrites the runtime bundle and brings back the hidden recent-thread cap.
Follow-up from the latest local validation on
openai.chatgpt-26.5422.30944-linux-x64:The issue is not only the visible client-side cap. A naive local workaround that replaces the first
refetchThreadList(...)page with the existing recursive full traversal helper (ey(...), internally pagingthread/listatlimit:200) can make startup worse for large local histories.Observed locally:
~/.codex/state_5.sqlitehas1963rows inthreads.refetchThreadList(...)through full recursive traversal caused the VS Code UI to stay cloud-only while local sessions were still being walked/hydrated.refetchThreadList(...):listRecentThreads({ limit: 500 * this.pageCount, cursor: null }), then keepnextCursor = r.nextCursorloadNextThreadListPage(...):limit:500Why this may help triage:
refetchThreadList(...),loadNextThreadListPage(...), and helperey(...)inapp-server-manager-signals-DaIWbgQQ.js.Follow-up: I opened a separate issue for the broader VS Code sidebar semantics that this cap/history bug exposed:
Why this may be useful for agent triage:
refetchThreadList,loadNextThreadListPage,refreshRecentConversations, inlineslice(0,Math.max(3,e.length)), and theView all ({total})label);PAGE_SIZE = 25, updated-time sort, cursor/background loading, progressive search);ThreadListResponsehas cursors but no exact same-filtertotal, so the UI should not present loaded rows as if they are total rows.I intentionally kept this as a cross-reference rather than duplicating the full spec into this thread, so #15368 can remain focused on the disappeared/truncated history symptom.
Truncation also a problem for me on long-running chat sessions with multiple compactions.
Codex (gpt-5.5) tells me that it's an issue with VScode not handling either the compactions, or just the length of some of the chats.
If I know what the last thing I saw was, or roughly where we were, Codex can find the session that is truncated and then I can read or Codex can summarize to pick up where we were.
But can cause a little disorientation while I try to work out what's happened.
Confirmed on VS Code extension
26.5623.141536-linux-x64.The webview sidebar now has paginated/full-traversal paths, but the native VS Code chat-session provider remains capped.
provideChatSessionItems()callsrequestThreadList()once with:It maps only that response's
dataand never followsnextCursor. The provider is registered throughvscode.chat.registerChatSessionItemProvider("openai-codex", ...).Expected: follow
nextCursorincrementally, or implement load-more/progressive search. Sorting byupdated_atwould also better represent "recent chats".This appears to be a remaining extension-host code path after the sidebar pagination improvements, rather than an app-server storage limitation.