Skip to content

[Bug][Windows][VS Code] Codex v26.1021.22027 fails to submit the second message with "DisposableStack is not defined" #58817

Open

Description

@egg-form

Environment

OS: Windows

IDE: VS Code (latest)

Codex Extension: 26.1021.22027

Bug Description

The first message in a new Codex conversation works normally. However, sending the second message in the same conversation consistently fails with:

DisposableStack is not defined

This happens in every new conversation.

Steps to Reproduce

Open Codex in Windows desktop VS Code.

Create a new conversation.

Send the first message and wait for the response.

Send a second message.

The submission fails with DisposableStack is not defined.

Expected Behavior

Users should be able to send multiple messages continuously in the same conversation.

Actual Behavior

The second message cannot be submitted.

Additional Information

Restarting the VS Code Extension Host does not fix the issue.

Downgrading to 26.1007.21434 resolves the issue.

Multiple consecutive messages work normally in the older version.

This appears to be a regression in version 26.1021.22027.

Please investigate and fix this issue. Thank you!

Activity

  1. added
    bugSomething isn't working
    extensionIssues related to the VS Code extension
    windows-osIssues related to Codex on Windows systems
    on Nov 2, 2026
  2. ahmaddev-ai commented on Nov 4, 2026

    @ahmaddev-ai

    I can confirm that the workaround works for me as well.

    I experienced the same DisposableStack is not defined error when submitting the second message in a Codex conversation on Windows with VS Code.

    Downgrading to 26.1007.21434 resolved the issue. I can now send multiple consecutive messages without errors.

    Command used:

    code --install-extension openai.chatgpt@26.1007.21434 --force

    Thanks for documenting this issue. Hopefully, it will be fixed in a future release.

  3. Fcw0551 commented on Nov 20, 2026

    @Fcw0551

    +1 — the same error still reproduces on the latest extension build (26.1117.31558), in a different environment from the
    original report, so this is not Windows-desktop-only.

    Environment

    • Client: VS Code 1.110.1 (stable, commit 61b3d0ab13be7dda2389f1d3e60a119c7f660cc3, built 2026-03-06), Windows 11
    • Workspace: WSL remote window (Ubuntu-20.04)
    • Extension: openai.chatgpt 26.1117.31558 (linux-x64) installed as a remote extension
    • Extension host runtime: Node v22.22.0 (V8 12.4.254.21)
    • Client Chromium: 142.0.7444.265

    Error
    Sending a message in the Codex sidebar fails with:

    ReferenceError: DisposableStack is not defined

    The extension activates and renders the sidebar fine; only sending fails.

    Cause
    Node 22 does not implement DisposableStack (added in Node 24 / V8 13.6):

    $ node -e "console.log(process.version, typeof DisposableStack)"
    v22.22.0 undefined

    The compiled extension-host bundle constructs it without any guard or polyfill:

    $ grep -o 'sendMessage(){[^}]*' out/extension.js
    sendMessage(){return async(t,r,n,o,i)=>{var l=[];try{let s=Ae(l,new DisposableStack); ...

    (sendQueuedMessageNow has the same pattern; Ae/we are TypeScript's downlevel using helpers.)

    Meanwhile package.json declares "engines": { "vscode": "^1.96.2" }, so the extension installs on VS Code versions
    whose extension host cannot execute this code.

    The webview is not the failing runtime: Chromium 142 has supported DisposableStack since Chrome 134. This fails in the
    extension host, which is the VSCode Server's Node in remote (WSL/SSH) setups — so the bug is not specific to the Windows
    desktop host.

    Workaround
    Injecting a DisposableStack polyfill into the extension host works for me (verified on Node v22.22.0, including
    adopt/defer and LIFO disposal order).

    Suggested fix
    Ship a polyfill for DisposableStack/AsyncDisposableStack/Symbol.dispose (e.g. the es-shims disposablestack
    package), or raise the minimum supported VS Code/Node version so the extension is not offered where the API is
    unavailable. Adding a check to the send path would also prevent this from breaking prompt submission entirely.

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

    bugSomething 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