Skip to content

Agent sessions from Codex and Claude missing from Chat Sessions list #340573

Open

Agent suggestions

Public preview

Description

@interconnectedMe

Does this issue occur when all extensions are disabled?: Not tested (the issue concerns sessions contributed by installed agent extensions)

  • VS Code Version: 1.141.0 (commit 2a59476)
  • OS Version: Ubuntu 26.04.1 LTS, Linux x64, kernel 7.0.0-38-generic

Summary

The native Chat Sessions sidebar has stopped listing most prior Codex and Claude sessions. The Codex and Claude sources are checked in the Sessions filter. Resetting the filter, refreshing the list, and reloading VS Code do not restore them. The conversations remain in their local provider stores.

Steps to Reproduce

  1. Use Codex and Claude sessions in VS Code's native Chat Sessions view.
  2. Open the Sessions list and verify that the Codex and Claude source filters are enabled.
  3. Reset the filters and refresh the list.
  4. Observe that only a small number of sessions appear; prior Codex and Claude sessions are absent.
  5. Reload the window and refresh again; the sessions remain absent.

Expected Behavior

Previously-created, non-archived Codex and Claude sessions should remain discoverable and visible in the native Chat Sessions list when their source filters are enabled.

Actual Behavior

The list contains only a few sessions, while the local Codex state database and VS Code's session-state store still contain the missing session records. A trace-enabled VS Code session reported only three sessions resolved from providers, although the state store contained 195 session-state entries, including openai-codex:// and claude-code: resources.

The source filters for Local, Copilot CLI, Cloud, Copilot, Claude, and Codex were enabled in the captured UI. Reset, Refresh, and Developer: Reload Window did not restore the missing sessions.

Update History

The immediately preceding installed version was VS Code 1.140.0 (1.140.0-1790759618). The package log records an upgrade to 1.141.0 (1.141.0-1791276758) on 2026-10-07. The problem was observed on 1.141.0. This timing may be relevant but does not establish that the update caused the issue.

Diagnostics

  • VS Code: 1.141.0, commit 2a59476c9bfcb90b3ddc372c36762471b7dfad1c, dated 2026-10-06.
  • GitHub Copilot: 1.0.92-4.unstable.r37397886721.gad270aa; Copilot SDK: 1.0.17.37397886721.gad270aa.
  • Codex extension: 26.1002.51308.
  • Claude Code extension: 2.1.294.
  • The Codex native session database contains unarchived threads updated through 2026-10-08.
  • The logged-in VS Code profile has no explicit chat.viewSessions.enabled setting. The Sessions view is present and its agent-source filters are enabled.
  • A comment on Copilot Chat: external-agent (Claude) delegated sessions missing from Copilot Chat's own history #336185 suggests chat.viewSessions.enabled: true as a workaround for a different missing-history symptom; it does not explain this case because the Sessions view is already present.

Related Issues

This report is about multiple providers being absent together from the native Sessions list, so the related reports may describe distinct failures or only overlapping symptoms.

