Qwen Code Weekly: /goal autonomous coding, Auto Approval hands-free, Worktree isolation
One clear signal from the coding-agent space this week: everyone wants the agent to run to completion without babysitting. Claude Code shipped /goal , Codex followed , and OpenAI released Symphony orchestration to keep agents running in the background. “Set a goal → let go → review the result” is becoming the new mainstream interaction pattern.
Qwen Code ships v0.16.0 this week, taking three steps in the same direction:
- Run autonomously—/goal + an independent judge model to determine completion, with automatic abandonment when it detects an impossible goal;
- Fewer interruptions—Auto Approval uses an LLM classifier to assess operation risk; low-risk operations proceed without confirmation prompts;
- Run safely—Worktree isolation reaches Phase C with session persistence + three recovery modes.
✨ New Features
/goal: Set a Target, Let the Agent Run to Completion
Claude Code just shipped /goal, and Qwen Code follows suit—but adds an extra layer: an independent judge model evaluates “is the goal achieved?” after each operation round, rather than letting the execution model judge itself.
Enter /goal "migrate all tests from Jest to Vitest", and the agent starts coding autonomously. After each round of operations, the judge model checks goal status. When completion conditions are met, it stops automatically; if not, it continues to the next round. If the judge determines the goal is impossible in the current context (e.g., missing dependencies, insufficient permissions), it abandons proactively and tells you why—no infinite loops burning tokens.
What you can do with it:
- Large-scale migrations, refactoring, and other multi-step tasks—set the goal and let the agent run without manual confirmation each round
- Judge is independent from the execution model, avoiding “declaring itself done” bias
- Impossible goals are abandoned automatically, no token waste from spinning
- Supports non-interactive mode and streaming event output for CI/CD pipeline integration
Auto Approval: LLM Classifier Auto-Approves Low-Risk Operations
The most annoying thing about using an agent: every file write, every shell command requires you to press Y to confirm. Secure, but the interruption friction is intense—especially when the agent is autonomously running /goal and you’re not even at your desk.
Auto Approval mode uses an LLM classifier to assess each operation’s risk level. Low-risk actions (reading files, running tests, small edits to existing files) are auto-approved; high-risk actions (deleting files, executing unknown scripts, modifying configuration) still prompt for confirmation. Set your policy, and the agent won’t get stuck waiting while running autonomously.
What you can do with it:
- Once enabled, low-risk operations pass automatically—no more pressing Y one by one
- Pair with
/goal—the agent won’t stall waiting for confirmation during long autonomous tasks - Risk classification is adjustable; enterprise scenarios can tighten the policy
See PR #4151

Worktree Isolation: Agent Operates in an Independent Work Tree
Last week we shipped /branch—conversation-level isolation that lets you fork multiple exploration paths within a session without interference. This week we go one layer deeper: file-level isolation.
What do you fear most when an agent modifies code? Breaking the main branch. Especially during complex refactoring—the agent makes a bunch of changes and you realize the direction is wrong, then you have to revert file by file. /branch solves “how to isolate conversation context”; Worktree solves “how to isolate code changes.”
Worktree support lets the agent operate in a Git worktree in isolation. Once inside a worktree, all file modifications and command executions are confined to that independent work tree—the main branch stays untouched. Happy with the result? Merge it. Not happy? Discard it.
This week pushes directly to Phase C: worktree session persistence, automatic hooksPath configuration, bottom status bar showing current worktree info, and a confirmation dialog on exit. /resume offers three recovery modes—restore conversation + code, conversation only, or code only.
What you can do with it:
- Agent makes experimental changes without polluting the main branch
- Pair with
/goal+ Auto Approval—let the agent fully autonomously complete a major goal in an isolated environment - Worktree sessions persist;
/resumeto restore and continue after exiting - Bottom bar shows which worktree you’re in at all times—no confusion
/rewind File Recovery
/rewind could already rewind conversations; now it can also recover files. When you rewind to a certain operation point, file contents are restored to their state at that moment. Three options on rewind: “restore code and conversation,” “conversation only,” or “code only,” with +N -N in M files change statistics to help you decide.
What you can do with it:
- Agent modified 5 files and you realize step 3 went off track—
/rewindback to before step 3, files recover too - No manual
git checkoutfile by file—one command handles everything - More precise than
git stash—restore to the exact state of a specific conversation turn - In IDE mode,
/rewindclearly explains why it’s disabled instead of failing silently

