# /subtask Command

> It hands a task to a helper that reports back here.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /subtask, Forked subagent

## Think of it like

It is like sending a friend to the store. They come back and tell you what they found.

## Definition

/subtask hands a task to a forked subagent. The helper gets the whole conversation so far and works on the task in the background while you keep going. When it is done, its result comes back into this conversation. It is only there when agent view is on. When agent view is off, /fork starts this kind of helper instead.

## Example

Lucy is fixing a form and wants tests for it too. She types /subtask write tests for the form, keeps working, and the tests' summary lands in her chat when they are done.

## Example code

```console
/subtask write tests for the parser
```

Send a helper off to write the tests.

## Why it matters

A side job runs at the same time, and you still get its answer in the chat that needs it.

## Common mistake

Thinking it is the same as /fork. A fork is its own session and never reports back. A subtask's result comes back to you.

## Three principles

- **Whole chat.** The helper knows it.
- **Works alongside you.** In the background.
- **Reports back.** Into this chat.

## Related terms

- [Subagent](https://learn.benibix.com/term/ai/subagent)
- [Agent Tool](https://learn.benibix.com/term/ai/agent-tool)
- [/fork Command](https://learn.benibix.com/term/ai/fork-command)
- [/btw Command](https://learn.benibix.com/term/ai/btw-command)

## Told apart from

- [/fork vs /subtask](https://learn.benibix.com/compare/fork-command-vs-subtask-command): People think /fork and /subtask both send a helper off and wait for its answer, and they do not. /fork copies the chat into a new background session. You keep working, and the copy never reports back. /subtask hands one task to a helper that gets the whole chat. When it is done, its result comes back into the chat you are in.

## Taught in

- [Background Session Commands](https://learn.benibix.com/learn/ai-claude-code-commands/background-session-commands): Claude Code Commands, 7/17

![Four rows. /branch splits the chat and moves you into the copy. /fork sends a copy to the background and you stay. /subtask sends a helper that brings its answer back. /background moves the whole chat to the background.](https://learn.benibix.com/diagrams/cmd-session-moves.svg)

---

Source: https://learn.benibix.com/term/ai/subtask-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
