LangChain Adds Forked Subagents to deepagents
LangChain has introduced context modes to its deepagents framework, allowing subagents to inherit a supervisor's conversation history to reduce redundant tasks and lower API costs.

LangChain has updated its deepagents framework to include context modes, a feature designed to optimize how supervisor agents manage and delegate tasks to subagents. In typical multi-agent architectures, a supervisor agent coordinates a plan and spawns subagents to handle specific tasks. Previously, these subagents always launched with a completely fresh context window. While this isolated approach prevents the supervisor's context from becoming cluttered, it often forces subagents to repeat expensive context-gathering steps, such as reading files that the supervisor has already analyzed.
To address this inefficiency, the latest version of deepagents introduces two distinct context modes: isolated and fork. The isolated mode remains the default behavior, where subagents receive only the specific task description. The new fork mode, activated by setting the mode parameter to fork, propagates the supervisor's entire conversation history and state directly to the subagent. This continuation of the active thread leverages prompt caching, making the process faster and cheaper by eliminating redundant tool calls.
For developers and practitioners, choosing the right context mode depends on the subagent's role. A worker agent tasked with implementing a code fix benefits from the fork mode, as it can pick up right where the supervisor's investigation left off without rediscovering evidence. Conversely, a verifier agent checking code correctness or a researcher investigating a self-contained question should use the isolated mode. This ensures independent evaluation and keeps parallel processes from duplicating the supervisor's history unnecessarily.
The deepagents framework is designed to help developers build and deploy specialized agents. Developers can access these new context modes and begin configuring their multi-agent workflows by installing the package using the command pnpm i deepagents.
This is our own summary of reporting by LangChain Blog


