Skip to content

VS Code extension loses thread history after restart on Linux even though auth session is restored #14812

Description

@diogopereira1990

What version of the IDE extension are you using?

26.5311.21342

What subscription do you have?

Github Copilot +

Which IDE are you using?

VS Code

What platform is your computer?

Ubuntu 24.04.4 LTS

What issue are you seeing?

After closing and reopening VS Code on Ubuntu, the Codex VS Code extension appears to lose previous conversations/thread history in the UI.

This initially looks like an authentication/session loss, but the logs suggest auth is actually being restored correctly. The visible failure seems to be in thread/session restore or UI hydration after restart.

Relevant findings:

  • editSessions.log shows the same authentication session being restored successfully
  • rollout/session files still exist under ~/.codex/sessions
  • Codex.log shows thread-state related errors such as:
    • No promise for request ID
    • Received broadcast but no handler is configured method=thread-stream-state-changed
    • Item not found in turn state

I also previously saw:

  • state db backfill not complete at /home/.../.codex (status: pending)

After rebuilding the local Codex SQLite state files, that backfill warning disappeared, but the thread/history restore issue still remains.

What steps can reproduce the bug?

  1. Open VS Code with the Codex extension installed and signed in.
  2. Use Codex normally and create one or more conversations.
  3. Fully exit VS Code.
  4. Reopen VS Code.
  5. Open the Codex sidebar/panel and wait for initialization.

For me, previous conversations are no longer restored in the UI after restart.

What is the expected behavior?

Codex should restore the existing signed-in session and preserve previously visible conversation/thread history after restarting VS Code.

The extension should reopen with prior threads still available instead of appearing as if history or session state was lost.

Additional information

Environment:

  • OS: Ubuntu 24.04.4 LTS
  • Desktop: GNOME
  • VS Code: manual install, not Snap
  • Extension: openai.chatgpt
  • Extension version: 26.5311.21342

Important log evidence:

  • editSessions.log:
    Searching for existing authentication session with ID 2918bc5fd4425f38
    Found existing authentication session with ID 2918bc5fd4425f38
    
    

Codex.log after restart contains:
No promise for request ID
Received broadcast but no handler is configured method=thread-stream-state-changed
Item not found in turn state

Additional possibly related message:

Error fetching errorMessage="local-environments is not supported in the extension"
url=vscode://codex/local-environments

What I already tried:

Restarting VS Code
Waiting after restart
Reinstalling the extension
Reinstalling VS Code
Verifying the Linux keyring/libsecret setup
Backing up and rebuilding ~/.codex/state_5.sqlite* and ~/.codex/logs_1.sqlite*
Result:

auth still restores
session rollout files still exist
backfill warning went away after rebuild
thread/history restore issue still remains

Codex.log
CODEX_VSCODE_AUTH_TROUBLESHOOTING.md
CODEX_VSCODE_BUG_REPORT.md
editSessions.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues 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