Claude Code revamps /fork for full-context parallel runs
Anthropic's official developer account @ClaudeDevs announced on June 2, 2026 that it had revamped the /fork command in Claude Code, its terminal-based AI coding tool. The new /fork now launches a background agent that inherits the current session's exact context—system prompt, tool definitions, conversation history, model settings, and the prompt cache—and returns the result to the original session once it completes.
The behavior previously handled by /fork—copying the conversation transcript into a new, independent session that the user drives manually—has been moved to a newly introduced /branch command. Users can now choose between a branch they steer themselves (/branch) and parallel execution that quietly works in the background (/fork).
Claude Code is Anthropic's agentic coding tool (CLI) that runs in the terminal, understanding codebases and performing file edits, Git operations, and task execution through natural language. It has long offered session-management commands such as /fork (branching a conversation) and /btw (asking a side question without polluting context). The latest change sits in the lineage of these "context hygiene" tools, but its aim is to improve cost and speed efficiency when running parallel agents. The official documentation also describes the design philosophy behind session resume/fork and checkpointing.
Conventional subagents had to rebuild their context from scratch every time, consuming large amounts of tokens. The new /fork sharply reduces this recomputation by sharing the prompt cache. In one user's measured example, with a shared context of about 48,500 tokens, the old approach required roughly 48,700 tokens per agent, whereas the new /fork lets the second agent onward run on about 5,050 tokens thanks to cache hits. Running five agents in parallel, the total drops from about 243,500 tokens to about 68,900—an estimated 72% reduction.
Availability centers on the CLI in interactive mode, where users type /fork. In SDK or non-interactive environments it can be enabled via the environment variable CLAUDE_CODE_FORK_SUBAGENT=1 (recommended from v2.1.121). It works wherever Claude Code runs, including Mac/Linux and Windows via WSL, and the feature took effect immediately at the time of the post. Compared with other AI coding tools such as Aider and Cursor, its combination of full context inheritance, background execution, and cache sharing is cited as a differentiator.
Reaction on X was favorable, with the post gathering 1,311 likes, 596 bookmarks, and 62 replies at the time of retrieval. "/fork finally sounds like 'go handle that while I keep coding'—that's actually huge," one user wrote, while another said "A background agent with full context is much closer to hiring a teammate than opening a new tab." The shared cache also drew praise: "The shared cache is the real win—full context, no reprocessing cost." Non-coders chimed in too: "Master electrician here... /fork lets a non-coder run parallel work like a small team."
At the same time, there was mild confusion over "how this differs from /btw or subagents," along with requests such as "/fork needs the little return note" for notification when results come back. Some specifics, such as whether it forks the full JSONL, remain unconfirmed, but the overall tone leans toward a long-awaited improvement rather than controversy, and Japanese-language summaries appeared promptly as well.