Skip to content

[Windows][VS Code] Distinct chats in multiple windows trigger hydration resume storm and active-writer conflicts #42589

Open

Description

@RebeccaCode

Codex version

  • VS Code: 1.136.1 (x64)
  • Codex IDE extension: openai.chatgpt 26.825.51511
  • Bundled Codex CLI/app-server: codex-cli 0.151.0-alpha.7.2
  • OS: Windows 11 Home, 10.0.26200 (Build 26200)
  • Runtime: native Windows / PowerShell (not WSL)

Summary

Opening multiple VS Code windows on different workspaces, with a distinct Codex chat in each window, causes the extension to automatically hydrate/resume threads owned by other windows. The background resume enters a rapid follower retry loop and eventually produces thread-store conflict: ... already has an active writer errors.

This makes chats appear stuck, prevents queued follow-ups/steering from being delivered, and leaves the history list stale. The user does not open or resume the same chat in multiple windows.

Steps to reproduce

  1. Open VS Code window A on workspace A.
  2. Open the Codex sidebar and start local chat A.
  3. Leave window A and chat A open.
  4. Open VS Code window B on a different workspace B.
  5. Open the Codex sidebar and create a new local chat B. Do not select or resume chat A.
  6. Continue opening/using distinct chats in the two windows.

This is especially visible with four independent VS Code workspaces open concurrently, each using its own active Codex chat.

Expected behavior

Each VS Code window should operate its distinct active chat independently. Loading the shared history in another window should not acquire a writer for, or continuously resume, a thread owned by another window. History and thread ownership should remain synchronized across extension instances.

Actual behavior

The newly opened extension instance sees existing threads in shared history and attempts to resume them as followers. Threads remain in resuming and repeatedly emit maybe_resume_started. Other windows then fail to hydrate those threads because an active writer already exists. Queued follow-ups can fail instead of reaching the active chat.

In one captured VS Code log session:

  • One thread emitted 6,620 maybe_resume_started events.
  • A second distinct thread emitted 5,952 maybe_resume_started events.
  • 12 already has an active writer conflict messages were recorded.
  • Failures explicitly identified source=thread_hydration.
  • A queued follow-up explicitly failed because the thread already had an active writer.
  • No request-timeout pattern was present; authentication succeeded.

Sanitized representative excerpts:

maybe_resume_started conversationId=<redacted> documentVisibilityState=visible hostId=local previousResumeState=resuming previousStreamRole=follower

failed to initialize thread persistence: thread-store conflict: thread <redacted> already has an active writer

Request failed conversationId=<redacted> error={"code":-32600,"message":"thread <redacted> already has an active writer"} method=thread/resume source=thread_hydration

[queued-followups] Failed to send queued follow-up for conversationId=<redacted> reason="thread <redacted> already has an active writer"

Additional context

Activity

  1. added
    bugSomething isn't working
    extensionIssues related to the VS Code extension
    windows-osIssues related to Codex on Windows systems
    app-serverIssues involving app server protocol or interfaces
    on Sep 3, 2026
  2. jejucoding101 commented on Sep 5, 2026

    @jejucoding101

    Independent reproduction on Windows, with a generated-image preview as the trigger.

    Environment

    • VS Code: 1.136.1 (x64)
    • Codex IDE extension: openai.chatgpt 26.5901.22334
    • Windows: 10.0.19045.7184
    • Three VS Code windows, each opened on a different folder/project
    • Each window was using a different Codex conversation; the affected conversation was not manually opened in either of the other windows

    Trigger and visible result

    1. Complete an image-generation turn in the target conversation.
    2. Click a generated image to open its image/canvas preview.
    3. Return to the Codex conversation.
    4. The task header and composer remain visible, but the complete transcript area is blank.
    5. Leaving and reopening the conversation does not restore the transcript. Sending from the blank view provides no visible confirmation.

    This also overlaps with #38133, but the extension logs expose the multi-window hydration/ownership conflict described in this issue.

    Sanitized diagnostics

    Immediately after the target webview became inactive, the other two VS Code extension hosts received these broadcasts:

    Received broadcast but no handler is configured method=query-cache-invalidate
    Received broadcast but no handler is configured method=thread-queued-followups-changed
    

    Both extension hosts then attempted to resume the target thread even though those windows had different workspaces and distinct active conversations:

    maybe_resume_started conversationId=<target-thread>
      documentVisibilityState=visible
      hostId=local
      previousResumeState=needs_resume
      previousStreamRole=null
      routePath=/index.html
    
    thread_stream_role_changed conversationId=<target-thread>
      previousRole=null role=owner
    
    failed to initialize thread persistence:
      thread-store conflict: thread <target-thread> already has an active writer
    
    Request failed conversationId=<target-thread>
      method=thread/resume
      source=thread_hydration
      message="thread <target-thread> already has an active writer"
    
    Failed to execute queued message conversationId=<target-thread>
    Failed to release queued message send lock conversationId=<target-thread>
    

    One of those windows had previously resumed its own distinct thread successfully, with Git/workspace activity tied to a different project. A few minutes later the same extension host successfully resumed the target thread. This suggests that the selected thread/route or hydration event crossed VS Code window/workspace boundaries; it was not caused by the user opening the same chat twice.

    The local rollout file for the affected conversation remained present, was about 108 MB, and continued updating after the UI became blank. This appears to be a hydration/rendering failure rather than transcript deletion.

    Expected

    • Different VS Code windows and workspaces should keep their distinct active conversations isolated.
    • A background/hidden extension host should not claim owner or resume a thread selected in another window.
    • Opening a generated-image preview should not broadcast or transfer thread ownership.
    • If hydration fails, the UI should show a recoverable error instead of permanently rendering an empty transcript.

    Fully exiting all VS Code processes releases the writer and temporarily restores access when reopening a single window.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app-serverIssues involving app server protocol or interfacesbugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions