Claude Code forked subagents inherit the parent session context

1 min read
claude-codesubagentscontext-engineeringforked-sessionsagentic-workflowstoken-efficiency
View as Markdown
Originally from vm.tiktok.com
View source

My notes

Watch on TikTok Tap to open video

Summary

Claude Code introduced “forked sub-agents” - sub-agents that inherit the full conversation history of the parent session instead of starting from a fresh context with only a summary. Invoked via /fork after enabling in global settings.json. Best for parallel evaluation tasks (A/B/C/D comparisons) where each sub-agent needs full prior context.

Key Insight

  • Normal sub-agents start fresh: empty context + summary + instructions. Cheap but lossy.
  • Forked sub-agents inherit full parent context: every message, tool call, system prompt already loaded.
  • Counter-intuitive token saving: forking can be cheaper than spawning fresh because sub-agents skip re-reading system prompts and tool definitions already cached in parent.
  • Activation: add config flag to global settings.json, then invoke with /fork.
  • Best use case: parallel evaluation from multiple angles - 4 UI plan variations, PR review from 4 reviewer perspectives, multi-criteria scoring - where each branch needs identical full context to compare apples to apples.
  • Wrong use case: discovery tasks, file searches, simple transforms - fresh sub-agent is leaner.