VSCode Extension: Edit Sent Messages
Sent a question with an imprecise description? No need for /rewind + retype. Just edit that sent message directly, and the agent re-runs from the new prompt. No more errors when local snapshots are lost—automatic fallback to server-side recovery.
What you can do with it:
- Realize your prompt wasn’t precise enough—edit that message directly, agent regenerates from the new prompt
- One action to “edit question → regenerate”—no manual
/rewindneeded - Lost local snapshots don’t cause errors—automatic fallback to server recovery
See PR #4147
Hooks Enhancement: Todo Lifecycle + Prompt Hook
The hooks system adds two new event types this week:
TodoCreated / TodoCompleted: Triggered when the agent creates or completes a todo item. You can auto-notify, write logs, or trigger CI when a todo is completed.
Prompt Hook: New type: "prompt" hook type that uses an LLM to evaluate hook input and return a decision. Supports $ARGUMENTS placeholder for context injection, usable with any hook event.
What you can do with it:
- Auto-notify Slack / DingTalk when a todo is completed
- Force re-confirmation before file deletion, log who executed the operation
- Prompt Hook enables enterprise-grade input auditing—non-compliant instructions are blocked before reaching the model
ModelScope Built-in Integration
Chinese developers get another one-click model source. ModelScope is now a built-in third-party API provider—select and configure it directly in /auth.
What you can do with it:
- No manual endpoint configuration—select ModelScope directly from the
/authmenu - Direct connection within China, lower latency
- All compatible models on the ModelScope platform are available
See PR #4150

Status Bar Preset Themes: One-Click Terminal Beautification
Terminal tools don’t have to be black-on-white. Qwen Code includes multiple status line style presets, switchable via an interactive dialog—varying in information density, color schemes, and displayed content.
What you can do with it:
- Interactive dialog to preview and switch between status bar themes
- Adjustable information density: minimal mode shows only model name, detailed mode includes token count and timing
- Selection persists to config—no need to re-set each time
See PR #4120

/stuck + /doctor: Built-in Diagnostic Toolkit
Agent stops responding—is it rate limiting? MCP down? Context overflow? Used memory for a while and unsure what it remembers or if something’s wrong? Before you could only guess. Now two built-in diagnostic commands cover different layers:
/stuck—session-level diagnostics. When the session becomes unresponsive, it auto-detects rate limiting, MCP connectivity, memory pressure, and provides fix suggestions.
/doctor—memory-level diagnostics. Shows memory file count, size, health status; identifies abnormally large memory files for cleanup; troubleshoots inaccurate agent memory.
What you can do with it:
/stuck: One-command troubleshooting when a session freezes—no log diving/doctor: Periodic memory health checks to prevent memory bloat from affecting response quality- Use together—
/stuckfor real-time issues,/doctorfor chronic issues

