Sub-agents forkés (/fork)

A Claude Code capability (the `/subtask` command since version 2.1.212, `/fork` from 2.1.161 to 2.1.211) that spawns a sub-agent sharing the parent session's context cache, instead of starting from an empty context. The child inherits the already-loaded prefix (the code read, the decisions made), works in isolation, then reports back. Like a git branch for your session: you start from a shared state, explore a track on the side, without re-paying the context or polluting the main session. Massively saves input tokens on child agents. The difference with a classic sub-agent lies in what it gets at the start. A classic sub-agent starts from a fresh context, with instructions. A fork receives the whole conversation, the same system prompt, the same tools and the same model as the session that launches it; only its final result comes back into your session, not its tool calls. In an interactive session Claude may launch a fork on its own, that is the default; in non-interactive mode (`claude -p`) and in the Agent SDK, turn the mode on with `CLAUDE_CODE_FORK_SUBAGENT=1` in the `env` block of your settings.json. You can always start one yourself with `/subtask`.

Strengths

Limitations

Best for

Official site

View on Coeurdar