Organizing Context in a Multi-Agent Harness

LangChain has added context modes to the latest version of deepagents, its framework for building agents, to specify what context a subagent receives from a supervisor agent. The supported values are "isolated" and "fork".
Isolated is the default and pre-existing behavior: subagents spawn with a fresh context window and receive only the task description specified by the supervisor. With "mode": "fork", the supervisor's current state propagates to the subagent instead of starting empty. LangChain describes this as a forked continuation of the current thread, with an added directive written by the supervisor, that is unwound into a single tool result read by the supervisor.
The company describes the mechanics: supervisor agents generate a tool call invoking the subagent with a task description; the subagent receives the entire supervisor agent's state, including conversation history; the trailing tool call is excised and its task description is formatted into a user message alongside a fixed preamble clarifying its role. When the subagent finishes, the supervisor receives its final message as a response to the originating tool call.
LangChain says that although forked subagents are seeded with more context than isolated subagents, prompt caching is respected by design, and that forking can be faster and cheaper than isolated subagents since reusing the supervisor's conversation takes advantage of prompt caching and reduces repeated work.
The post lays out guidance for choosing a mode. Workers that continue work already in progress are cited as fork candidates, such as a fixer subagent implementing and testing a fix after the supervisor has diagnosed an error. Verifiers that evaluate work independently are cited as isolated candidates, such as a reviewer checking a diff for correctness, backwards compatibility, and test coverage, so its judgment is not anchored by the supervisor's diagnosis or expectations.
LangChain also lists specialized subagents: a researcher investigating a self-contained question with isolated mode, and a memory agent retaining information from a conversation with fork mode. Context modes are described as one lever, alongside tools and middleware, for specializing subagents to a task. deepagents is installable via uv add deepagents for Python and pnpm i deepagents for TypeScript.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Learn how context modes in deepagents help subagents fork a supervisor's context or start isolated — for faster, cheaper, more focused multi-agent work.