Skip to main content

Qwen Code

Install, authenticate, and resume Alibaba's Qwen Code inside Daintree, including DASHSCOPE_API_KEY, session resume, and how Daintree keeps its output in scrollback.

Reviewed

Qwen Code

Qwen Code is Alibaba's Qwen3-Coder agent, with a 1,000,000-token context window. It runs as a process in its own Daintree terminal panel with full PTY emulation, like every other built-in agent.

Commandqwen
Shortcut— (assignable in Keyboard settings)
RenderingInline — Daintree strips Qwen's alt-screen switch so output stays in scrollback
Resumeqwen --resume <session-id>
Quit command/quit
Permission bypass--yolo
PlatformsmacOS, Windows, Linux

Install & Authenticate

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

Requires Node.js 22 or newer. Run qwen once to start. Authentication reads from ~/.qwen/oauth_creds.json or ~/.qwen/settings.json, or from DASHSCOPE_API_KEY, BAILIAN_CODING_PLAN_API_KEY, or OPENAI_API_KEY. Qwen's model list refreshes at runtime from the shared model catalog rather than a snapshot baked into Daintree.

Note
The Qwen OAuth free tier was discontinued on April 15, 2026. Most people now authenticate with DASHSCOPE_API_KEY. Sign up at dashscope.console.aliyun.com. Access may depend on your region.
Tip
Daintree blocks Qwen's alt-screen switch at the renderer, so its output lands in the normal terminal buffer. Scrollback, search and copy then work the way they do in a plain shell, instead of the screen clearing when the TUI exits.

Resuming Sessions

Qwen prints its resume command on exit and Daintree reads the session ID off that line, then relaunches with qwen --resume <session-id>. Quit with /quit so the line is emitted. There is no resume-latest fallback for Qwen — a missed capture means the next launch starts fresh. See Session Management for how resumable sessions are stored and pruned.

Launch flags, custom presets and display titles are covered in Agent Presets. What the working, waiting and exited badges on a running agent mean is covered in Agent States.

Tip
If qwen isn't detected after install, confirm it's on your PATH (which qwen on macOS/Linux, where qwen on Windows), then restart Daintree.