More New Features
| Feature | PR | Impact |
|---|---|---|
| NotebookEdit tool: Native Jupyter notebook editing support | #3900 | Agent can directly edit .ipynb files—seamless data science workflow |
| per-turn /diff: Interactive diff per turn | #4277 | View changes after each operation, precise to the turn |
| Git status injected into system prompt | #4110 | Agent auto-senses current branch and uncommitted changes for better decisions |
| Ctrl+P/N history navigation: readline-style shortcuts for input history | #4082 | Emacs/zsh habits transfer seamlessly |
| /delete batch deletion: Select multiple sessions for bulk cleanup | #3733 | No more deleting sessions one by one |
| /export custom output directory | #4193 | Export files to wherever you want |
| Qwen3.6-35B-A3B image/video support | #4106 | Local quantized models can handle multimodal input |
| Daemon mode improvements: Permission routing, heartbeat, client auth, debug page | #4232 , #4235 , #4132 | HTTP daemon moving toward production-ready; Web UI / IM bot can connect securely |
| Ctrl+X respects /editor preference | #4310 | External editor opens with your /editor preference |
| Skill priority sorting | #4155 | SKILL.md priority field controls display order |
| Standalone installation | #3828 | No Node.js environment needed—one-click install and run |
| atomicWriteFile: Atomic writes for Write/Edit tools | #4096 | Interrupted writes won’t produce half-written files—safer data |
| /auth unified refactor: Connect a Provider flow | #4287 | Clearer auth config—manage all model providers in one place |
📊 Performance Improvements
| PR | Improvement | Impact |
|---|---|---|
| #4070 | Code-split lowlight, reduced V8 parse overhead at startup | Faster startup |
| #4101 | Strip inline media before compression summary | Higher compression quality—no tokens wasted on image base64 |
| #4086 | Explore sub-agent uses fastModel | Exploratory sub-tasks use smaller model—saves money without quality loss |
| #4186 | Heap memory pressure auto-compression safety net | Extreme long conversations no longer OOM crash |
| #4172 | Auto-memory recall decoupled from main request path | Memory recall no longer slows down first response |
| #4125 | Background task results truncated + newest first | Background task panel cleaner—latest results on top |
| #4153 | Cross-auth fast models extended to sub-agents | Sub-agents can also use fastModel to save money |
🔧 Important Fixes
| PR | Fix | Impact |
|---|---|---|
| #4143 | /language switch takes effect immediately without restart | No restart needed when switching languages |
| #4147 | VSCode thinking state persistence + edit snapshot recovery | Agent thinking process no longer lost in VSCode |
| #4059 | MinTTY Ctrl+Backspace correctly handled as delete-previous-word | Windows MinTTY terminal shortcuts work properly |
| #4130 | VSCode diff reuses existing editor group | Opening diff no longer forces a new column |
| #4166 | Progressive MCP tools refreshed to model systemInstruction | MCP tools discovered in background can be correctly called by model |
| #3980 | IDE context correctly merged into user prompt | Agent can see your open files in IDE mode |
| #4023 | Auto-restore prompt + preserve queue after cancel | Ctrl+C no longer loses already-typed content |
| #4121 | Anthropic tool_result blocks allow cache_control | Claude model prompt cache more stable |
| #4157 | DashScope provider recognition extended with more hostname rules | Enterprise self-hosted DashScope gateways correctly identified |
| #4129 | Traditional Chinese translation corrections follow conventions | zh-TW user interface feels more natural |
| #3896 | OpenAI stream deltas cumulative normalization | More stable streaming output with OpenAI models |
| #4286 | structuredClone replaced with shallow copy to prevent long-session OOM | Long conversations no longer OOM from deep-copy overhead |
| #4294 | Qwen3 reasoning correctly mirrored to outbound history | Full chain-of-thought preserved with Qwen3 models |
| #4243 | Idle microcompaction preserves read-before-write state | Idle compression no longer breaks file edit checks |
| #4213 | Tool name migrations applied at dispatch time | Legacy tool names auto-mapped to new names without errors |
👋 Welcome New Contributors
- @ZevGit — Improved runtime fetch options error handling (#3997 )
- @Col0ring — ModelScope built-in third-party API provider (#4150 )
- @Dinsmoor — Qwen3.6-35B-A3B quantized variant image/video support (#4106 )
- @xmillogx-cmd — Build/test cache limits to prevent OOM (#4188 )
- @shenyankm — Plan Mode configurable output directory (#4062 )
- @jifeng — Daemon /demo debug page (#4132 )
- @Alexxigang — Qwen3 reasoning outbound history mirror fix (#4294 )
- @ideal — Pin fetch to bundled undici compatibility fix (#4238 )
How to upgrade: Run npm i @qwen-code/qwen-code@latest -g to upgrade to the latest version.
For questions or suggestions, feel free to provide feedback on GitHub Issues ! ENDOFFILE; __aone_exit=__aone_exit