Skip to content

Launch and detect Qwen Code via its qwen executable - #6530

Merged
nwparker merged 1 commit into
mainfrom
brennanb2025/issue-5350-qwen-cli-name
Jun 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
brennanb2025/issue-5350-qwen-cli-name

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Fixes #5350

Root cause

Qwen Code's installed CLI executable on PATH is qwen, not qwen-code (the latter is only the npm package / repo name, QwenLM/qwen-code). Orca hardcoded qwen-code as the detect command, launch command, and expected process name. As a result:

  • Launching Qwen Code ran a nonexistent qwen-code binary, so the agent never started.
  • Process recognition looked for a foreground process named qwen-code, so a running qwen session was never identified as Qwen Code.

This is the same package-name-vs-executable mismatch already handled for Mistral Vibe (mistral-vibe package, vibe executable).

Change

Point the launch/detect/recognition command at the real qwen executable, while keeping the agent id qwen-code for stable identity (settings keys, telemetry, picker, display name all unchanged):

  • src/shared/tui-agent-config.ts — detectCmd/launchCmd/expectedProcess: qwen-code -> qwen.
  • src/renderer/src/lib/agent-catalog.tsx — catalog cmd: qwen-code -> qwen (id kept).
  • mobile/src/tasks/mobile-tui-agents.ts — MOBILE_TUI_AGENT_LAUNCH_COMMANDS['qwen-code']: qwen-code -> qwen.

Added regression tests asserting Qwen Code launches and is recognized via qwen.

Evidence

Before — new tests fail (reproduces the bug)

 FAIL  src/shared/agent-process-recognition.test.ts > agent process recognition > recognizes Qwen Code by its installed qwen executable
 FAIL  src/shared/tui-agent-startup.test.ts > tui agent startup plans > launches Qwen Code through the installed qwen executable

- Expected
+ Received
  {
    "agent": "qwen-code",
-   "expectedProcess": "qwen",
+   "expectedProcess": "qwen-code",
    "followupPrompt": "fix it",
-   "launchCommand": "qwen",
+   "launchCommand": "qwen-code",
    "launchConfig": {
      "agentArgs": "",
-     "agentCommand": "qwen",
+     "agentCommand": "qwen-code",
      "agentEnv": {},
    },
  }

 Test Files  2 failed (2)
      Tests  2 failed | 42 skipped (44)

(recognizeAgentProcess('/home/dev/.local/bin/qwen') returned null before the fix.)

After — full relevant suites pass

$ npx vitest run --config config/vitest.config.ts \
    src/shared/agent-process-recognition.test.ts \
    src/shared/tui-agent-startup.test.ts \
    src/renderer/src/lib/agent-picker-search.test.ts

 Test Files  3 passed (3)
      Tests  55 passed (55)

Mobile suite (edited file):

$ npx vitest run --config vitest.config.ts src/tasks/   # in mobile/
 Test Files  14 passed (14)
      Tests  67 passed (67)

Lint (oxlint) — clean

$ pnpm lint <changed files>
# oxlint: only one pre-existing unrelated warning in useGitStatusPolling.ts; no errors
# lint:switch-exhaustiveness, localization-catalog, localization-coverage all passed

Typecheck — clean

$ pnpm typecheck
> tsgo --noEmit -p config/tsconfig.node.json && tsgo --noEmit -p config/tsconfig.tc.cli.json && tsgo --noEmit -p config/tsconfig.tc.web.json
# exit 0, no errors

Qwen Code's installed CLI executable is `qwen`, but Orca hardcoded
`qwen-code` as the detect/launch command and expected process name, so
launching Qwen Code and recognizing its running process both failed.

Point detectCmd/launchCmd/expectedProcess (desktop), the agent catalog
launch cmd, and the mobile launch command at `qwen`, keeping the agent
id `qwen-code` for stable identity.

Fixes #5350
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 20541257-dbf2-433b-9d7d-9f77acf4e77e

📥 Commits

Reviewing files that changed from the base of the PR and between e40ad6a and 2e901e6.

📒 Files selected for processing (5)
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/renderer/src/lib/agent-catalog.tsx
  • src/shared/agent-process-recognition.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-startup.test.ts

📝 Walkthrough

Walkthrough

The qwen-code TUI agent configuration is updated across the codebase to use qwen as the executable name instead of qwen-code, reflecting the actual installed binary name. Changes affect TUI_AGENT_CONFIG (detectCmd, launchCmd, expectedProcess), the agent catalog cmd field, and the mobile launch command map. Inline comments are added to document the package-name vs. executable-name discrepancy. New unit tests are added for agent process recognition and Linux startup plan verification.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the fix and evidence, but it does not follow the required template or include several required sections. Reformat the PR description to match the template, adding Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: Qwen Code now launches and is detected through the qwen executable.
Linked Issues check ✅ Passed The code updates Qwen Code to use qwen for launch, detection, and recognition, matching the requirements in #5350.
Out of Scope Changes check ✅ Passed The additional renderer, mobile, and test updates are all directly related to the executable-name fix and regression coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit bed5060 into main Jun 28, 2026
3 checks passed
@nwparker
nwparker deleted the brennanb2025/issue-5350-qwen-cli-name branch June 28, 2026 05:02
@nwparker nwparker mentioned this pull request Jul 4, 2026
1 of 5 tasks
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Qwen Code's CLI name is qwen, not qwen-code

2 participants