Back to library
AI
tutorial

Delegate Parallel Development Tasks Using Background Agents

Run secondary coding tasks in the background with parallel agents.

Utilize the /fork command to delegate secondary tasks to background agents, allowing for true parallel collaboration within your development environment.

Qwen

The Scenario

You are working on a core feature but also need to generate unit tests for a different module. You don't want to break your current concentration on the main logic.

Before & after

The old way

Developers often wait for a long-running AI task to complete before they can start the next one, or open multiple terminal tabs manually. (Time cost: 20-30 minutes of idle/context-switching time)

With AI

Use `/fork` to launch background agents that handle side tasks (like documentation or tests) while you continue working in the main terminal. (Time cost: 1 minute to trigger)

The Prompt

/fork [ASSIGN_A_SUBTASK_LIKE_GENERATE_UNIT_TESTS_FOR_CURRENT_FILE]

The /fork background agent feature allows for parallel collaboration, enabling the agent team to work on secondary goals without blocking the user's primary shell.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"Qwen Code v0.18.0-preview launches /fork background agents ... plus Vim mode overhaul."