Skip to content

Messages get stuck in send queue — "undefined" is not valid JSON on queued message lock release #49975

Closed as duplicate

Description

@mmffabiano

What version of the IDE extension are you using?

26.928.31416

What subscription do you have?

ChatGPT (account login, not API key)

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Messages sent in an ongoing conversation stop appearing in the chat (neither my sent message nor the model's reply ever show up), even though the extension log shows the Codex session otherwise running normally. The input box sometimes still shows the already-sent text after the fact, which looks like it never went through.

Extension log (Codex.log) shows this error at the moment it gets stuck:

[warning] Failed to release queued message send lock conversationId= errorMessage=""undefined" is not valid JSON" errorName=SyntaxError
at e.onFetchResponse (app-initial-.js)
at e.deliverMessage (app-initial-
.js)
at e.deliverOrBufferMessage (app-initial-.js)
at e.handleMessage (app-initial-
.js)
at windowMessageListener (app-initial-*.js)

Around the same time, repeated broadcasts are logged with no handler configured:
[warning] [IpcClient] Received broadcast but no handler is configured method=query-cache-invalidate
[warning] [IpcClient] Received broadcast but no handler is configured method=thread-queued-followups-changed

Steps to reproduce:

  1. Start a conversation using gpt-6.1-sol, logged in via ChatGPT account (not API key).
  2. Mid-conversation, change the reasoning effort using the model/effort selector (e.g. low -> medium -> high -> xhigh).
  3. Send a new message. It never appears as sent in the thread and no reply arrives.
  4. Reloading the VS Code window ("Developer: Reload Window") does NOT clear the stuck state — the same conversation/thread stays broken.

Workaround found: starting a brand new conversation works fine; the stuck state appears to be tied to the specific conversation/thread id, not the extension globally.

Separately, around the same timestamps I also see repeated filesystem errors that may be related:
[error] Request failed ... error={"code":-32603,"message":"O sistema não pode encontrar o caminho especificado. (os error 3)"} ... method=fs/getMetadata

CLI version installed separately: codex-cli 0.159.3 (updated via npm install -g @openai/codex).

What steps can reproduce the bug?

  1. Open the Codex panel in VS Code and start a new conversation.
  2. Select the gpt-6.1-sol model, logged in via ChatGPT account (not API key).
  3. Exchange a few normal messages with reasoning effort set to "low" or "medium" — these work fine.
  4. Mid-conversation, change the reasoning effort using the model/effort selector (e.g. low -> high -> xhigh).
  5. Send a new message right after that change.

Expected: the message is sent and a reply is generated, same as before the effort change.

Actual: the message never appears as sent in the thread, no reply arrives, and the extension log records:
"Failed to release queued message send lock ... errorMessage="undefined" is not valid JSON errorName=SyntaxError at e.onFetchResponse (app-initial-*.js)"

  1. Try "Developer: Reload Window" in VS Code — the same conversation/thread is still stuck afterward.
  2. Open a brand new conversation — sending messages works normally again, confirming the stuck state is tied to that specific conversation/thread id.

What is the expected behavior?

Sending a message mid-conversation after changing the reasoning effort should work the same as before the change: the message appears as sent and the model replies, just like it did earlier in the same conversation at a lower effort level.

Additional information

Workaround: starting a brand new conversation resolves it immediately. The stuck state appears to be tied to that specific conversation/thread id, not to the extension globally — other conversations in the same VS Code window keep working fine.

Also noticed around the same timestamps, possibly related: repeated fs/getMetadata errors in the log ("O sistema não pode encontrar o caminho especificado" / os error 3), and "[IpcClient] Received broadcast but no handler is configured" warnings for thread-queued-followups-changed and query-cache-invalidate.

Separately: the Codex CLI itself (not the extension) currently refuses to use gpt-6.1-sol when logged in via ChatGPT account, returning:
{"type":"error","status":400,"error":{"type":"invalid_request_error","message":"The 'gpt-6.1-sol' model is not supported when using Codex with a ChatGPT account."}}
This may be a separate but related issue, since the model itself appears to have mixed support depending on login type.

Environment: Windows 10 (10.0.19045.0, x64), VS Code, extension openai.chatgpt v26.928.31416, Codex CLI v0.159.3 (installed separately via npm).

Activity

  1. added
    extension
    on Oct 1, 2026
  2. added
    bug
    windows-os
    app-server
    on Oct 1, 2026
  3. Sorcery-and-Cybernetics commented on Oct 2, 2026

    @Sorcery-and-Cybernetics

    Still reproducible on VS Code extension 26.928.40906. Exact same "Failed to release queued message send lock" / "undefined" is not valid JSON, followed by fs/getMetadata os error 3 and unhandled thread-queued-followups-changed. VPN, relogging, restarting VS Code and followUpQueueMode=steer do not resolve it.

  4. jp-ariyoshi commented on Oct 2, 2026

    @jp-ariyoshi

    I can reproduce what appears to be the same issue on VS Code Remote WSL.

    Environment:

    • Windows host
    • VS Code Remote WSL
    • Ubuntu 24.04.3 LTS
    • WSL2 kernel: 6.6.87.2-microsoft-standard-WSL2
    • VS Code: 1.140.0
    • VS Code commit: 07f806f999227108933c2e30515b26eecc1fda74
    • openai.chatgpt: 26.928.31416

    Symptoms:

    • Messages intermittently stop sending / disappear.
    • DevTools Console and Network did not show an obvious request failure.
    • Codex.log showed the same queued-message error reported in this issue:

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

    followed by:

    [IpcClient] Received broadcast but no handler is configured
    method=query-cache-invalidate

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

    I also saw repeated filesystem metadata errors:

    Request failed
    method=fs/getMetadata
    error={"code":-32603,"message":"No such file or directory (os error 2)"}

    Workaround

    Downgrading the WSL-side openai.chatgpt extension from:

    26.928.31416
    to:
    26.917.62051

    resolved the issue for me.

    From a terminal in the VS Code Remote WSL window, the downgrade can be done with:

    code --install-extension [email protected] --force
    

    Then verify the installed version with:

    code --list-extensions --show-versions | grep openai.chatgpt
    

    Expected output:
    [email protected]

    After downgrading and reloading VS Code, I tested multiple consecutive messages and the send issue no longer reproduced.

    This suggests a regression in 26.928.31416, at least in VS Code Remote environments such as WSL.

    For comparison, before the downgrade the extension log consistently showed:
    Failed to release queued message send lock
    "undefined" is not valid JSON

    After downgrading to 26.917.62051, the chat became usable again.

  5. YongKim70 commented on Oct 2, 2026

    @YongKim70

    Reproduced similar send/session failures on the 26.928.x extension family.
    We performed an A/B downgrade test using the same machine, account, project and model settings.
    26.928.40906

    • WSL2: message submission became unreliable by the second turn; by the third turn the message disappeared and the conversation stopped responding.
    • Windows native: also experienced session/send failures and helper_unknown_error: setup refresh had errors.
      Downgraded to 26.917.62051
    • WSL2: successfully completed 5 consecutive turns, including filesystem access, Git status, document reading and multi-file source analysis.
    • Windows native: successfully completed the same initial 3-step test without failure.
      Fast mode was OFF and GPT-6.1 Sol Light was used for the controlled tests. Automatic extension updates were disabled during comparison.
      This suggests a possible regression in the 26.928.x extension family rather than a project-specific or Windows-only environment issue.
      Downgrading to 26.917.62051 is currently a working workaround in our environment.
  6. redwheeler3 commented on Oct 2, 2026

    @redwheeler3

    Additional Windows reproduction and extension-version comparison:

    • VS Code 1.140.0, x64; Windows build 10.0.26200.0.
    • Affected extension: openai.chatgpt 26.928.40906, bundled codex-cli 0.159.2. The same warning was also observed with 26.928.31416.
    • Symptoms: messages remain in pending/queued cards after a reply completes; delivered messages sometimes remain in the composer; some numbered test messages do not appear in the visible queue. Missing from the visible queue does not by itself prove message loss.
    • Both Queue and Steer reproduced the symptoms. GPT-6.1 Sol and GPT-6 Sol both reproduced symptoms on the newer extension, so GPT-6.1 is not necessary to trigger the issue.
    • Failure was intermittent, often after roughly 2-5 turns, and reproduced in fresh conversations. Some messages reached the session despite remaining queued in VS Code; other entries remained pending locally.

    Sanitized log messages:

    [warning] Failed to release queued message send lock conversationId=<redacted> errorMessage="\"undefined\" is not valid JSON" errorName=SyntaxError
    [error] Received turn/started for unknown conversation conversationId=<redacted>
    [error] Conversation state not found conversationId=<redacted>
    

    The lock-release warning also appears during successful delivery, so it is correlated with the problem rather than sufficient proof of failed delivery.

    Attempts that did not resolve it:

    1. Reload/restart VS Code and start fresh chats.
    2. Switch from Steer to Queue.
    3. With VS Code closed, back up and clear a confirmed-delivered stale queued entry.
    4. With VS Code closed, back up and reset the extension's persisted openai.chatgpt state record in VS Code global storage.
    5. Uninstall and reinstall extension 26.928.40906.

    Version comparison: downgraded to stable extension 26.917.62051 (bundled codex-cli 0.155.0-alpha.16.3). A fresh GPT-6 Sol chat with Steer then appeared solid in the user's short test. GPT-6.1 was unavailable in that older extension. This is evidence favoring a regression in the newer extension/runtime bundle, not yet an isolated root cause or a sustained reliability result.

    The desktop app did not exhibit these symptoms during the same troubleshooting session. The separately installed npm CLI was updated to 0.160.0, but the extension uses its bundled runtime; this is not presented as a fix.

    No raw session transcripts, repository contents, personal paths, credentials, or screenshots are included in this comment.

  7. MarkmanGilad commented on Oct 2, 2026

    @MarkmanGilad

    Additional reproduction and a concrete response-contract defect in the installed VS Code extension bundles.

    Environment: Windows native, VS Code 1.140.0. We observed the warning in 26.928.40906 and confirmed it persists after the extension actually loaded 26.930.21537. A newly created conversation on 26.930.21537 also reproduced it; this is not limited to an old conversation restored from history.

    Important symptom distinction: a follow-up DID reach the agent and the agent started working on it, while the submitted message remained visible in the pending/queued card. The Steer action was temporarily absent, then appeared later. Previously submitted messages also appeared again as actionable queued cards. We have not established duplicate execution or data loss.

    Delivery correlation: in the fresh conversation, the local rollout records task_started at 06:51:58.040 UTC and user_message at 06:51:58.105 UTC on 2026-10-02; Codex.log records the lock-release warning at 06:51:58.127 UTC for the same conversation (identifiers and message content omitted).

    Bundle inspection identified this deterministic defect:

    1. In out/extension.js, the queued-follow-up-send-lock-release handler calls queuedFollowUpSendLocks.release(...) but returns no value.
    2. The VS Code request transport constructs a successful fetch-response with status 200 and bodyJsonString: JSON.stringify(handlerResult). For this handler, handlerResult is undefined, so bodyJsonString is undefined and is omitted during JSON serialization.
    3. In the webview onFetchResponse success branch, when there is no body field, the client evaluates JSON.parse(response.bodyJsonString). This throws SyntaxError: "undefined" is not valid JSON.

    A small isolated JavaScript reproduction of this exact return/serialize/parse sequence produces the same error without running any third-party extension or accessing a conversation.

    Crucial qualification: the lock-release implementation clears its matching active lock and records sent-message deduplication before this response-parse error. The queued execution code also attempts to remove a successfully sent message BEFORE its finally block awaits lock release. Therefore this confirmed response-contract bug does NOT by itself prove why a delivered message remains/reappears in the queue. Please also investigate queue persistence/broadcast reconciliation across webviews and message admission acknowledgements. Multiple VS Code windows were open in our environment; warnings about unhandled thread-queued-followups-changed broadcasts were present, but their causal role has not been isolated.

    Suggested fix direction: return a JSON acknowledgement from the release handler and/or explicitly support successful no-body responses in the transport. Separately verify that a confirmed-delivered follow-up is removed consistently from all subscribed queue views and cannot be resurrected as a fresh actionable message.

    We inspected the installed EditorLM RTL extension: it changes workbench styling/direction and contains no send-lock/fetch-response handler or queue dispatch interception. The deterministic response-contract defect is in OpenAI's bundle. We did not perform a full live third-party-extension-disabled A/B test, so this is not a claim that every possible interaction has been excluded.

    No extension bundle was modified. No raw conversations, project contents, personal paths, credentials, or screenshots are included here. Downgrade was not tested in this investigation; an update to 26.930.21537 and a fresh conversation did not eliminate the warning or the user's queue-display symptom.

  8. Merlinstail commented on Oct 2, 2026

    @Merlinstail

    Affected version: openai.chatgpt 26.928.31416 (Windows x64)

    Working better after rollback: 26.917.62051

    Symptoms:

    • Prompt is immediately shown as Queued in the VS Code extension.
    • It appears not to be submitted to the normal turn-processing path for roughly 15 minutes.
    • It eventually submits without user action.
    • Restarting VS Code temporarily clears the issue, but it returns during normal use.
    • I use Steer mode, so switching Queue → Steer is not a workaround.
    • Resetting Codex usage/quota made no difference.
    • Rolling back to 26.917.62051 significantly reduced the problem.

    Relevant Codex.log entries:

    [warning] [IpcClient] Received broadcast but no handler is configured method=query-cache-invalidate
    [warning] [IpcClient] Received broadcast but no handler is configured method=thread-queued-followups-changed
    
    [warning] Failed to release queued message send lock
    conversationId=...
    errorMessage="\"undefined\" is not valid JSON"
    errorName=SyntaxError
    errorStack="SyntaxError: \"undefined\" is not valid JSON
        at JSON.parse (<anonymous>)
        at e.onFetchResponse (.../openai.chatgpt-26.928.31416-win32-x64/webview/assets/app-initial-4bd9e54bcd58.js:3:1518)
        ..."
    

    Immediately afterwards:

    [info] Reasoning summary turn-start config resolved ...
    

    followed again by:

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

    Observed behavior across versions:

    26.928.31416 → repeated long pre-submission queue stalls (~15 min)

    26.917.62051 → substantially better; some normal latency/jank remains, but not the same severe queue stalls

    This looks like a regression in the webview/IPC queued-followup/send-lock path, particularly around onFetchResponse() attempting JSON.parse() on an undefined response.

    Possibly related/duplicate: #49988, #50084, #49968.

  9. Koki81 commented on Oct 2, 2026

    @Koki81

    I am experiencing the same send-queue error.

    Environment:

    • VS Code with WSL Ubuntu 24.04
    • Codex extension: 26.930.21537

    Pressing Enter or clicking Send sometimes leaves the message
    in the input instead of sending it immediately.

    My Codex.log repeatedly shows:
    Failed to release queued message send lock
    errorMessage=""undefined" is not valid JSON"
    errorName=SyntaxError

    Around the same time I also see:

    • fs/getMetadata: No such file or directory (os error 2)
    • No handler configured: query-cache-invalidate
    • No handler configured: thread-queued-followups-changed
    • ResizeObserver loop completed with undelivered notifications

    I have not confirmed whether changing reasoning effort triggers it.

  10. MarkmanGilad commented on Oct 2, 2026

    @MarkmanGilad

    Follow-up: the JSON acknowledgement patch removed the lock-release parse warning after reloading, but did NOT resolve the user's pending-queue symptom. We found a separate, reproducible recovery gap in the queue coordinator in 26.930.21537.

    Read-only live-state comparison:

    • VS Code extension global state retained a follow-up with submission.status="pending" and submissionIntent="send-now".
    • Its text matched a delivered user_message in the local rollout. The queue id matched submissionOptions.clientUserMessageId.
    • Another subsequent pending message had no matching delivered user_message in that rollout.
    • queued_items in the app-server queue database was empty at inspection time.

    No message text, database contents, paths or identifiers are disclosed here.

    Installed bundle analysis (webview/assets/app-initial-3a8f7fe2e714.js, coordinator class EAn):

    1. #u attempts acquireSendLock before its existing receipt reconciliation (#c). If acquisition returns null, it returns without reconciling a delivered local entry.
    2. #c explicitly skips pending and queued states, even when wasMessageAccepted would be true.
    3. The execution guard cancellation path (MQ, or automatic Ce) can reset sending to pending. The historical trigger for that path in the live conversation has not been isolated.
    4. The extension's lock implementation remembers successfully sent message IDs for 10 minutes and refuses lock acquisition for them. Therefore acquiring another send lock is the wrong prerequisite for removing an already confirmed-delivered local record. Other contention can also exercise this path.

    Reproduction: we extracted the ACTUAL coordinator class from the installed bundle using the TypeScript AST and evaluated it in an isolated Node VM with synthetic storage/host dependencies. With wasMessageAccepted=true and acquireSendLock returning null, the original coordinator retained a pending message and never consulted wasMessageAccepted. It also retained sending/outcome-unknown entries when blocked at lock acquisition.

    A candidate change in the isolated test copy reconciles a positively confirmed-delivered local entry in the owner before trying to acquire a send lock, using the persisted clientUserMessageId, removes that exact queue id, and wakes the next queue entry. Ten original/candidate probes passed: candidate removal for pending/sending/outcome-unknown confirmed messages; preservation of unconfirmed messages; follower cannot mutate the queue. The installed webview bundle was NOT modified with this candidate and no live end-to-end fix is claimed.

    Please investigate admission cancellation/state reconciliation together, rather than treating the lock-release response fix alone as a complete fix. Positive receipt-based removal must not be based on text matching in production; our text comparison was only read-only diagnostic evidence. The recovery should preserve undelivered messages and avoid resubmitting confirmed-delivered ones.

  11. MarkmanGilad commented on Oct 2, 2026

    @MarkmanGilad

    Update: the user reports that the local workaround now works after BOTH changes below were installed. Investigation, proposed changes and isolated tests were performed with the assistance of GPT-6.1 Sol.

    Affected installed extension: openai.chatgpt 26.930.21537, native Windows / VS Code. The first change alone eliminated the JSON parse warning after reload but did not resolve the queue symptom. After the second change, the user confirmed the solution works in their Thesis workspace. This is a user-confirmed live result in one environment, not a claim of comprehensive platform validation.

    1. Return a JSON acknowledgement from queued-follow-up-send-lock-release (out/extension.js):
    async ({ conversationId, messageId, lockId, sent }) => {
      this.queuedFollowUpSendLocks.release({ conversationId, messageId, lockId, sent });
      return { success: true };
    }

    The original handler returned undefined. The transport serialized that result with JSON.stringify, and the webview attempted JSON.parse(undefined), producing the reported warning. Returning an object fixes that response contract.

    1. Reconcile positively confirmed-delivered local queue entries BEFORE acquiring another send lock (queue coordinator EAn, #u, in webview/assets/app-initial-3a8f7fe2e714.js):

    The following readable equivalent was inserted immediately before the existing guard that invokes tryAcquireStartTurn and acquireSendLock:

    if (
      message?.submission != null &&
      this.options.getStreamRole(conversationId)?.role === 'owner' &&
      this.options.wasMessageAccepted(
        conversationId,
        message.submissionOptions?.clientUserMessageId ?? message.id
      )
    ) {
      const id = message.id;
      await this.updateLocalQueue(
        conversationId,
        messages => messages.filter(item => item.id !== id),
        ownershipGuard
      );
      this.resolveQueuedResult(conversationId, id);
      this.rerun.add(conversationId);
      return;
    }

    Names updateLocalQueue and resolveQueuedResult above are descriptive placeholders for the existing private methods #_ and #d; this is explanatory pseudocode, not an upstream source patch. In the installed minified class, conversationId=e, message=r and ownershipGuard=u. The change uses the existing wasMessageAccepted check and client message identity, not text matching. It preserves entries without a positive receipt, restricts mutation to the owner, and wakes the next queue item after removing the delivered entry.

    Why this is necessary: the existing coordinator attempts lock acquisition before reconciliation and its recovery helper excludes pending states. The extension also refuses another send lock for recently delivered message IDs. A confirmed-delivered local pending entry can therefore remain unreconciled and obstruct subsequent messages.

    Validation:

    • JavaScript syntax checks passed for both modified bundles.
    • The return-handler response contract was tested for sent=true and sent=false, preserving release arguments.
    • The actual queue coordinator was extracted from the original installed bundle with the TypeScript AST and tested in an isolated VM with synthetic dependencies.
    • Ten original/candidate probes passed: pending/sending/outcome-unknown delivered entries recover without acquiring a send lock; unconfirmed entries are preserved; a follower cannot mutate the queue.
    • Installed changes were checked against the original files to ensure only the intended edits were applied.
    • The user then reported that the solution works after installation/reload. A prolonged multi-window/platform soak test has not been performed.

    The exact original event that left the delivered entry pending remains unisolated. These changes fix the concrete response-contract defect and the reproduced recovery gap; they do not establish the initial admission-race root cause. Both patches are local workarounds, may be overwritten by extension updates, and should be translated into an upstream source-level fix with regression coverage.

    No raw conversations, project contents, personal paths, credentials, screenshots or local database records are included.

  12. MarkmanGilad commented on Oct 2, 2026

    @MarkmanGilad

    Copyable local workaround for openai.chatgpt 26.930.21537, Windows x64

    Both edits below were applied together and the user confirmed the solution works. The first edit alone did not resolve the stale queue. Diagnosis and testing were assisted by GPT-6.1 Sol. This is an unofficial local workaround, not an OpenAI release; extension updates can overwrite it. Filenames and minified variable names are version-specific. Do not blindly apply these replacements to another version.

    Locate your VS Code extensions directory (normally %USERPROFILE%\.vscode\extensions) and the folder openai.chatgpt-26.930.21537-win32-x64.

    1. Return a JSON acknowledgement

    File: out/extension.js

    Find this exact text (it must occur exactly once):

    "queued-follow-up-send-lock-release":async({conversationId:e,messageId:r,lockId:n,sent:o})=>{this.queuedFollowUpSendLocks.release({conversationId:e,messageId:r,lockId:n,sent:o})}

    Replace it with:

    "queued-follow-up-send-lock-release":async({conversationId:e,messageId:r,lockId:n,sent:o})=>{this.queuedFollowUpSendLocks.release({conversationId:e,messageId:r,lockId:n,sent:o});return{success:!0}}

    This fixes the undefined return value being serialized as a missing JSON body and then passed to JSON.parse by the webview.

    2. Reconcile confirmed-delivered entries before acquiring another send lock

    File: webview/assets/app-initial-3a8f7fe2e714.js

    Find this exact text (it must occur exactly once; it is in coordinator EAn, method #u):

    if(!d()||r==null||!t.tryAcquireStartTurn(e)

    Replace that fragment with the following text. This INSERTS the recovery block and preserves the original guard at the end; leave the remainder of the original expression untouched:

    if(r?.submission!=null&&this.options.getStreamRole(e)?.role===`owner`&&this.options.wasMessageAccepted(e,r.submissionOptions?.clientUserMessageId??r.id)){let id=r.id;await this.#_(e,e=>e.filter(x=>x.id!==id),u);this.#d(e,id);this.rerun.add(e);return}if(!d()||r==null||!t.tryAcquireStartTurn(e)

    This uses the existing positive message-acceptance predicate and client message ID. It removes only that confirmed-delivered entry, only in the owner, then wakes the next queue entry. It does not remove unconfirmed messages or use text matching. The existing private methods #_ (queue update) and #d (resolve locally accepted queue result) are retained.

    Validation and activation

    If Node.js is available, run from the extension folder:

    node --check out/extension.js
    node --check webview/assets/app-initial-3a8f7fe2e714.js

    Then use Developer: Reload Window in the affected VS Code window. Test a normal prompt and a follow-up during an active run. Check that the agent receives each message, that delivered messages leave the queue, and that undelivered messages remain available. Do not manually resubmit a message the agent has already received.

    If either original fragment is absent, appears more than once, or the syntax checks fail, do not continue with these version-specific instructions. Restore the original extension files/reinstall the matching official extension to undo the local changes.

    Validation in our investigation: syntax checks passed; the JSON response contract passed for sent=true and sent=false; ten isolated probes using the actual extracted coordinator covered original vs repaired pending/sending/outcome-unknown entries, preservation of unconfirmed entries, and no follower mutation. Installed files were compared against the originals to verify only the intended replacements. The user subsequently confirmed live success. We have not performed a prolonged multi-window soak test or verified other platforms/versions; the exact historical admission event that originally left a delivered entry pending remains unisolated.

  13. acanoa commented on Oct 2, 2026

    @acanoa

    Additional reproduction from Windows / VS Code:

    I can confirm the issue is version-specific in the Codex VS Code extension. With the problematic extension version, follow-up prompts intermittently remain pending in the composer and are never processed. In other cases, the prompt is sent twice. Deleting/cancelling a stuck queued prompt can cause the previous prompt to be sent again.

    Observed behavior:

    • First prompt often works.
    • A later follow-up can remain indefinitely with the pending spinner and never reach the agent.
    • Sometimes the same prompt is delivered twice.
    • Cancelling/deleting the stuck prompt can re-send the previous prompt.
    • "Developer: Reload Window" temporarily clears the condition, but it recurs after a short time.
    • Codex CLI works normally on the same machine/account, so the failure appears isolated to the VS Code extension / queued-followup path.
    • Extension Host console showed repeated large-extension-state warnings for extensionId=openai.chatgpt, but no general connectivity failure.
    • Rolling the Codex VS Code extension back to the previous version completely resolves the problem: the same project, account, model and machine then work reliably.

    Environment:

    • Windows x64
    • VS Code
    • ChatGPT account authentication
    • Codex CLI tested separately and working
    • Problem reproduced repeatedly before rollback; stable after rollback

    This strongly suggests a regression in the newer VS Code extension build rather than a project-specific, account, network, or CLI issue.

    I did not record the exact working rollback build number, so I am avoiding guessing it here.

  14. acanoa commented on Oct 2, 2026

    @acanoa

    Follow-up with the exact working rollback version:

    • Extension identifier: openai.chatgpt
    • Working/stable version after rollback: 26.908.40401

    With 26.908.40401 installed, the previously described stuck/duplicated follow-up message behavior is no longer reproducing in the same VS Code environment and project. This makes the regression boundary more concrete: the issue appears in a newer extension build, while 26.908.40401 works reliably on the same Windows machine/account/project.

  15. meghna-dev commented on Oct 2, 2026

    @meghna-dev

    I can reproduce this on VS Code Remote WSL with the current extension build.

    Environment:

    • Windows host
    • VS Code Remote WSL
    • Ubuntu 24.04
    • openai.chatgpt 26.930.21537
    • ChatGPT account authentication

    Observed behavior:

    • Sending follow-up prompts is intermittent.
    • Sometimes a prompt sends immediately.
    • Other times it remains in the queued/pending card, disappears from the composer, or requires multiple attempts before one submission gets through.
    • In one controlled reproduction, attempts 1-3 failed/queued and the 4th attempt submitted successfully.
    • The issue reproduces in fresh chats as well as existing threads.
    • Fully terminating the WSL distro and restarting VS Code/extension host did not resolve it.

    Sanitized log correlation:

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

    For one reproduced send failure, the queued-message lock JSON error appeared at the same time as the failed submission. Repeated /tbo/primary 403s also occur in the background, but I cannot establish that they are the direct trigger.

    I also verified:

    • no duplicate Codex app-server process
    • no obvious WSL CPU/memory/disk pressure
    • Codex SQLite state DBs pass read-only quick_check
    • no evidence of a network timeout/reconnect tied to the failed sends

    This looks consistent with the VS Code queued-followup/send path regression described here rather than a model-response latency problem, because the failure happens before the prompt is actually submitted.

    The most visible symptom is exactly the pending follow-up queue shown in other reports: the composer accepts the message, but the queued item can remain stuck or disappear instead of being promoted into the conversation.

  16. meghna-dev commented on Oct 2, 2026

    @meghna-dev

    Follow-up: I rolled the VS Code extension back from 26.930.21537 to 26.917.62051. After reloading VS Code, the queued/pending send issue is no longer reproducing in my WSL environment so far. Messages are sending normally again. This matches the other reports here that 26.917.62051 avoids the regression seen in the newer extension builds.

  17. robinsonronchi commented on Oct 3, 2026

    @robinsonronchi

    Additional VS Code Remote WSL reproduction, with per-version counts from one machine and two signals I have not seen reported in this thread yet.

    Environment: Windows 10.0.26300 host, VS Code 1.140.0 (commit 07f806f9), Remote WSL 0.104.3, WSL 3.0.1 (kernel 6.18.40.1), Ubuntu, ChatGPT account login. Extension runs on the WSL side; no Windows-side copy installed.

    Per-version counts from Codex.log, same machine, project and account:

    Extension version Period Turns started Failed to release queued message send lock Failed to send queued message
    26.917.62051 Sep 28 – Oct 1 (morning) 35 0 0
    26.928.31416 Oct 1 6 6 0
    26.928.40906 Oct 1 – Oct 2 26 44 29
    26.930.21537 Oct 2 evening 2 2 0 (but see below)
    26.917.62051 (rollback, pinned) Oct 2, after rollback 4 0 0

    After the rollback, thread-queued-followups-changed broadcasts also dropped to zero. The problem has not reproduced since.

    1. Error not mentioned in this thread yet (26.928.40906): all 29 send failures carry this message:

    [warning] Failed to send queued message conversationId=<redacted> errorMessage="Queued follow-up changed before dispatch" errorName=Error
      at e.evaluateImpl (...)
    

    They arrive in bursts, interleaved with the lock-release SyntaxError, and only in two conversations.

    2. Sends from an idle composer are routed through the follow-up queue (26.930.21537). After a turn had completed (task_complete in the rollout), with no active turn, I pressed Enter on the same message 7 times between 22:36:56 and 22:38:27. Each press logged one thread-queued-followups-changed broadcast. Only the last one became a turn (turn-start config resolved at 22:38:27), and the lock-release SyntaxError followed at 22:38:28. followUpQueueMode was set to steer at the time. The setting has no effect here because no turn is running.

    3. Dropped messages are not persisted anywhere. Three follow-ups typed during and just after a turn (22:21:15, 22:21:36, 22:28:36; each matched by a thread-queued-followups-changed broadcast) never appeared:

    • not in queued_items of ~/.codex/queue_1.sqlite (table empty, WAL untouched after 22:26:18);
    • not as a user message in the rollout JSONL;
    • not in state_5.sqlite, thread_history_1.sqlite or logs_2.sqlite (text search).

    They seem to live only in webview memory. No error is logged when they are discarded, and the queued items were not dispatched when the turn completed at 22:26:08.

    Possibly related trigger: the affected conversation had a turn interrupted at 17:52. Each later resume logs thread_history: dropping turn-scoped item for unknown turn id <that turn>. The worst behaviour was in that conversation, though another user here reports fresh chats are affected too.

    Ruled out: the large extension state detected (openai.chatgpt): ~1 MB warnings (up to ~110/min) continue unchanged on 26.917.62051, so the globalState churn is not what causes the queue regression. HTTP 403s on account/subscription/payments endpoints also appear on 26.917.62051, 22–154 per session, while sending works fine. The cloudflare_challenge error code itself only shows up in the newer builds' logs.

    Workaround confirmed: code --install-extension [email protected] --force from the WSL terminal. This marks the extension pinned, which stops auto-update; without the pin it had already auto-updated to 26.930.31428 within minutes. Note that 26.917 declares openai.codex-audio as a hard extensionDependencies entry; 26.930 only lists it in an extensionPack. Users who uninstalled codex-audio will see it reinstalled on rollback.

    I can provide sanitized log excerpts if useful.

  18. IveSan83 commented on Oct 3, 2026

    @IveSan83

    I published a Windows x64 queue repair and reproducible tests for openai.chatgpt 26.930.31428:

    https://github.com/IveSan83/codex-vscode-queue-repair

    Download: https://github.com/IveSan83/codex-vscode-queue-repair/releases/tag/v2.1.0

    It combines a separate atomic revisioned journal, concurrent-writer protection, durable retired IDs, positive receipt reconciliation and void JSON response normalization. Queue and Steer remain available. Validation includes 76 tests in each of Node and VS Code's Electron/Node runtime, 180 two-window stress cycles per runtime, and checks of the completed VSIX's file inventory and actual module imports.

    This is a version-pinned independent repair with headless tests and controlled transport. Live UI/model delivery and separate composer/network/server defects remain outside that verification. Requirements and the sanitized results are included in the release.

    Detailed findings: #49834 (comment)

    Repair author: IveSan83.

  19. aphyllo commented on Oct 3, 2026

    @aphyllo

    I can reproduce the same issue on Windows in VS Code with the Codex extension openai.chatgpt-26.930.31428-win32-x64.

    In one captured occurrence, the previous turn had already emitted task_complete, but the next follow-up remained queued for about 4 minutes 30 seconds. The extension log showed:

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

    It also logged an unhandled thread-queued-followups-changed broadcast. When the queue eventually released, my repeated send attempts appeared as duplicate user messages. Restarting VS Code did not resolve the problem. I initially noticed it after using GPT-6.1 Sol, and it also reproduced in a thread showing GPT-5.6 Sol High, so it does not appear to be limited to one model.

  20. cs19801023 commented on Oct 3, 2026

    @cs19801023

    Source-level corroboration from the installed Linux x64 Codex IDE extension 26.930.31428, plus the previously collected patch/auto-update timeline. Private workspace paths, account identifiers and conversation IDs are omitted.

    Response-format defect

    1. In out/extension.js, the host release route has an async block body and no return:
    "queued-follow-up-send-lock-release": async ({conversationId:e,messageId:r,lockId:n,sent:o}) => {
      this.queuedFollowUpSendLocks.release({conversationId:e,messageId:r,lockId:n,sent:o})
    }
    1. The fetch bridge serializes the awaited result without normalizing undefined:
    let o = await this.extensionFetchHandler.handleVSCodeRequest(/* request */);
    return {
      type: "fetch-response", responseType: "success", requestId: e.requestId,
      status: 200, headers: {}, bodyJsonString: JSON.stringify(o)
    };
    1. In webview/assets/app-initial-a04e43b14c25.js, the 2xx success branch parses the body:
    body: `body` in e ? e.body : JSON.parse(e.bodyJsonString)

    JSON.stringify(undefined) returns undefined, and JSON.parse(undefined) throws the observed SyntaxError: "undefined" is not valid JSON. The host release call has already executed; this is a response/acknowledgment-format defect, not proof that the host-side lock itself remains held. This source chain alone does not establish the sole cause of every UI symptom.

    Historical patch / auto-update timeline

    Times are Asia/Shanghai (UTC+08:00). Counts refer only to Failed to release queued message send lock, not to failed message deliveries.

    Extension-host log/activation Extension state Warning count
    2026-10-02 22:02:40 26.930.21537, unmodified 3
    2026-10-02 23:52:11 26.930.21537, unmodified 3
    2026-10-03 08:23:06 hosts 26.930.21537, unmodified; no queued-send evidence in that window 0
    2026-10-03 08:25:55 host 26.930.21537, loaded before the local patch 2
    2026-10-03 08:37:15 host 26.930.21537, after local patch/reload 0
    2026-10-03 08:38:49 host 26.930.21537, after local patch/reload 0
    2026-10-03 09:06:14 host Still-loaded patched 26.930.21537 0
    2026-10-03 10:28:26 host 26.930.31428, unmodified after auto-update/reload 4 through 10:35:47

    The local change applied around 08:34 was bodyJsonString:JSON.stringify(o) -> bodyJsonString:JSON.stringify(o??null). Auto-update installed 26.930.31428 around 09:06-09:07 and removed the old extension directory, including the local patch and its in-directory backup. Reload at 10:28 loaded the unmodified new version.

    The four warnings in that new-version observation window were at 10:28:37, 10:28:50, 10:33:40 and 10:35:47. The unmodified new out/extension.js had SHA256 7262cf45b87e7c2a7cb631ccb049a1ec2698a41c2f171bb6264c971a76f8d6d2, size 2,532,292 bytes, one unnormalized serializer anchor and no normalized anchor.

    Loaded-patch classification in the historical table is inferred from patch/reload timing, file inspection and log evidence, not a direct inspection of JavaScript module memory. Zero warnings do not by themselves prove full user-visible recovery. A running extension host does not hot-load this disk edit; reload is necessary. This is a local diagnostic workaround, not an official fix, and later extension updates can overwrite it.

  21. IveSan83 commented on Oct 3, 2026

    @IveSan83

    @cs19801023 Hey, I've already published a community repair for these queue failures:

    Source: https://github.com/IveSan83/codex-vscode-queue-repair

    Release / ready installer: https://github.com/IveSan83/codex-vscode-queue-repair/releases/tag/v2.1.0

    It includes the same JSON.stringify(result ?? null) correction you traced. It also addresses the persistence failures reproduced in my tests: queue storage is moved into a separate atomic, revisioned journal, with compare-and-swap checks, durable retirement records, and acceptance-receipt reconciliation to handle lost messages and stale replay. The current regression suite passes 76 tests in Node and the same 76 in VS Code's Electron runtime. The installer pins the local extension to prevent automatic updates from immediately replacing the patch.

    Compatibility: the ready installer currently supports 26.930.31428 on Windows x64 only. Since you're on Linux, the public implementation and regression tests may be useful as a reference, but Linux packaging and validation have not been completed.

    Detailed findings, reproduced scenarios, test results, and limitations: #49834 (comment)

  22. jp-ariyoshi commented on Oct 5, 2026

    @jp-ariyoshi

    26.930.51102I can confirm that installing openai.chatgpt version 26.930.51102 resolved the issue in my environment.

    Previously, with 26.928.31416, the issue occurred in the following environment:

    • Windows host
    • VS Code Remote WSL
    • Ubuntu 24.04.3 LTS
    • WSL2 kernel: 6.6.87.2-microsoft-standard-WSL2
    • VS Code: 1.140.0
    • VS Code commit: 07f806f999227108933c2e30515b26eecc1fda74
    • openai.chatgpt: 26.928.31416

    I installed 26.930.51102 from a WSL terminal with:

    code --install-extension [email protected] --force

    After upgrading, I can now continue the same chat normally beyond the third message. I tested sending multiple messages in the same conversation, and they were all sent successfully.

    So far, I have not been able to reproduce the issue with 26.930.51102 in the same environment.

  23. IveSan83 commented on Oct 6, 2026

    @IveSan83

    Update for Codex VS Code 26.930.61225, Windows x64: community repair 2.4 is published.

    out/extension.js is byte-identical to 51102; all 68 reviewed coordinator members still match after identifier normalization. Controlled original-code tests still reproduce message loss, restored-pending replay, and the undefined-JSON response-contract error.

    The canonical regression suite passed 94/94 in Node and 94/94 in Electron, including negative controls reproducing the original defects. The real CLI 0.160.1 passed 16/16 local protocol checks. The completed package has no missing original files and passed isolated startup checks. These are headless checks, not comprehensive UI certification.

    Download, sanitized evidence and report: https://github.com/IveSan83/codex-vscode-queue-repair/releases/tag/v2.4.0
    Full update: #50980 (comment)

  24. 0xdevalias commented on Oct 17, 2026

    @0xdevalias

    Related current macOS evidence and tested cleanup/ownership/lock findings: #49027 (comment) . This installation did NOT exhibit the JSON parse/release exception in this issue. The shared point is delivered queue entries failing to reconcile; a separate initiating-exception logging gap is #54791. Cross-linking for cleanup and deduplication coverage, not claiming identical initiating errors.

  25. goodman-oai commented on Nov 16, 2026

    @goodman-oai
    Contributor

    Tracking the VS Code send-queue failure in #49834. Submitted text disappears or stays queued, and the extension logs the same undefined response while releasing the send lock. The CLI model rejection mentioned separately is tracked in #49396. Matching extension trace.

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