Subagent forking
Also known as: agent forking, fork subagent, subagent fork
Subagent forking is a coordination pattern where a running agent creates a copy of itself — a forked subagent — that inherits the full conversation state and cached context at the moment of the fork. The child agent then proceeds independently, taking a separate action path without affecting the parent. It is conceptually similar to a fork() call in Unix systems programming (where a running process creates a copy of itself to handle a task in parallel), applied to AI agent sessions.
Anthropic shipped subagent forking as a default behavior in Claude Code in mid-2026. When a subagent is spawned with the fork type, it inherits the parent's full conversation and prompt cache, which has two practical benefits: the child agent starts with full context rather than a blank state, and the cache hit reduces the token cost of spinning up the child. Non-teammate agent spawns in interactive sessions now run in the background by default, meaning the parent can keep working while children run.
The pattern matters most in workflows where a task branches into several independent subtasks that all need the same background context. Without forking, you either send each child agent a long context string (expensive and slow) or accept that child agents start without context (fragile). Forking solves both problems, but it introduces its own complexity: you need a way to collect and reconcile results from multiple independently running agents, and the parent needs to track which forks completed what.