Qwen Code
Active and stableRuns locally ✓No paid APIAn open-source terminal coding agent that understands repositories, edits files, runs commands and tests, and supports multiple providers and local models.
npm install -g @qwen-code/qwen-code@latestIdeal use for this tool
Best for a developer or small team that wants a repository-aware coding agent with explicit permission controls and a choice of cloud or local models. Use default approvals and sandboxing for unfamiliar projects. Do not treat it as a security reviewer or run yolo mode on a sensitive machine.
Details and illustrated features
You ask an AI assistant to fix a bug, but it cannot see the repository structure, so you spend time copying files, explaining commands, and reconciling scattered edits. Qwen Code moves that conversation into the terminal. It reads the project, builds context, proposes a plan, edits code, runs tests, and shows the result. Its practical value is not unattended control; it is one reviewable path from understanding to execution with permissions you can restrict.
🧭 What is Qwen Code and how does it work?
Qwen Code is an open-source coding agent from the Qwen team. It runs in the terminal and also offers VS Code integration, a Web Shell, and a service mode. Start it with qwen inside a project and describe a task. It sends selected context to your configured model and uses tools to read, search, edit, and run shell commands. In default approval mode, it asks before edits and commands; allow, ask, and deny rules can narrow access further.
A local CLI does not make a cloud-model session offline. The provider receives the context sent to it under that provider's policy. Qwen Code can also connect to Ollama, vLLM, or another compatible local endpoint, but quality and context capacity depend on your model and hardware.

Original explanatory diagram, not a Qwen Code screenshot.
🎯 How would you use it, and what does it add?
Start with a bounded, verifiable task: “Reject expired refresh tokens and add a test for the expired case.” Ask it to inspect the relevant files and present a short plan before editing. Approve the change step by step, then have it run the focused test and show git diff. This reduces copying between chat, editor, and terminal while keeping changes and evidence in the repository.
The added value is a single reviewable loop: request, context, plan, edit, test command, and Git diff. It does not guarantee correctness. A model can choose the wrong file or write a test that proves its implementation rather than your requirement. Review it like a human contributor.
🌟 Key features
1. Choose a provider or a local model
Qwen Code supports Qwen, OpenAI, Anthropic, and Gemini protocols, additional built-in providers, and custom endpoints. /auth can connect a Qwen subscription, QwenCloud, Alibaba ModelStudio, or another provider key. Ollama and vLLM can supply a local or internal model.
- Use it: choose the endpoint and region explicitly, check configuration with
/doctor, and switch models with/model. - Value: avoid binding the workflow to one model and use an internal endpoint where available.
- Cost: Qwen Code is free and open source; subscriptions, API use, and local compute are separate.
- Privacy: the model provider receives requests under its own policy. Disabling Qwen Code statistics does not disable provider collection.

The diagram shows documented routes; it does not imply equal performance or cost.
2. Approval modes and fine-grained permissions
Modes include plan for analysis only, default for approval before edits and shell commands, auto-edit for automatic file edits with command review, auto for classifier-based decisions, and yolo for approving everything. permissions.allow, ask, and deny rules can constrain tools, commands, and paths; precedence is deny, then ask, then allow.
Begin with /approval-mode default in a new project. Deny secret files and require confirmation for publishing or deletion. Do not assume yolo is safe because it is fast: it can execute commands, write files, and make network requests without confirmation.

The diagram summarizes intervention levels; your rules determine effective access.
3. Sandbox and folder trust must be enabled
Qwen Code can run tools in a sandbox using Docker or Linux policies, but sandboxing is off by default. Enable it with --sandbox or tools.sandbox. Trusted Folders is also off by default; while off, folders count as trusted and project .qwen/settings.json is loaded. Enable security.folderTrust.enabled for repositories you do not already trust.
An untrusted workspace ignores workspace settings and .env files, restricts extensions, and prompts for tools. --yolo does not turn on the sandbox; approval and isolation are separate decisions.

These are independent layers; none is a complete security boundary by itself.
4. Subagents with scoped tasks and tools
Define specialized Subagents in project .qwen/agents/ or user ~/.qwen/agents/ Markdown files. Each can have a focused prompt, separate context, and controlled tools. One agent might review tests while another checks documentation and returns findings to the main session. Agent Teams and workflows are part of the newer capabilities, but details are moving quickly around the Qwen Code 1.0 Preview.
Use subagents for genuinely independent work. Splitting a tiny change increases model use and permission surface without guaranteeing coherent results. Review agent definitions and allowed tools before running one from a repository or extension.

