From 49bde1c3d89b0865fb4bb9529e531f9442ffbc55 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 25 Oct 2026 02:28:15 -0700 Subject: [PATCH] fix(agent): recognize node-launched Qwen Code on Windows (#33461) Detect Qwen Code on Windows: exact node entrypoint identities for the npm (@qwen-code/qwen-code cli-entry/cli) and standalone (qwen-code/lib) layouts, and comparablePath now collapses . / .. segments so shim paths like .bin\..\ match. Fixes #17326 Supersedes #17382 Co-authored-by: Baojiang Lee <101562714+libaojiang@users.noreply.github.com> --- src/shared/agent-command-line-entrypoint.ts | 16 ++++++++++++- .../agent-node-entrypoint-identities.ts | 8 +++++++ src/shared/agent-process-recognition.test.ts | 23 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/shared/agent-command-line-entrypoint.ts b/src/shared/agent-command-line-entrypoint.ts index fe30447fe0b..6d765811cbc 100644 --- a/src/shared/agent-command-line-entrypoint.ts +++ b/src/shared/agent-command-line-entrypoint.ts @@ -124,9 +124,23 @@ export function findInterpreterEntrypointToken( } export function comparablePath(token: string): string { - return token + const path = token .trim() .replace(/^["']|["']$/g, '') .replace(/\\/g, '/') .toLowerCase() + // Why: npm's local `.bin` shims and Qwen's standalone launcher run `