Activity

  1. interconnectedMe commented on Oct 8, 2026

    @interconnectedMe
    Author

    Update: the Codex portion is resolved by explicitly setting this in the active VS Code profile:

    "chat.editor.codex.preferAgentHost": false

    Verification:

    • Downgrading 1.141.0 to the previously installed 1.140.0, restarting the computer, refreshing Sessions, and reloading the window did not restore the missing Codex sessions.
    • Widening chat.agentSessions.showExternal to last30Days did not restore them either.
    • Setting chat.editor.codex.preferAgentHost to false restored the Codex history and pinned sessions immediately, before Developer Reload Window.
    • Restored sessions opened correctly in editor tabs, including recent messages. The history and pins survived Developer Reload Window.
    • We updated back to 1.141.0 with the setting retained and confirmed the working session list/editor workflow.
    • The Copilot sign-in banner remained visible while the Codex history was restored, so it was not blocking this Codex session list.

    The installed setting description says that enabling this preference uses the agent host/App Server instead of the OpenAI extension and that only one Codex implementation surfaces per window. Inspecting the installed VS Code code showed that the extension's openai-codex contribution is gated when the built-in Codex implementation is enabled and preferred. This is consistent with the observed recovery. Follow-up inspection has now confirmed cached experimental overrides for both Codex settings; see the evidence below.

    This narrows our original multi-provider report: Codex recovery is verified. Claude recovery has not been separately verified. Claude logs also contained SDK not downloaded yet; deferring chat discovery, but that does not by itself confirm the readiness race described in #334170.

    The rollback alone did not fix this case, and we are now back on 1.141.0. No session-store deletion or index rebuild was required.

    Follow-up: confirmed experimental-default evidence

    We inspected the VS Code state database copied before the workaround was applied. In User/globalStorage/state.vscdb, key memento/experiment.service.memento, the cached VSCode.ABExp.FeatureData.configs entry with Id: "vscode" contains:

    {
      "config.chat.agentHost.codexAgent.enabled": true,
      "config.chat.editor.codex.preferAgentHost": true
    }

    The cached assignment context also includes codex-agent-host-stable-editor:31596219. We have not independently mapped that assignment identifier to a rollout definition.

    In the installed 1.141.0 code, both settings have the packaged default product.quality !== "stable" (therefore false for Stable), and both are marked experiment: { mode: "startup" }. The experimental-settings implementation reads config.<setting-name> treatment values and registers differing values as configuration default overrides with source: "experiments".

    The active Planning profile settings captured before the fix contain no explicit chat.editor.codex.preferAgentHost value. Combined with the cache and code above, this establishes that the experiment configuration supplied true defaults without requiring an explicit profile-settings edit. Explicitly setting the preference to false restored the extension sessions as described above.

    Limits: this cache contains no per-setting assignment-arrival timestamp. We have not captured a prior effective false value or the assignment network response, so we cannot establish exactly when the effective default changed or whether installing 1.141.0 triggered eligibility. VS Code's shipped experiment client retrieves assignments online and persists them, so the update and a remote rollout must not be treated as interchangeable causes.

  2. interconnectedMe commented on Oct 8, 2026

    @interconnectedMe
    Author

    Follow-up: Claude history is now accessible again as well, through a separate recovery step from the Codex preference workaround.

    Before this step, the 1.141.0 agent-host log repeatedly reported:

    [Claude] SDK not downloaded yet; deferring chat discovery
    

    We invoked VS Code's built-in workbench.action.chat.agentHost.downloadAgentSdk command with argument "claude" using a temporary keybinding (removed after testing). The download completed successfully for Claude SDK 0.3.281, then the same running agent host logged:

    [AgentService] discovery for provider claude: 26 candidate(s) (26 external), 26 registered, 0 already registered, 0 suppressed as subagent/chat backing, 0 skipped as older than 30 days
    

    The user then opened a recovered Claude conversation in native Chat and compared it with the Claude Code extension sidebar; the same historical messages were visible in both. This verifies discovery and history access, not sending a new message or post-restart persistence. chat.agentSessions.showExternal was set to last30Days in the active profile during this test.

    This establishes an SDK-availability/discovery prerequisite in our case. It does not establish the specific readiness race in #334170: we did not observe the SDK becoming ready spontaneously after startup while discovery failed to retry. The explicit SDK download successfully triggered discovery without a full window reload. No session-store deletion or index rebuild was needed.

    Codex was restored separately using "chat.editor.codex.preferAgentHost": false. Both recoveries were confirmed on VS Code 1.141.0.

  3. interconnectedMe commented on Oct 15, 2026

    @interconnectedMe
    Author

    Follow-up from 2026-10-15 on Ubuntu/Linux x64, now running VS Code 1.142.0 (6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1) with Claude Code extension 2.1.300.

    Today's symptom is that newly created Claude sessions are missing from the native Chat Sessions sidebar. The user reports that, as far as they can tell, all of today's sessions are absent; we did not manually inspect the entire older history.

    Read-only inspection found:

    • At startup, agenthost.log reports discovery for provider claude: 172 candidate(s) (172 external), 0 registered, 172 already registered, 0 suppressed as subagent/chat backing, 0 skipped as older than 30 days.
    • The agent-host SQLite catalog contains 172 Claude sessions, all classified as external.
    • Three top-level Claude transcript files for this workspace, updated after agent-host startup this morning, have session IDs absent from that catalog.
    • The current Planning workspace's native session cache contains 144 agent-host-claude entries, all unarchived. Older sessions have therefore reached the native data model; this is not evidence of complete discovery failure.
    • The active profile explicitly sets chat.agentSessions.showExternal to last30Days, and the host configuration agrees. No saved provider-exclusion filter was found in the inspected state stores.

    Inspection of the shipped agentHostMain.js shows _startClaudeCodeChatDiscovery() memoizing its discovery promise after success, without a periodic scan or filesystem watcher in that path. The native list store's refresh also returns early once its cache is valid. This is consistent with new external Claude sessions remaining undiscovered after startup.

    We have not restarted the local agent host or fully restarted VS Code during this investigation, so recovery by restart has not yet been verified on this installation. The upstream test plan #331122 recommends Developer: Restart Local Agent Host when new external sessions are not discovered.

    This is a follow-up to our earlier recovery: the historical Claude sessions reached the native model, but new sessions are now missing. Today's evidence aligns with #335215 rather than establishing a recurrence of the SDK-readiness race in #334170. No session stores, indexes, settings, or extensions were modified during this investigation.

  4. andmid04 commented on Oct 19, 2026

    @andmid04

    Additional Linux datapoint on VS Code 1.142.0 (6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1, x64) with Codex extension 26.1007.21434.

    A Codex chat created in VS Code on 2026-10-16 and updated through 2026-10-17 disappeared from the native Agent Sessions UI by 2026-10-19. The user did not intentionally archive or delete it.

    Read-only diagnostics:

    • Active settings include chat.agentHost.codexAgent.enabled: true, chat.editor.codex.preferAgentHost: true, and chat.agentSessions.showExternal: "last30Days".
    • The thread remains in ~/.codex/state_5.sqlite with source = vscode, originator = vscode_agent_host, archived = 0, and the expected workspace.
    • The complete rollout JSONL remains under ~/.codex/sessions/2026/10/16/ and contains the full multi-turn conversation.
    • The thread is absent from ~/.codex/session_index.jsonl.
    • No matching row exists in either sessions or sessions_v2 in VS Code User/globalStorage/agent-host.db.
    • Native session enumeration with archived sessions included does not return the thread, and direct lookup by its known session ID also returns no match.
    • Other sessions remain visible, so this is selective loss rather than an empty Sessions view.

    The transcript was recoverable manually and I created a replacement chat seeded from its surviving context, but the original is still not discoverable in the UI.

    This appears consistent with a registration/index synchronization gap: the provider-owned Codex state and transcript survive, while the agent-host catalog/native Sessions view no longer knows about the thread. No private transcript or raw database files are attached. I can provide sanitized schema/row details if useful.

  5. Vokilog commented on Oct 19, 2026

    @Vokilog

    I confirm the issue. After closing VS Code (Version: 1.142.0), chats created through a "Codex session" disappear.

    Interestingly, the chats disappear only in GitHub Copilot. At the same time, they are created and preserved in the ChatGPT application for Windows (native Codex), as well as in the Codex extension for VS Code.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions