Skip to content

VS Code: Follow-up stuck in Queue after completed turn, send-lock release fails and previous turn replays #50683

Open

Description

@oleggold84

Summary

The Codex VS Code extension on Windows can leave follow-up messages indefinitely stuck in Queue after the previous response has completed.

I reproduced the problem in a new clean VS Code profile with an empty test workspace, ruling out my normal project, AGENTS.md, accumulated extension state, and other project-specific configuration.

IDE: VS Code
extension version: 26.930.31730

During reproduction, the Codex Output log repeatedly reports:

Failed to release queued message send lock

with:

SyntaxError: "undefined" is not valid JSON

After cancelling a stuck queued message, I also observed an already completed previous user message being processed and answered again, even though I did not resend it.

Environment

  • OS: Windows
  • IDE: VS Code
  • Extension: official OpenAI Codex / openai.chatgpt
  • Extension version: 26.930.31730-win32-x64
  • Authentication: ChatGPT account
  • Reproduced in a newly created clean VS Code profile
  • Reproduced using a new empty workspace/folder
  • IDE Context was also disabled during later testing

Steps to reproduce

The exact turn count does not appear deterministic, but this sequence reproduced the problem:

  1. Create a new clean VS Code profile.
  2. Install only the official Codex extension.
  3. Sign in normally.
  4. Open a new empty folder/workspace.
  5. Start a new Codex conversation.
  6. Send several simple conversational prompts sequentially, waiting for each answer to finish.
  7. Eventually a subsequent follow-up remains stuck in Queue even though no previous task is still running.
  8. Waiting 5+ minutes does not process the queued message.
  9. Cancel the stuck queued message.

In one reproduction, after cancelling the stuck message, Codex unexpectedly processed an already completed previous prompt again and generated a second answer to it without me resending that prompt.

Actual behavior

A follow-up remains indefinitely in Queue.

During the affected conversation, the Output log repeatedly contains:

[IpcClient] Received broadcast but no handler is configured
method=thread-queued-followups-changed

More importantly, it repeatedly contains:

Failed to release queued message send lock
errorMessage="\"undefined\" is not valid JSON"
errorName=SyntaxError

The stack shows the exception occurring while parsing a response with JSON.parse in the Codex extension webview.

There are also repeated fs/getMetadata failures for nonexistent paths/files around the same time. I do not know whether those are causally related.

The extension also repeatedly requests /tbo/primary, which returns HTTP 404. I am including this for completeness but do not know whether it is related.

Replay behavior

After cancelling one indefinitely queued follow-up, a previous prompt that had already been successfully answered was processed again.

Example:

8:16 PM
So what now?
[Codex answers]

...

Queued next message becomes stuck.
I cancel the queued message.

8:28 PM
So what now?
[Codex generates another answer]

I did not resend "So what now?" at 8:28 PM.

This resembles a previous occurrence in my normal development profile where queue/reload recovery caused older turns to reappear or be answered again.

Isolation/testing performed

The problem reproduced despite using:

  • a completely new VS Code profile;
  • a new empty workspace;
  • no application/project code;
  • no AGENTS.md;
  • no Next.js dev server;
  • no large accumulated openai.chatgpt extension-state warning;
  • IDE Context disabled;
  • simple non-coding prompts.

My normal VS Code profile does have large OpenAI global-extension-state warnings, but the queue failure reproduced in the clean profile without those warnings. Therefore the large extension state does not appear necessary to reproduce the queue failure.

Expected behavior

Once the previous turn has completed, a follow-up should either:

  1. be sent immediately, or
  2. if legitimately queued, automatically be processed when the previous turn completes.

Cancelling a queued follow-up should not cause an already completed previous turn to be processed again.

A failure to dispatch a queued message should also surface an error instead of leaving it indefinitely in Queue.

Key diagnostic evidence

The strongest recurring error is:

Failed to release queued message send lock
SyntaxError: "undefined" is not valid JSON

This occurs in the same conversation in which follow-ups become indefinitely stuck in Queue.

The issue appears related to existing issue #50187, but this reproduction additionally includes the queued-message send-lock failure, clean-profile isolation, and previous-turn replay behavior.

Image

existing issue in the report:
https://github.com/openai/codex/issues/50187?utm_source=chatgpt.com

Image

I also have many of these in the process:
2026-10-03 20:49:34.127 [warning] [IpcClient] Received broadcast but no handler is configured method=query-cache-invalidate
2026-10-03 20:49:34.133 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-queued-followups-changed
2026-10-03 20:49:36.707 [error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
2026-10-03 20:49:37.818 [error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
2026-10-03 20:49:37.989 [error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
2026-10-03 20:49:38.663 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-read-state-changed
2026-10-03 20:49:38.712 [error] [desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
2026-10-03 20:49:38.732 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-read-state-changed
2026-10-03 20:49:38.737 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-read-state-changed

Last thing.
I sent "WHAT WHAT?" prompt, and then wanted to delete it from the queue, and now it is still there, with the "delete" icon disabled

Image

Activity

  1. added
    bug
    extension
    windows-os
    app-server
    on Oct 3, 2026
  2. CapLiq commented on Oct 4, 2026

    @CapLiq

    I’m seeing the same problem on Ubuntu Linux inside a Kasm container, using the official Codex VS Code extension openai.chatgpt-26.930.31730-linux-x64.

    I explicitly wait for Codex to finish before sending the next message, but the thread sometimes still gets stuck and an older completed prompt is replayed after restarting VS Code / the Kasm container.

    I checked the logs and local Codex databases. The most relevant log sequence is:

    latestTurnStatus=completed markedStreaming=true

    followed by:

    [IpcClient] Received broadcast but no handler is configured
    method=thread-queued-followups-changed

    and then:

    Failed to release queued message send lock
    errorMessage=""undefined" is not valid JSON"
    errorName=SyntaxError

    I also inspected ~/.codex/thread_history_1.sqlite and found what looks like direct evidence of a replay: the same clientId was used on two different user turns:

    turn_id: 01a105e8-9d30-7611-a8e1-7ab1f0edbb71
    clientId: 140b3b6d-19b1-4ce3-8331-b8372094251e

    and later:

    turn_id: 01a10608-ac7a-72a0-b6fd-ac74a5cda27d
    clientId: 140b3b6d-19b1-4ce3-8331-b8372094251e

    Both are separate accepted turns, and the later one is recorded as status: completed, so this looks like an old client message was actually re-submitted rather than just redisplayed in the UI.

    I also checked ~/.codex/queue_1.sqlite; both queued_items and queued_thread_revisions were empty at inspection time.

    So this looks like a Codex VS Code extension / app-server resume-state bug rather than a stale row in the local queue DB. The combination of completed + markedStreaming=true, failed send-lock release, and reused clientId seems especially relevant.

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-serverbugextensionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions