Back to library
AI
best practice

Parallelize Your Workflow with Background AI Agents

Offload long-running tasks to background agents using /fork.

Use the /fork command to push agentic tasks into the background, freeing up your primary terminal interface for active development.

Qwen

The Scenario

You are working on a large codebase and need the AI to perform a time-consuming task like generating documentation or a large set of tests while you continue to write code.

Before & after

The old way

You would normally have to wait for the LLM to finish its generation or tool-calling sequence before you can type your next command, costing you 1–5 minutes of idle time.

With AI

By running /fork, the task moves to a background agent, allowing you to continue using your main terminal session for other development needs. The task context is managed in the background, taking only seconds to initiate.

The Prompt

/fork [DESCRIBE_BACKGROUND_TASK_E.G._GENERATE_UNIT_TESTS_FOR_ALL_FILES_IN_SRC]

The background agent system allows for parallel processing of tasks, which is essential for maintaining productivity during long-running AI operations.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"Qwen Code v0.18.0-preview launches /fork background agents... visual skill management, user-level cross-project memory."