#13076·qwen-code

bug(cli): Windows flash-exits with no output — launcher never surfaces spawnSync result.error

Author: qwen-code-dev-botCreated Sep 30, 2026Updated Sep 30, 2026
Labelsstatus/need-informationstatus/needs-triagetype/bug

What happened?

On Windows, qwen flash-exits immediately with no output at all — no error line, no banner, just the prompt back. Two people hit it independently in our team group, in both PowerShell and cmd, and it is still present on 0.24.7.

The launcher cannot tell us why, because it never looks at the spawn result's error:

javascript
// scripts/cli-entry.js @ v0.24.7 (interactive path, ~line 453)
const result = spawnSync(process.execPath, ['--expose-gc', cliPath, ...cliArgs], { stdio: 'inherit', env: { ... } });
if (result.signal) {
  process.kill(process.pid, result.signal);
} else if (result.status !== UPDATE_COMPLETE_EXIT_CODE) {
  process.exit(result.status ?? 1);          // ← result.error is never inspected
}

result.error / relaunchResult.error appear zero times in the file, so any spawn-level failure (ENOENT / EACCES / EINVAL, or an inherited-stdio handle problem in a console without a real conhost) collapses into process.exit(1) with no message. That matches the report exactly: instant exit, nothing printed.

This path also became much more exposed recently: since the launcher refactor, POSIX imports cli.js in-process, and Windows (plus Bun) are the only platforms still going through spawnSync — so a launcher-level Windows defect now looks like "qwen won't start" rather than "one code path is broken".

What did you expect to happen?

  1. The launcher should surface the failure before exiting: print result.error.code / errno / syscall, plus the resolved cliPath and process.execPath, and exit with a distinguishable code instead of a bare 1.
  2. process.kill(process.pid, result.signal) should not be used as the Windows exit path — Node's signal support on Windows is an emulation, so mirroring an exit code would be more honest and keeps the console usable.
  3. Once the error is visible, the underlying Windows-specific cause can be tracked separately; right now there is no artifact to report.

Client information

  • OS: Windows (both reporters), shells: Windows PowerShell 5.x, PowerShell 7, and cmd.exe.
  • qwen-code: reproduced across 0.24.4 → 0.24.7 (per the reporters); node --version not collected yet.
  • Install: npm install -g @qwen-code/qwen-code@latest.
  • Isolation test requested from the reporters (result pending, would confirm the launcher is the layer that fails): node --expose-gc "$(npm root -g)\@qwen-code\qwen-code\dist\cli.js"
  • qwen --debug cannot help here: the process dies before the CLI itself runs, so nothing is logged.

Login information

Not relevant — the failure happens before any model request or auth check.

Additional context

  • Searched existing issues for "windows exits immediately", "powershell", "launcher silent exit", "cli-entry spawnSync error": nothing found.
  • 0.24.7 fixed a different Windows cmd.exe problem — the post-update relaunch command line (https://github.com/QwenLM/qwen-code/pull/12694). The main interactive spawn path is unchanged by that fix.
  • Suggested first step is small and self-contained: make the launcher print result.error (and stop self-killing on result.signal on win32). That converts an unreportable flash-exit into a one-line diagnostic, and is worth landing even if the underlying Windows cause turns out to be environmental.
  • Not to be confused with the separate packaging regression where vendor/ripgrep/*/rg ships without the executable bit in 0.24.x tarballs — that one only degrades search to built-in grep and does not exit.