Find a file
Shaojin Wen 97925919ac
Some checks are pending
verify Maven repo producer / Save verify Maven repo (push) Waiting to run
Qwen Code CI / Classify PR (push) Waiting to run
Qwen Code CI / Test (ubuntu-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Lint & Static (ubuntu-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / web-shell E2E Smoke (ubuntu-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (macos-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (windows-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Integration Tests (no-AK, No Sandbox) (push) Blocked by required conditions
Qwen Code CI / Integration Tests (CLI, No Sandbox) (push) Blocked by required conditions
E2E Tests / Build for E2E (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/1 (push) Blocked by required conditions
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/1 (push) Blocked by required conditions
E2E Tests / E2E Test - macOS - shard 1/2 (push) Blocked by required conditions
E2E Tests / E2E Test - macOS - shard 2/2 (push) Blocked by required conditions
E2E Tests / E2E Interactive - OpenTUI renderer (bun) (push) Blocked by required conditions
E2E Tests / channel-plugin E2E (nightly) (push) Blocked by required conditions
E2E Tests / cron-interactive E2E (nightly) (push) Blocked by required conditions
E2E Tests / web-shell Browser Regression (push) Waiting to run
Managed Agent gate / Select the Managed Agent tier (push) Waiting to run
Managed Agent gate / SDK Java () (push) Blocked by required conditions
Managed Agent gate / Managed Agent gate (push) Blocked by required conditions
SDK Java Contract Open PRs / Re-check open PRs against main (push) Waiting to run
test(managed-agent): add the FG12f MCP stream-gap gates (#14592)
* docs(managed-agent): draft the FG12b and FG12e fault-gate designs

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* docs(managed-agent): correct the FG12b and FG12e designs after audit

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* docs(managed-agent): address the FG12b and FG12e design review

* test(managed-agent): add the FG12b MCP store fault gates

The eight-case ledger and a test-only faulting record store wrapper are in place and compile clean. The class is not yet green on JDK 21 + MariaDB: store-reject-settled, -releasing, -drained, -released and -reload-chain still fail. The shared fork budget re-pin (hostedForkHealthySeconds, CI fork literal, pom and workflow comments) is not done; only the roster entry is updated.

* docs(managed-agent): close the remaining FG12b/e review findings

* test(managed-agent): re-pin the FG12b fork budget

The FG12b store-failure class is green 8/8 on JDK 21 + MariaDB (49.0 s measured). Re-pin hostedForkHealthySeconds to 4858 s, the CI fork to 5468 s, the Verify step to 102 minutes, and the job step sum to 182, with the workflow, pom and meta-test comments updated in the same diff.

* test(managed-agent): harden the FG12b store fault gates

Round 1 audit fixes: the settled cell asserts the dispatch_started record and zero response rows after the failed commit, reopens the stopped authority with the original operation/runtime pins, and reaches that rollback assertion under a skip-rejection mutation (red: expected dispatch_started, was settled). The released cell pins the exact owner-release path and requires two confirmed 200/released releases, with exactly one resend on the next detach. Owner/storage retention now compares the exact runtime-session/generation identity, reload-chain asserts the settled rev 2 and no duplicate chain, and the static gate is cleared in teardown. Local evidence is MariaDB 10.11, not the lane's MySQL 8.4.6. Budget: 120 s allowance for the measured 50.3 s class -> healthy 4878 s, fork 5488 s, Verify 102 minutes.

* docs(managed-agent): design the FG12f stream gap gates

* test(managed-agent): hold the MCP fixture call until the test releases it

* style(managed-agent): format the FG12b design tables

* docs(managed-agent): correct the FG12b budget provenance and release cell

* test(managed-agent): drop the unused FG12c helpers from the FG12b class

* style(managed-agent): realign the FG12b design tables

* test(managed-agent): add the FG12f MCP stream-gap gates

One MCP tool call is parked inside the stdio fixture while a client reads the Session stream, the client is cut mid-call, and the resumed client must continue the same ledger exactly once. The public route resumes with Last-Event-ID and the WebShell route with afterSequence, so a cursor that is ignored replays and reddens the union on a duplicate instead of timing out. The third case replaces the configuration while the call is held and pins that the running Session keeps its revision, its server and one contiguous stream.

* docs(managed-agent): re-pin the FG12f budget to the merged base

The parent branch merged main's event-stream liveness gates, which added 440 s to the shared fork's healthy sum before this class. The measurement is unchanged (104.6 s, 210 s budgeted) but the totals it lands on are now 5803 s healthy, 6403 s fork and a 117-minute Verify step.

* test(managed-agent): drive the real MCP configuration route in the FG12f replacement case

The third case now posts the Harness-private configuration route while the call is held, so the committed configuration generation advances to revision 2 and the released call keeps reading it; the immutable Agent-definition append it used before never reached the replace path. All three cases also pin the fixture's physical effect: one mcp.effect record and one durable proof row, so a resume that re-invokes the tool reddens even when the published completion is unchanged.

* test(managed-agent): pin the FG12f replacement case to the public definition route

The Harness-private configuration route requires the client id the Broker mints for the Harness session, which a Spring-created Session never exposes, so the case answered 404. The case now commits a new MCP server revision through the public definition route while the call is parked and pins that the running Session keeps revision 1, the replacement is stored once, one server start exists, and the fixture's physical append happens exactly once.

* docs(managed-agent): narrow the FG12f replacement case to what it pins

The case commits a new MCP server revision while the call is held; it does not replace the running Session's MCP connection. The Harness-private configuration route cannot carry that here because it requires the client id the Broker mints, which a Spring-created Session never exposes, so it answers hosted_session_not_found. The design now records runtime connection replacement as a gap instead of claiming it.

* test(managed-agent): re-pin the FG12f budget to the merged-base measurement

The three cases measure 121.1 s on the merged base rather than the 104.6 s they measured before it, so the class is budgeted at 2x (242 s): the healthy sum becomes 5985 s, the fork 6585 s and the Verify step stays at 120 minutes.

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: 易良 <1204183885@qq.com>
2026-10-18 18:34:21 +00:00
.github test(managed-agent): add the FG12f MCP stream-gap gates (#14592) 2026-10-18 18:34:21 +00:00
.husky
.qwen refactor(managed-agent): Consolidate server and broker sources (#14277) 2026-10-16 00:28:58 +00:00
.vscode Merge branch 'main' into feat/sandbox-config-improvements 2026-03-06 14:38:39 +08:00
deploy/k2-resident feat(runtime): add resident Workspace file sessions (#14340) 2026-10-16 08:34:38 +00:00
docs test(managed-agent): add the FG12f MCP stream-gap gates (#14592) 2026-10-18 18:34:21 +00:00
docs-site Hide internal docs from docs site (#4357) 2026-06-01 15:55:14 +08:00
eslint-rules ci(lint): stop new cli imports from the core package root (#11798) 2026-09-14 04:49:03 +00:00
integration-tests test(e2e): widen the channel-worker sandbox budgets (#14587) 2026-10-19 01:30:07 +08:00
integrations test: gate the remaining chmod-based root skips on the permission-bit probe (#14403) 2026-10-16 17:34:52 +00:00
packages test(managed-agent): add the FG12f MCP stream-gap gates (#14592) 2026-10-18 18:34:21 +00:00
patches fix(web-shell): polish files and trim preview resources (#14143) 2026-10-16 16:45:56 +08:00
scripts test(managed-agent): add the FG12f MCP stream-gap gates (#14592) 2026-10-18 18:34:21 +00:00
.dockerignore fix(managed-agent): e2e runner and image robustness from the #12692 R2 review (#13344) 2026-10-11 16:42:22 +00:00
.editorconfig
.gitattributes feat(web-shell): Add workspace file browser and previews (#13878) 2026-10-13 09:38:47 +00:00
.gitignore fix(web-shell): polish files and trim preview resources (#14143) 2026-10-16 16:45:56 +08:00
.npmrc
.nvmrc chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00
.pnpmfile.mjs feat(extensions): add test failure report explorer (#13854) 2026-10-11 12:58:55 +00:00
.prettierignore chore(desktop): rename packages/desktop-shell to packages/desktop (#12653) 2026-09-25 05:41:25 +00:00
.prettierrc.json
.yamllint.yml perf(dev): add pnpm worktree bootstrap foundation (#10449) 2026-09-08 03:07:40 +00:00
AGENTS.md refactor(managed-agent): Consolidate server and broker sources (#14277) 2026-10-16 00:28:58 +00:00
CHANGELOG.md chore(release): v0.25.2 (#14321) 2026-10-16 01:12:18 +08:00
CLAUDE.md docs: rewrite CLAUDE.md to point to AGENTS.md as authoritative source (#5138) 2026-06-15 15:23:26 +08:00
CONTRIBUTING.md fix(build): re-apply the ink patch when install skipped lifecycle scripts (#14170) 2026-10-14 10:03:12 +00:00
Dockerfile ci(pnpm): install with pnpm everywhere and retire package-lock.json (#11859) 2026-09-20 02:11:25 +00:00
esbuild.config.js feat(mods): add TypeScript authoring and configuration (PR2a) (#13890) 2026-10-11 12:59:02 +00:00
eslint.config.js refactor(managed-agent): Consolidate server and broker sources (#14277) 2026-10-16 00:28:58 +00:00
eslint.legacy-core-barrel-imports.mjs fix(workflow): show results and failures in /workflows run details (#13646) 2026-10-08 15:36:42 +00:00
eslint.legacy-filenames.mjs fix(cli): recognize markdown fences only on matching lines (#13331) 2026-10-13 09:17:35 +00:00
LICENSE
Makefile
package.json feat(workflow): discover trusted ancestor workflows in local sessions (#14369) 2026-10-18 19:54:22 +08:00
pnpm-lock.yaml fix(web-shell): polish files and trim preview resources (#14143) 2026-10-16 16:45:56 +08:00
pnpm-workspace.yaml feat(web-shell): add read-only Excel artifact previews (#13664) 2026-10-13 02:43:10 +00:00
README.md docs: add qwen-audio-agent voice frontend to Ecosystem (#8630) 2026-10-16 15:26:29 +08:00
SECURITY.md
tsconfig.json
vitest.config.ts feat(qwen-live): standalone voice daemon package — M1 + M2 (#10367) 2026-09-01 06:37:23 +00:00

npm version License Node.js Version Downloads

QwenLM%2Fqwen-code | Trendshift

The open-source AI coding agent for your terminal, editor, desktop, browser, and chat.

中文 | Deutsch | français | 日本語 | Русский | Português (Brasil) | 한국어

Qwen Code in the terminal, desktop app, browser, editor, and chat, with VS Code, Zed, JetBrains, Telegram, DingTalk, WeChat, and Feishu integrations

Why Qwen Code?

  • Agentic out of the box — Auto-Memory, Auto-Skills, SubAgents, Agent Teams, and MCP. Dynamic workflows, zero setup.
  • Open-source, inside and out — The framework and the Qwen models are open-source. They evolve together. No vendor lock-in.
  • Multi-protocol — Supports OpenAI, Anthropic, Gemini, and Qwen APIs. Any third-party provider or local model (Ollama / vLLM). Switch at runtime.
  • Beyond the terminal — IDE plugins, Desktop app, Web UI, SDKs, and chat integrations (Telegram / DingTalk / WeChat / Feishu).

Tip

Qwen Code is actively iterating on itself — using its own agent and models to file issues, submit PRs, review code, and run tests. Powered by the community, driven by AI.

Installation

Linux / macOS:

curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash

Windows:

irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex

Restart your terminal after installation to ensure environment variables take effect.

NPM / Homebrew

NPM (requires Node.js 22+):

npm install -g @qwen-code/qwen-code@latest

Homebrew (macOS / Linux):

brew install qwen-code

Quick Start

Open a terminal in your project and start Qwen Code:

cd /path/to/your-project
qwen

Inside the session, run /auth to configure your provider and API key. Then try:

Explain this repository and show me where to start.

See the Authentication Guide and Settings Reference for detailed setup.

See the terminal interface

Qwen Code terminal interface

How to Use Qwen Code

Choose the interface that fits your workflow:

Interface Get started
Terminal Run qwen in your project — see Quick Start.
Desktop Download Qwen Code Desktop for macOS, Windows, and Linux.
Web Run qwen serve --open to open the Web UI in your browser. (experimental)
Editor Set up VS Code, Zed, or JetBrains.
Chat Connect Telegram, DingTalk, WeChat, or Feishu, then run qwen channel start.

For automation and custom integrations:

  • Headless — Run qwen -p "..." in scripts, CI/CD, or batch jobs.
  • SDKs — Build with TypeScript, Python, or Java.
  • Daemon — Run qwen serve to connect clients over HTTP + SSE (ACP). (experimental) Daemon guide.
SDK example (Python)
import asyncio

from qwen_code_sdk import is_sdk_result_message, query


async def main() -> None:
    result = query(
        "Summarize the repository layout.",
        {
            "cwd": "/path/to/project",
            "path_to_qwen_executable": "qwen",
        },
    )

    async for message in result:
        if is_sdk_result_message(message):
            print(message["result"])


asyncio.run(main())

Capabilities

If you know Claude Code, you already know Qwen Code — and then some. We've put significant effort into bringing Qwen Code to feature parity with Claude Code, improving both breadth and reliability across the board.

Feature Qwen Code Claude Code
SubAgents, Agent Teams, Dynamic Workflows ✓ ✓
Auto-Memory, Auto-Skills, Hooks ✓ ✓
Built-in Skills (/review, /batch, /loop, /bugfix…) ✓ ✓
MCP, Plan Mode, LSP Integration ✓ ✓
Auto Mode, Sandbox, Git Worktrees ✓ ✓
Computer Use (desktop automation) ✓ ✓
IDE Plugins (VS Code / JetBrains / Zed) ✓ ✓
SDK ✓ ✓
Headless Mode, Session Management ✓ ✓
Open-source — model and framework ✓ —
Multi-protocol (OpenAI / Anthropic / Gemini / Qwen + any provider) ✓ —
Agent Arena (multi-model head-to-head on same task) ✓ —
Daemon Mode — qwen serve (multi-client shared agent) ✓ —
IM Channels (Telegram / DingTalk / WeChat / Feishu) ✓ —

Qwen Code Evaluation

On SWE-bench Verified, seven Qwen Code versions scored 76.40%–77.80% on average using the same Qwen 3.7 Max model (500 tasks, three trials per version).

Average SWE-bench Verified scores by Qwen Code version: 0.0.14, 77.80%; 0.1.0, 76.73%; 0.5.0, 76.60%; 0.10.0, 76.47%; 0.15.0, 77.67%; 0.19.0, 76.40%; 0.22.0, 77.33%.

Full results and evaluation configuration →

Ecosystem

  • Qwen Code Desktop — Official desktop app for macOS, Windows, and Linux

  • AionUi — A modern GUI for command-line AI tools including Qwen Code

  • Gemini CLI Desktop — A cross-platform desktop/web/mobile UI for Qwen Code

  • qwen-audio-agent — Realtime full-duplex voice frontend for Qwen Code over ACP — talk hands-free with barge-in and a local wake word

  • 🦞 Qwen Code Claw — Let other agents (Claude, Codex, etc.) delegate coding tasks to Qwen Code via ACP. Paste this prompt into your agent:

Use Qwen Code as a coding agent. First, fetch and read this skill reference:
https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/main/.qwen/skills/qwen-code-claw/SKILL.md
Then follow the instructions inside to install, authenticate, and use Qwen Code via acpx for all coding tasks.
  • Aliyun Model Studio CLI — Official CLI for Aliyun's AI platform (bailian-cli). Extends Qwen Code with image/video generation, knowledge retrieval, app orchestration, and model deployment

Privacy

See the Terms of Service and Privacy Notice, including Chrome extension and Browser Use data handling.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Acknowledgments

This project was originally based on Google Gemini CLI v0.8.2. We gratefully acknowledge the Gemini CLI team's excellent work. Starting from Qwen Code v0.1, we stopped syncing with upstream and began independent development as a multi-protocol, multi-platform agent framework with deep integrations for Qwen models and beyond.