Back to library
AI
tutorial

Execute Complex Refactors using Autonomous Goals and Auto-Approval

Set high-level objectives and let AI handle the execution autonomously.

Utilize the /goal command and Auto Approval gates to allow the AI agent to complete complex tasks without constant manual oversight.

Qwen

The Scenario

You have a large refactoring task that requires changing multiple files and verifying them with tests, but you need to focus on a different meeting or task simultaneously.

Before & after

The old way

A developer sits and watches the terminal, manually reviewing and approving every file change and command execution, which can take 15-20 minutes for complex refactors.

With AI

Use the /goal command to let the agent run autonomously. It uses an internal judge model to detect 'impossible' tasks and only interrupts you for critical approvals, finishing in 2-5 minutes.

The Prompt

/goal [DESCRIBE_COMPLEX_CODING_TASK_HERE] --auto-approve-safe-tasks

The /goal feature is designed for autonomous coding, paired with 'Auto Approval' which utilizes an LLM classifier to filter out routine tasks from those requiring human intervention.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"Qwen Code v0.16.0 follows suit—plus an independent judge model and impossible-goal detection."