Qwen Code: No auth type is selected
A headless run (`qwen -p`) needs a configured way to authenticate, and none is set. The exact message, why Qwen Code prints it, and the fix.
Updated November 23, 2026 · Checked against Qwen Code 0.24.6, reproduced in EnvHaven 1.9.0
The message
No auth type is selected. Please configure an auth type (e.g. via settings or `--auth-type`) before running in non-interactive mode.
What it means
A headless run (qwen -p) needs a configured way to authenticate, and none is set. Interactive runs ask for one; headless runs cannot.
Fix
- Run
qwenonce interactively and choose an authentication method; it is saved to settings. - Or pass it per run:
qwen --auth-type <type> -p "...", with the matching key set, such asOPENAI_API_KEYand an OpenAI-compatible base URL.
In an EnvHaven workspace
Yes, until Qwen Code is configured once.
Where this comes from
This message was produced by Qwen Code (Qwen Code 0.24.6) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.