# Qwen CLI Agent

> Run Alibaba Qwen Code CLI headlessly via qwen-exec.sh. Use when the user asks for qwen, Qwen Code, or qwen review / Agent-tool subagents. -r enables sandbox + read-only guard; -T asks for Agent tool / configured subagents. On 429/quota mark BLOCKED — do not retry-loop. Orchestrator owns git (--no-git).

- Skill: `iml1s/qwen-cli-agent` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add iml1s/qwen-cli-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/iml1s/qwen-cli-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ImL1s (https://skillmd.com/u/iml1s)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/iml1s/qwen-cli-agent

---


# Qwen Code CLI (`qwen`) Executor

## When to use

- User wants **qwen** / Qwen Code as the coding agent
- Need Qwen `/agents`, Agent tool parallel launches, or `qwen review` style workflows from a wrapper

## Wrapper

```bash
./qwen-exec.sh -C /path/to/repo -t 1800s "Implement phase A. NO git."
./qwen-exec.sh -r -m qwen3.8-max-preview "Review this diff; do not edit."
./qwen-exec.sh -T -f /tmp/bundle.txt
```

Flags: `-m` (default `qwen3.8-max-preview`) · `-t` · `-C` · `-o` text|json|stream-json · `-f` ·
`-r` (sandbox + read-only guard) · `-T` subagent preamble · `--no-git` · `--` passthrough.

No PTY needed. Text mode extracts final `result` via `lib/parse_stream_json.py`.
`-C` is absolutized before use.

## Native multi-agent

- In-session: `/agents` create/manage; Agent tool for parallel subagents (`.qwen/agents/`)
- Review pipeline: `qwen review …` (PR worktree, chunk plan, multi-agent prompts, submit)
- `-T` asks the model to use Agent tool / configured subagents

## Discipline

Exit code untrusted. Orchestrator owns git. On 429/quota: BLOCKED stub, no retry loop.

## Models

Prefer ids from `~/.qwen/settings.json` / `qwen --help`. Pin explicitly in automation.

