You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Windows][VS Code] Codex v26.1021.22027 fails to submit the second message with "DisposableStack is not defined" #58817
+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
(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.
Activity
ahmaddev-ai commentedon Nov 4, 2026
I can confirm that the workaround works for me as well.
I experienced the same
DisposableStack is not definederror 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:
Thanks for documenting this issue. Hopefully, it will be fixed in a future release.
Fcw0551 commentedon Nov 20, 2026
+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
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); ...
(
sendQueuedMessageNowhas the same pattern;Ae/weare TypeScript's downlevelusinghelpers.)Meanwhile
package.jsondeclares"engines": { "vscode": "^1.96.2" }, so the extension installs on VS Code versionswhose 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
DisposableStackpolyfill into the extension host works for me (verified on Node v22.22.0, includingadopt/defer and LIFO disposal order).
Suggested fix
Ship a polyfill for
DisposableStack/AsyncDisposableStack/Symbol.dispose(e.g. the es-shimsdisposablestackpackage), 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.