Back to library
AI
tutorial

Parallelize Tasks Using Background fork Agents

Launch background agents to handle sub-tasks without interrupting your focus.

Use parallel agents to handle distinct coding tasks in the background, keeping your main terminal session free for active development.

Qwen

The Scenario

You are in the middle of a complex coding session and need the AI to audit a specific module for security vulnerabilities without stopping your current exploration.

Before & after

The old way

You wait for the agent to finish a long-running task, such as refactoring a whole directory, before you can ask it anything else. (Time cost: 5–15 minutes of idle time)

With AI

Use /fork to launch one or more background agents that work on the task while you continue coding in the main prompt. (Time cost: 30 seconds to fork)

The Prompt

/fork [SPECIFIC_SUBTASK_TO_RUN_IN_BACKGROUND]

The v0.18.0-preview update introduces parallel collaboration, allowing you to delegate sub-tasks to background agents without blocking your primary terminal interaction.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"/fork launches background agents... for parallel collaboration."