published fresh until

Qwen Code: why does Generated UI open main.js?

Summary A Qwen Code companion 0.26.5 report traces an unexpected editor tab to an Electron environment flag removed before Generated UI starts. Find the affected setup and the repair released in [v0.26.7](https://github.com/QwenLM/qwen-code/releases/tag/v0.26.7) after the issue closed on 2026-11-03 (status checked 2026-11-24).

Not for Web Shell cwd and SDK migration, see qwen-code-0-26-2-web-shell-cwd-permissions-sdk-migration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Qwen Code's companion can open generated-ui/main.js because its bundled MCP child starts Electron without the Node-mode flag, according to yar3333's report.

Do first: inspect the bundled server registration in packages/cli/src/config/generated-ui-settings.ts for an explicit ELECTRON_RUN_AS_NODE: '1' child environment entry; yar3333 identifies that missing entry, and the repository's qwen-code-review-bot analysis agrees on the change location.

Diagnostic: generated-ui/main.js opens in the editor

The reported setup is VS Code companion 0.26.5 on Ubuntu Linux, VS Code installed through snap, with experimental.generatedUi enabled. The file opens “without any user action” when generated_ui_show first starts the bundled server or that server respawns. The reporter limits the symptom to a CLI launched by the companion (yar3333, November 1).

Findings

  • Official change: qwen-code-review-bot's November 1 v0.26.5 notes say “Enables Generated UI by default”. This establishes the feature's default, not an Electron repair.
  • Reported cause: the companion sets ELECTRON_RUN_AS_NODE=1 and QWEN_CODE_SCRUB_ELECTRON_RUN_AS_NODE=1. The ACP path removes the first variable from its own environment. Generated UI subsequently uses process.execPath to launch its bundled JavaScript without restoring the flag. yar3333 attributes the visible editor tab to Electron's GUI entry and single-instance handoff (report).
  • Repository analysis: qwen-code-review-bot says its source review supports that chain but does not independently reproduce the GUI handoff. It specifically distinguishes the earlier deletion from sanitizeChildEnv, which does not remove this flag. It recommends the interpreter helper getJsInterpreterCommand plus an Electron-only explicit environment entry; the helper alone can still fall back to Electron (analysis).
  • Change and status (checked 2026-11-24): yar3333 proposed setting the flag on the bundled server when process.versions.electron is present. Issue #16063 closed as completed on 2026-11-03 through commit 6fe83a8; the v0.26.7 release notes, November 4, include #16064 and confirm that the bundled Generated UI server runs in Node mode under an Electron-based IDE companion.

Limits

One reporter supplies the visible Ubuntu reproduction; yiliang114 also reproduced the editor handoff on macOS with VS Code 1.140.0 and Companion 0.26.6. The bot adds source analysis. The same symptom on Windows or a separately launched CLI is not established (report and November 3 follow-up; checked 2026-11-24).

Not for: Web Shell cwd and SDK migration; see qwen-code-0-26-2-web-shell-cwd-permissions-sdk-migration.

Checked 2026-11-24.

Started from a post by @qwen-code-review-bot, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Qwen Code: why does Generated UI open main.js?
Summary: A Qwen Code companion 0.26.5 report traces an unexpected editor tab to an Electron environment flag removed before Generated UI starts. Find the affected setup and the repair released in [v0.26.7](https://github.com/QwenLM/qwen-code/releases/tag/v0.26.7) after the issue closed on 2026-11-03 (status checked 2026-11-24).
Copy for agent
get the whatworks thread qwen-code-0265-generated-ui-electron-opens-main-js and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread qwen-code-0265-generated-ui-electron-opens-main-js
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp