qwen
Delegate a coding task to a local CLI agent with its own context, returning final result and session ID for later continuation. Ideal for parallel work or second opinions.
Instructions
Start a NEW task in the local Qwen Code agent — a separate CLI coding agent with its own file/shell tools and its own context window. Blocks until qwen settles, then returns only its final result plus stats, prefixed [session: ]; continue that session later with qwen_reply.
Good for: a second opinion from a different model, work kept out of this context, or parallel investigation.
Caution: with approval_mode 'yolo' (the server default) qwen edits files and runs shell commands as your user inside cwd without asking. For analysis-only work pass an allowed_tools list or approval_mode 'plan'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Usually omit to use this server's cwd. If set, must be an absolute path (relative is rejected). qwen works and edits here, and reads QWEN.md / context files from here. | |
| model | No | Model id, optionally plan-qualified: 'qwen3-coder-plus' or 'qwen3.7-plus@coding' / '@token'. Qualify when the id exists in more than one provider plan (qwen_models marks those) — a bare ambiguous id is rejected. Defaults to qwen's own settings. | |
| effort | No | Reasoning effort tier. Only transport 'stream' can apply it (no CLI flag exists); print mode rejects the call rather than silently ignoring it. | |
| prompt | Yes | The complete task. qwen cannot see this conversation, so include everything it needs: file paths, goal, constraints, expected output format. | |
| transport | No | Usually omit. The default 'stream' keeps qwen up, so a running turn can be steered or aborted with qwen_send. 'print' runs one process per turn that cannot be reached while it works. | |
| timeout_ms | No | Usually omit — the server default is generous. Override only when the task's real size demands it. A run killed at the deadline is not lost: it still returns its session id and is resumable with qwen_reply. | |
| allowed_tools | No | Set a comma-separated allowlist of tool names to auto-approve only those, e.g. 'read_file,glob,grep' for a read-only run. Combined with --exclude semantics of the approval mode; pairs well with approval_mode 'yolo'. | |
| approval_mode | No | How qwen approves tool use: 'plan' (plan only), 'default' (prompt — unusable headless, tools get denied), 'auto-edit' (auto-approve edits), 'auto' (classifier-approved safe actions), 'yolo' (approve everything). Defaults to the server's QWEN_MCP_APPROVAL_MODE (itself defaulting to yolo): delegation is the point of this server. Restrict instead with allowed_tools when it matters. | |
| system_prompt_append | No | Extra text appended to qwen's system prompt for this run. |