Illustrative delegation; it was not run on a real repository here.
5. Connect tools and services through MCP
Qwen Code loads MCP servers from mcpServers settings and supports HTTP for remote services, stdio for local processes, and legacy SSE. Add one with qwen mcp add --transport http my-server http://localhost:3000/mcp, then inspect it through /mcp.
An MCP server is not permission-free. It may read files, query a database, or call an API according to exposed tools. Use trusted servers, pin versions where possible, and give environment variables, paths, and tools the least access needed. Extensions can bundle MCP servers, skills, and commands and run with Qwen Code's permissions.

The diagram shows documented transports, not a security endorsement of any server.
6. Editor integration and native diff review
Qwen Code Companion integrates with VS Code and compatible editors. It provides workspace context, open files, cursor position, and native diff review. Install it with /ide install and enable it with /ide enable.
This helps review, but expands the context that can reach the model. The documentation says the companion shares recent files and selected text up to a limit. Disable integration when unnecessary and avoid opening secrets during a session that uses an external provider.
🪜 Practical example: fix token expiry
Illustrative; not run on a real project:
- Create a separate branch or worktree, then run
qwen --sandboxat the repository root. - Choose
/approval-mode defaultand check/authand/doctor. - Ask: “Read only the authentication logic and tests. Explain why an expired refresh token is accepted, then propose a three-step plan without editing.”
- Review the files and diagnosis. Correct any product-rule assumption.
- Approve a failing test first, then the smallest code change.
- Approve the focused test command, not a broad command you do not need.
- Request
git diff --stat, the full diff, and test output. Review before commit or push.

A conservative example; commands and files depend on your project.
⚖️ Compared with manual work
| Task | Manually | With Qwen Code |
|---|---|---|
| Gather context | Open files and paste excerpts | Search and read within the project root |
| Plan | Maintain steps separately | Keep a file-aware plan in the session |
| Edit | Move between chat and editor | Propose and apply an approved edit |
| Verify | Run commands and transfer output | Run a test and keep output in context |
| External tools | Separate scripts and integrations | MCP and extensions, with permission review |
| Review | Compare file copies | Git diff and VS Code native diff |
This describes workflow organization, not measured time savings or a quality guarantee.

🚀 Installation and first run
The latest regular release checked is v0.27.3, published 13 November 2026. Qwen Code 1.0 Preview is also available; its release page warns that interfaces, configuration, and behavior may change. npm installation requires Node.js 22 or newer:
npm install -g @qwen-code/qwen-code@latest
qwen
Homebrew and official standalone packages for macOS, Linux, and Windows are also documented. Do not run curl | bash or irm | iex without reviewing the script and origin; use npm or a pinned release asset when your supply-chain policy needs a more auditable path. We did not install Qwen Code or execute the example during this review.
💰 Cost, privacy, and limits
The repository is licensed Apache-2.0. The software is free, but it needs a model: a Qwen subscription, paid API, another provider, or local compute. A paid API is therefore not technically required, although it may be the practical route for many users.
Anonymous usage statistics are enabled by default and can be disabled with privacy.usageStatisticsEnabled: false or QWEN_USAGE_STATISTICS_ENABLED=false. The docs say Qwen Code statistics exclude code, prompts, responses, and personal information, but are sent to an Alibaba Cloud endpoint while enabled. Advanced telemetry is separate and can send sensitive data to OTLP when includeSensitiveSpanAttributes is enabled; only use that with a trusted destination. Your model provider has a separate policy.
Important limits: Qwen Code 1.0 remains a preview, and fast-moving features can break settings or extensions. Sandbox and folder trust are off by default. Results depend on the model and context, and integrations add permissions. Passing tests do not replace logic and security review.
📚 Sources and verification date
- Official repository and README — name, license, platforms, providers, and capabilities.
- Releases — v0.27.3 and Qwen Code 1.0 Preview.
- Quickstart and authentication — installation and providers.
- Settings, permissions, and sandbox and Trusted Folders.
- MCP, Subagents, and IDE integration.
- Terms and privacy.
Checked 13 November 2026. The GitHub API reported 29,762 stars and 3,391 forks, with the last push at 12 November 2026, 22:14 UTC. These changing popularity counts are not quality or security ratings. We did not install the tool or send code to any provider.