Research Brief — Agent Loops, Search & Planning: SOTA (2025–2026)
Working research note — source-verified but not part of the reviewed reference site; citations resolve within this document's own Sources section.
Prepared: 2026-07-09. Audience: agentic-systems knowledge base; interview prep (JD:
multi-agent workflows, search & planning algorithms, self-reflection loops, tool-calling,
stateful multi-turn agentic frameworks, model training). Sources cited in-text by id; full
list (URLs verified 2026-07-09) in the Sources section in references.yaml format. Companion
briefs: retrieval-rag-sota.md, memory-sota.md, orchestration-algorithms-sota.md.
1. Executive summary
Between 2022 and 2026 the field ran a full arc: prompt-level loops (ReAct) → self-reflection (Reflexion) → explicit tree search over reasoning and actions (ToT, LATS, best-first web search) → search internalized into the model via RL (o1, DeepSeek-R1, SWE-RL) → and, in production, a counter-swing back to simple single-threaded loops wrapped in serious engineering (Claude Code, SWE-agent, LangGraph-style durable state machines). The current SOTA picture:
- The loop won; the scaffold shrank. Production coding/computer-use agents are a plain while-loop — model → tool call → observation → repeat — with the sophistication moved into tools, context management, and checkpointing, not into orchestration graphs [anthropic-effective-agents] [claude-code-agent-loop] [cognition-no-multi-agents].
- Search over trajectories works but is priced in tokens. Best-of-N + verifier, beam over steps with process reward models (PRMs), and MCTS-style agent search (LATS, tree search for web agents) all deliver large gains on benchmarks — compute-optimally, small models + search can beat 14× larger models [snell-tts] — but environment rollbacks, irreversible actions, and cost keep tree search out of most production loops [lats-paper] [koh-tree-search].
- RL moved the search inside. DeepSeek-R1 showed outcome-reward RL (GRPO) alone induces long-CoT self-verification and backtracking ("aha moments"); agentic RL (SWE-RL, Search-R1, multi-turn RL pipelines) now trains the loop itself — when to call tools, how to recover from errors [deepseek-r1] [swe-rl-paper] [agentic-rl-survey].
- Self-correction is real only with external signals. Intrinsic self-correction (no feedback) degrades reasoning performance [huang-self-correct]; models exhibit a measurable self-correction blind spot for their own errors [self-correction-bench]. What works: reflect on verifiable feedback — tests, execution traces, verifiers, users [reflexion-paper] [self-correction-survey].
- Statefulness is the differentiator in 2025–26. Durable execution (checkpoint every superstep, resume/fork), human-in-the-loop interrupts, memory files + git as cross-context persistence, and reliability metrics (τ-bench's pass^k) define what "production agent" means now [langgraph-durable-execution] [anthropic-harness] [tau-bench-paper].
Interview through-line: know the algorithms (UCT, PRM-guided beam, pass^k), know the evidence (what self-reflection buys and when it doesn't), and know why frontier practice converged on simple loops + strong models + context engineering.
2. The loop lineage (know each rung and what it added)
- ReAct (Oct 2022) [react-paper]: interleave
Thought → Action → Observation; reasoning steers tool use, observations ground reasoning. Beat act-only and CoT-only baselines on HotpotQA/ALFWorld; established the trajectory format every agent framework still uses (contemporary variants like Self-Ask structure multi-hop QA as explicit sub-questions answered by a search tool). - Reflexion (Mar 2023) [reflexion-paper]: three cooperating models — Actor, Evaluator, Self-Reflection — plus an episodic memory of verbal reflections. After a failed trial, the reflection model converts sparse feedback (test failure, env reward) into a linguistic lesson stored in memory and prepended to the next attempt: "verbal RL," updating context instead of weights. 91% pass@1 on HumanEval (GPT-4 + tests) vs 80% without. Crucial detail: gains come from external evaluator signals (unit tests, env success), not pure introspection.
- Plan-and-execute (2023) [plan-and-solve]: separate planner (decompose task into steps) from executor; reduces drift on long tasks and lets the plan be inspected/edited — ancestor of today's TODO-list-driven coding agents. LLMCompiler (ICML 2024) [llmcompiler] made the plan a DAG of tool calls with data dependencies, executed in parallel with a joiner that can replan — ~3.7× latency and cost wins over sequential ReAct for multi-tool tasks; the idea survives as "parallel tool calls" in every modern API.
- Tree of Thoughts (May 2023) [tot-paper]: reasoning as search over a tree of partial "thoughts"; a propose-prompt expands states, a value-prompt scores them, BFS/DFS with beam width b explores. Game of 24: 4% (CoT) → 74% (ToT, GPT-4). Limitation: search over thoughts only — no environment interaction.
- LATS (ICML 2024) [lats-paper]: full MCTS over environment actions, unifying
ReAct + ToT + Reflexion. Per iteration:
- Selection: descend by UCT —
a* = argmax_a [ V(s_a) + w·√(ln N(s_parent) / N(s_a)) ]; - Expansion: sample n (typically 5) candidate actions from the LM, execute each in the env to create child states;
- Evaluation: value = λ·(LM self-scoring of the state) + (1−λ)·(self-consistency vote);
- Simulation: roll out to a terminal state;
- Backpropagation: update V, N along the path (running average of returns);
- Reflection: on failure, generate a verbal reflection stored in memory and provided as in-context signal for subsequent trials. ~2× ReAct on HotPotQA; 92.7 pass@1 HumanEval (GPT-4). Cost: dozens of env rollouts per decision — needs a resettable environment.
- Selection: descend by UCT —
- Best-first tree search for real agents (Jul 2024) [koh-tree-search]: search directly in live web environments (VisualWebArena/WebArena) with a multimodal LM value function — marginalize scores over several sampled reasoning chains about screenshots — +39.7% relative over a GPT-4o ReAct baseline. Honest caveats that made it influential: destructive/irreversible actions break backtracking, and search multiplies cost ~5–10×.
- Test-time compute scaling (Aug 2024) [snell-tts]: the unifying economics. Compute-optimal strategy depends on difficulty: easy → sequential revisions; medium → best-of-N / beam with a verifier; hard → deeper search; adaptively chosen, 4× less compute for equal accuracy, and FLOPs-matched small-model+search can beat a 14× larger model. o1 (Dec 2024) [o1-system-card] and DeepSeek-R1 (Jan 2025) [deepseek-r1] then internalized the search: RL on outcome rewards teaches one long chain-of-thought that proposes, verifies, backtracks — replacing external tree scaffolds for reasoning-shaped problems, while agentic tasks still use the outer tool loop.
3. Search over agent trajectories
3.1 The method menu
- Best-of-N (parallel): sample N full trajectories/answers, pick by verifier score or
majority vote (self-consistency [self-consistency]:
answer = argmax_a Σ_i 1[a_i = a]). Unbiased, embarrassingly parallel; ceiling set by the verifier ("verifier saturation" as N grows). - Beam search over steps: keep top-b partial trajectories by a step-level value (PRM score); best at low-to-mid budgets, but over-optimizing the PRM degrades at high budgets (reward hacking of the value model) [snell-tts].
- Tree search (MCTS/best-first): adds exploration bonuses and backtracking; the right tool when actions are cheap to simulate and reversible (games, sandboxed browsing, code with tests) [lats-paper] [koh-tree-search].
- Sequential revisions: generate → critique → regenerate; only pays off when the critic has real signal (see §4).
3.2 Verifiers and process reward models as value functions
- ORM vs PRM: outcome reward models score the final answer; process reward models score every step. Let's Verify Step by Step (OpenAI, 2023) [lets-verify]: PRM trained on 800K human step labels (PRM800K) solves 78.2% of MATH-500 as a best-of-1860 selector, clearly beating ORM — process supervision gives better credit assignment and more aligned-looking chains.
- Generative PRMs (2025): ThinkPRM [thinkprm] fine-tunes a long-CoT reasoner to verbally verify each step (chain-of-thought verification), using ~1K process labels — ~100× less supervision than discriminative PRMs — and wins on ProcessBench/MATH-500 under best-of-N and reward-guided beam search. Trend: verifiers are becoming reasoners, and the verify/generate boundary is dissolving.
- As agent value functions: LATS uses the LM itself as a value prompt; Koh et al. use a multimodal LM value function over screenshots [koh-tree-search]; PRM-guided step beam is the standard math/code recipe [snell-tts]. Known failure modes: value model OOD drift, reward hacking under heavy search, and cost (a verifier call per node).
- Agent-specific constraints: real environments are stochastic and partially irreversible (sent emails, DB writes). Practical mitigations: sandbox + snapshot/restore (git commits, VM/container checkpoints), constrain search to read-only phases (plan/explore with search, act linearly), or move search to training time (RL) instead of inference time.
3.3 Reliability as the metric: pass^k
τ-bench introduced pass^k — the probability that an agent succeeds on the same task in
all k i.i.d. trials; with c successes out of n trials, estimate pass^k = E_task[ C(c,k) / C(n,k) ] [tau-bench-paper]. It is the mirror image of pass@k and the right target for
production agents: top models that score ~50% pass@1 on retail tasks fall below ~25% at
pass^8. τ²-bench (Jun 2025) extends to dual-control settings where user and agent both
act on the environment — testing coordination, not just tool skill [tau2-bench-paper].
4. Self-reflection & self-correction: evidence, not vibes
What the critical literature actually supports:
- Intrinsic self-correction fails. Huang et al. (ICLR 2024) [huang-self-correct]: asking a model to review and revise its own reasoning without any external signal makes benchmark performance go down, not up — earlier "self-correction wins" often used oracle ground-truth to decide when to stop.
- The blind spot is measurable. Self-Correction Bench (Jul 2025) [self-correction-bench]: models systematically fix errors injected from external sources while missing identical errors in their own outputs (~64.5% blind-spot rate across 14 models); appending a simple correction marker ("Wait,") halves the gap — evidence the failure is behavioral (trained distribution) rather than capability.
- When it can work — TACL critical survey [self-correction-survey]: self-correction helps when (a) reliable external feedback exists (unit tests, compilers, tool errors, retrieved documents, users), (b) the task is verification-asymmetric (checking easier than generating), or (c) feedback is genuinely new information. Frameworks: Self-Refine [self-refine] (same-model feedback loop; helps on style/optimization tasks, not on hard reasoning) vs Reflexion [reflexion-paper] (external evaluator → verbal memory; robust gains).
- Design rules for loops (what to say in an interview): 1) reflect on signals, not on vibes — wire tests/verifiers/execution into the loop; 2) prefer sample-and-rank (self-consistency, BoN+verifier) over sequential self-revision for reasoning; 3) separate generator and critic contexts (fresh-context review reduces self-anchoring); 4) budget reflection — one good verifier check beats three rounds of introspection.
5. Stateful multi-turn agents: how real systems structure the loop
5.1 The single-loop production pattern
Anthropic's canonical guidance [anthropic-effective-agents]: distinguish workflows
(predefined LLM+tool pipelines — routing, prompt-chaining, parallelization,
orchestrator-workers, evaluator-optimizer) from agents (model-directed loops); start
with workflows, escalate to agents only when the task is open-ended; keep the loop simple,
transparent, with well-documented tools (ACI). Claude Code embodies it
[claude-code-agent-loop]: a single-threaded master loop
(while (response has tool calls): execute → append results → re-invoke), one flat message
history, tool permission gating, compaction when context fills, TODO lists as the
externalized plan, and sub-agents as the only branching mechanism (single-level: sub-agents
cannot spawn sub-agents; they return a summary into the main thread — context isolation
without coordination chaos; updated: nesting is now supported, see §10.5).
SWE-agent's ACI result [swe-agent-paper] is the methodological point behind all of this: holding the model constant and redesigning the agent-computer interface (a 100-line file viewer, concise search results, an edit command with integrated lint feedback) moved SWE-bench performance dramatically — interfaces, not prompts, are often the highest-leverage component. Terminal-Bench extends the evaluation of such terminal-native agents [terminal-bench].
5.2 State machines, checkpointing, human-in-the-loop
LangGraph is the reference open-source design [langgraph-durable-execution]: agents as
StateGraphs (nodes = LLM/tool steps; edges = routing; state = typed channels). A
checkpointer persists state after every superstep to a store (Postgres/SQLite/DynamoDB),
keyed by thread id, enabling: (a) crash recovery and durable execution (sync/async/exit
durability modes); (b) human-in-the-loop interrupts — interrupt() pauses the graph,
a human approves/edits state, execution resumes from the checkpoint; (c) time travel —
replay or fork from any prior checkpoint (checkpoint trees are trajectory trees — the same
data structure tree search needs). Caveat worth knowing: checkpointing a graph is not full
durable execution — side effects inside a node are not transactional; idempotent tools and
effect logs matter.
5.3 Long-horizon statefulness (multi-context-window agents)
Anthropic's two 2025 engineering posts define current practice:
- Context engineering [anthropic-context-engineering]: treat attention as a budget; system prompts at the "right altitude"; compaction (summarize old turns), structured note-taking (external memory files the agent maintains), just-in-time retrieval (agent fetches what it needs instead of pre-stuffed context), and sub-agent context isolation for read-heavy exploration.
- Long-running harnesses (Nov 2025) [anthropic-harness]: an initializer agent sets up
the environment (init script, feature list with pass/fail states, initial commit) and a
coding agent runs in fresh context windows, each session: read
claude-progress.txt+ git log → pick one feature → implement → test end-to-end (browser automation) → commit + update progress file. Git history + progress files are the cross-context memory; verification is behavioral, not code review.
For agent memory as an architectural topic: MemGPT (virtual-memory-style paging between in-context and external storage; self-editing memory via tools) [memgpt-paper] and CoALA (the cognitive-architecture framing: working vs episodic vs semantic vs procedural memory, decision cycle) [coala-paper] are the two citable frames.
5.4 Multi-agent: when it helps, when it hurts
The two poles, both from June 2025: Anthropic's research system [anthropic-multi-agent-research] — orchestrator (Opus 4) spawns parallel search sub-agents (Sonnet 4), 90.2% better than single-agent on breadth-first research queries, at ~15× token cost; works because research is read-only, parallelizable, and compressible. Cognition's "Don't Build Multi-Agents" [cognition-no-multi-agents] — parallel sub-agents on write tasks make conflicting implicit decisions; principles: share full traces, never fragment decision-making; prefer a single-threaded agent + context compression. Synthesis (now conventional wisdom): parallelize reads, serialize writes; OpenAI's agents guide takes the same "manager with tools, escalate to multi-agent only on proven need" line [openai-agents-guide].
6. Agent training touchpoints (brief, JD-relevant)
- Tool-use fine-tuning lineage: Toolformer [toolformer] — self-supervised: the model labels its own pretraining text with API calls that reduce perplexity, then fine-tunes on them (Gorilla added retriever-aware fine-tuning on API docs to cut call hallucination). ToolLLM [toolllm] — 16K+ real APIs, instruction data generated with DFSDT (depth-first search decision tree) multi-path exploration instead of greedy chains. CodeAct [codeact] — unify actions as executable Python instead of JSON tool calls (composition, loops, error handling in one action); up to ~20% higher success and the direct ancestor of code-execution-first agents and "programmatic tool calling."
- RLVR → agentic RL: DeepSeek-R1's recipe (GRPO — group-relative advantage
A_i = (r_i − mean(r_group))/std(r_group), no critic; rule-based rewards) proved outcome-verified RL scales [deepseek-r1]. SWE-RL (Meta, Feb 2025) [swe-rl-paper] applied it to software engineering at data scale: rewards computed from GitHub PR history —r = difflib similarity(predicted patch, oracle patch)(−1 for malformed output) — on Llama-3.3-70B → 41.0% SWE-bench Verified and, notably, improved general reasoning (math, MMLU) — evidence that verifiable agentic domains train transferable reasoning. - Multi-turn agentic RL is the hard frontier: long-horizon credit assignment, stale rollouts, and environment infrastructure dominate. Nebius' pipeline (Aug 2025) [multi-turn-swe-rl] — rejection fine-tuning then DAPO-style RL on multi-turn SWE-agent trajectories (context to 131K tokens) doubles baseline to 39% SWE-bench Verified. The agentic RL survey (Sep 2025) [agentic-rl-survey] is the map: POMDP formulation, capability axes (planning, tool use, memory, reflection), environments, and open problems (reward hacking, sim-to-real for agents).
- Where training meets inference-time search: PRMs/verifiers double as RL reward models and BoN selectors [lets-verify] [thinkprm]; search-generated trajectories (MCTS) can be distilled into policy improvements — the AlphaZero-style loop, applied with LLMs as proposal + value networks.
7. Evaluation landscape for agents (fast reference)
- SWE-bench / SWE-bench Verified [swe-bench-paper] [swe-bench-verified]: real GitHub issues; Verified = 500 human-validated tasks (OpenAI, Aug 2024) fixing broken/underspecified cases. Frontier models ~70–80%+ pass@1 by late 2025 — near saturation, pushing evals toward harder multi-repo and long-horizon variants.
- τ-bench / τ²-bench [tau-bench-paper] [tau2-bench-paper]: tool-agent-user interaction with policy compliance; pass^k reliability (see §3.3).
- WebArena / VisualWebArena: realistic self-hosted web tasks; the substrate for the tree-search agent results above [koh-tree-search]. GAIA: general assistant questions, human-easy/AI-hard, tool use + multi-step reasoning.
- Terminal-Bench [terminal-bench]: end-to-end terminal tasks — 2025–26's coding-agent proving ground.
- Meta-lesson from all of them: report pass@1 and reliability (pass^k), control for contamination (Verified-style human audits), and evaluate the agent system (harness + model), because harness changes swing results as much as model changes [swe-agent-paper].
8. What a master of agentic systems must also know (2025–26 notes)
- "The model is the agent" bitter lesson: each capability jump (Claude 3.5→4.x, o1→o3, R1) deleted scaffold code; design harnesses to ride model improvements (simple loops, swappable tools), not to compensate for weaknesses that will vanish [anthropic-effective-agents] [cognition-no-multi-agents].
- Tools are a designed surface, not an API dump: consolidated, workflow-shaped tools with token-efficient outputs, written and iterated by agents against evals [anthropic-writing-tools]; ACI design is measurable [swe-agent-paper].
- Plans as artifacts: TODO/plan files that the agent updates (Claude Code, harness feature lists) are the production descendant of plan-and-execute — inspectable, resumable, and a hook for human oversight [claude-code-agent-loop] [anthropic-harness].
- Search where it's safe, lines where it's not: tree search for read-only exploration and verifiable domains; linear loop + verify-then-act for side-effectful work [koh-tree-search].
- Interview-ready contrasts: ReAct vs Reflexion (memory), ToT vs LATS (env feedback), BoN vs beam vs MCTS (budget/verifier tradeoffs [snell-tts]), ORM vs PRM (credit assignment), pass@k vs pass^k (capability vs reliability), workflows vs agents, read-parallel vs write-serial multi-agent.
9. What to add to the knowledge base
Proposed pages (concept pages + references.yaml ids, matching site conventions):
search-and-planning.html— "Search & Planning for Agents": the lineage diagram (ReAct → Reflexion → plan-and-execute → ToT → LATS → internalized RL); UCT/MCTS box with the LATS expansion walkthrough; BoN/beam/tree decision table by budget & reversibility; test-time-compute scaling results; PRMs as value functions.self-reflection.html— "Self-Reflection Loops: Evidence": Reflexion architecture; the Huang/TACL/blind-spot counter-evidence; the four design rules; a "signals your loop can trust" checklist (tests, compilers, verifiers, users, retrieval).stateful-agents.html— "Stateful Multi-Turn Agents": state-machine model, checkpointing & durable execution, HITL interrupt/resume, time-travel forking; Claude Code / SWE-agent ACI case studies; long-horizon harness pattern (initializer + progress files + git).agent-training.html— "Training Touchpoints": tool-use SFT lineage, RLVR → GRPO → SWE-RL/Search-R1, multi-turn RL infrastructure challenges; PRM dual-use (training reward / inference verifier).- Update evals page: add pass^k, τ²-bench dual control, Terminal-Bench, and the harness-vs-model attribution caveat; cross-link from orchestration-topologies page to the read-parallel/write-serial synthesis.
10. Clean-context multi-agent loops (spawning instead of growing)
§5 treated the loop as one growing transcript managed with compaction and checkpoints, and §5.4 named the multi-agent poles. This section covers the loop architecture between them that became 2025–26 practice: a primary loop that spawns fresh-context subagents for bounded subtasks instead of running those subtasks inline — growing the system sideways instead of growing one context.
10.1 Why isolate contexts at all
The constraint is the attention budget: "LLMs have an 'attention budget' that they draw on
when parsing large volumes of context," and context rot — "as the number of tokens in the
context window increases, the model's ability to accurately recall information from that
context decreases" — makes every token of inline exploration a tax on every later decision in
the same window [anthropic-context-engineering]. (The measurement literature behind this —
Chroma's 18-model study, positional effects, the caching economics — is owned by the memory
brief: memory-sota.md §5.) A subtask that reads fifty files or thirty search results inline
leaves its residue in the transcript for the rest of the run; the same subtask in a spawned
context leaves only its conclusion. LangChain's context-engineering taxonomy (write / select /
compress / isolate) names this strategy directly: "[o]ne of the most popular ways to isolate
context is to split it across sub-agents" [langchain-context-engineering].
10.2 The orchestrator-worker loop as context quarantine
Anthropic's research system (§5.4) is the canonical shape, read here at the level of context mechanics rather than economics: "subagents facilitate compression by operating in parallel with their own context windows, exploring different aspects of the question simultaneously before condensing the most important tokens for the lead research agent" [anthropic-multi-agent-research]. The generic cycle: the lead loop plans (which subtasks, how scoped), spawns subagents that each run a full observe-reason-act loop in a fresh window, integrates only their distilled results, and iterates. Each subagent "might explore extensively, using tens of thousands of tokens or more, but returns only a condensed, distilled summary of its work (often 1,000-2,000 tokens)" [anthropic-context-engineering]. The failure surface moves accordingly: with no shared transcript, the task description is the entire interface, so delegation prompts carry the burden that context used to — vague scoping produces duplicated or divergent work, and in the synchronous version of the pattern the lead agent cannot steer a subagent mid-flight [anthropic-multi-agent-research].
10.3 The counterargument: isolation fragments decisions
Cognition's "Don't Build Multi-Agents" [cognition-no-multi-agents] attacks exactly the spawn step: "Share context, and share full agent traces, not just individual messages," because "actions carry implicit decisions, and conflicting decisions carry bad results." Its Flappy Bird case: two parallel subagents each resolved ambiguity their own way — "the actions subagent 1 took and the actions subagent 2 took were based on conflicting assumptions not prescribed upfront" — and the merge inherited the conflict. The recommendation is "a single-threaded linear agent" where "the context is continuous," plus, for tasks that overflow one window, a dedicated model "to compress a history of actions & conversation into key details, events, and decisions" [cognition-no-multi-agents]. The disagreement with §10.2 is narrower than it looks: it is about what work gets delegated, not whether isolation works — research subtasks return facts, which compose; coding subtasks make design decisions, which conflict.
10.4 The practitioner middle ground
§5.4's read-parallel / write-serial synthesis, restated as loop design: fan out fresh-context subagents for read-shaped work — search, codebase exploration, verification, adversarial review (fresh-context review also reduces self-anchoring, §4's design rule 3) — and keep a single writer with continuous context for mutations, so every write-side decision is made in one thread that has seen all prior decisions. The subagents are the loop's telescope, not its hands. This is also the shape Anthropic's engineering guidance converges on: sub-agent context isolation is recommended for read-heavy exploration specifically (this brief's §5.3 summary of [anthropic-context-engineering]).
10.5 Harness implementations (official docs)
- Claude Code / Agent SDK. The contract is stated in context terms: "Each subagent starts with a fresh conversation … It does not see the parent's turns, and only its final response returns to the parent as a tool result. The main agent's context grows by that summary, not by the full subtask transcript" [claude-code-agent-loop]. "Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions" [claude-code-subagents-docs]. One update to §5.1's single-level note: nesting is now supported with a fixed depth cap — "as of Claude Code v2.1.172, a subagent can spawn its own subagents," and a subagent at depth five no longer receives the spawning tool [claude-code-subagents-docs].
- LangGraph. Subgraphs — "a subgraph is a graph that is used as a node in another graph" — give loops-within-loops with explicit state contracts: parent and child either share state keys or transform between different schemas at the boundary [langgraph-subgraphs]. The current multi-agent docs attach the context property to the supervisor pattern itself: subagents are stateless and "each subagent invocation works in a clean context window, preventing context bloat in the main conversation" [langgraph-subagents-docs].
- OpenAI Agents SDK. Two mechanisms with opposite context semantics: agents-as-tools —
"a manager agent keeps control of the conversation and calls specialist agents through
Agent.as_tool()" [openai-agents-multi] — versus handoffs, where by default "the new agent takes over the conversation, and gets to see the entire previous conversation history," scoped only if aninput_filterprunes it [openai-agents-handoffs]. A handoff is context transfer, not context isolation; the clean-context mechanism in this SDK is agents-as-tools with scoped inputs.
10.6 The token economics of isolation
The ledger, on the verified figures (arithmetic): per subtask, the parent pays roughly the
spawn instruction plus the returned summary (~1,000–2,000 tokens
[anthropic-context-engineering]); the subagent burns its own window — tens of thousands of
tokens — on exploration the parent never carries. System-wide spend rises ("multi-agent
systems use about 15× more tokens than chats" [anthropic-multi-agent-research]) while the
parent's per-subtask window consumption falls by the exploration-to-summary ratio. Isolation
therefore pays when (a) exploration ≫ summary — read-heavy subtasks — and (b) the task clears
the economic bar: "multi-agent systems require tasks where the value of the task is high
enough to pay for the increased performance" [anthropic-multi-agent-research]. The same
arithmetic says when not to spawn: a subagent that reads two files to return one path costs
a spawn round-trip and summary overhead for exploration the parent could have absorbed. The
fan-out cost model, Amdahl-style serial bounds, and topology token growth live in the
companion brief orchestration-algorithms-sota.md §5–6.
10.7 SOTA refresh: context engineering became the umbrella (2025–26)
The 2025–26 change is that this pattern went from folklore to named discipline: Anthropic's context-engineering post canonizes sub-agent architectures as a long-horizon technique alongside compaction and note-taking [anthropic-context-engineering]; LangChain's write/select/compress/isolate taxonomy makes isolation a first-class strategy [langchain-context-engineering]; and the first comprehensive academic survey (Jul 2025) presents "a comprehensive taxonomy decomposing Context Engineering into its foundational components and the sophisticated implementations that integrate them," with multi-agent systems as one of those integrated architectures alongside RAG and memory systems [context-engineering-survey]. The through-line for loop designers: the unit of context management is no longer the transcript but the system of transcripts, and spawning a clean one is now a first-class loop operation next to compaction and retrieval.
Sources (references.yaml format; all URLs verified 2026-07-09)
react-paper: {title: "ReAct: Synergizing Reasoning and Acting in Language Models (ICLR 2023)", url: "https://arxiv.org/abs/2210.03629", accessed: "2026-07-09"}
reflexion-paper: {title: "Reflexion: Language Agents with Verbal Reinforcement Learning (NeurIPS 2023)", url: "https://arxiv.org/abs/2303.11366", accessed: "2026-07-09"}
self-refine: {title: "Self-Refine: Iterative Refinement with Self-Feedback (NeurIPS 2023)", url: "https://arxiv.org/abs/2303.17651", accessed: "2026-07-09"}
plan-and-solve: {title: "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning (ACL 2023)", url: "https://arxiv.org/abs/2305.04091", accessed: "2026-07-09"}
llmcompiler: {title: "An LLM Compiler for Parallel Function Calling (ICML 2024)", url: "https://arxiv.org/abs/2312.04511", accessed: "2026-07-09"}
tot-paper: {title: "Tree of Thoughts: Deliberate Problem Solving with Large Language Models (NeurIPS 2023)", url: "https://arxiv.org/abs/2305.10601", accessed: "2026-07-09"}
lats-paper: {title: "Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models (ICML 2024)", url: "https://arxiv.org/abs/2310.04406", accessed: "2026-07-09"}
koh-tree-search: {title: "Tree Search for Language Model Agents (Koh et al., Jul 2024)", url: "https://arxiv.org/abs/2407.01476", accessed: "2026-07-09"}
self-consistency: {title: "Self-Consistency Improves Chain of Thought Reasoning in Language Models (ICLR 2023)", url: "https://arxiv.org/abs/2203.11171", accessed: "2026-07-09"}
snell-tts: {title: "Scaling LLM Test-Time Compute Optimally Can Be More Effective than Scaling Model Parameters (Aug 2024)", url: "https://arxiv.org/abs/2408.03314", accessed: "2026-07-09"}
lets-verify: {title: "Let's Verify Step by Step (OpenAI, May 2023 — PRM800K)", url: "https://arxiv.org/abs/2305.20050", accessed: "2026-07-09"}
thinkprm: {title: "Process Reward Models That Think (ThinkPRM, Apr 2025)", url: "https://arxiv.org/abs/2504.16828", accessed: "2026-07-09"}
o1-system-card: {title: "OpenAI o1 System Card (Dec 2024)", url: "https://arxiv.org/abs/2412.16720", accessed: "2026-07-09"}
deepseek-r1: {title: "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (Jan 2025)", url: "https://arxiv.org/abs/2501.12948", accessed: "2026-07-09"}
huang-self-correct: {title: "Large Language Models Cannot Self-Correct Reasoning Yet (ICLR 2024)", url: "https://arxiv.org/abs/2310.01798", accessed: "2026-07-09"}
self-correction-survey: {title: "When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction (TACL 2024)", url: "https://arxiv.org/abs/2406.01297", accessed: "2026-07-09"}
self-correction-bench: {title: "Self-Correction Bench: Uncovering and Addressing the Self-Correction Blind Spot in LLMs (Jul 2025)", url: "https://arxiv.org/abs/2507.02778", accessed: "2026-07-09"}
swe-bench-paper: {title: "SWE-bench: Can Language Models Resolve Real-World GitHub Issues? (ICLR 2024)", url: "https://arxiv.org/abs/2310.06770", accessed: "2026-07-09"}
swe-bench-verified: {title: "SWE-bench Verified — 500 Human-Validated Tasks (OpenAI/Princeton, Aug 2024)", url: "https://huggingface.co/datasets/princeton-nlp/SWE-bench_Verified", accessed: "2026-07-09"}
swe-agent-paper: {title: "SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering (NeurIPS 2024)", url: "https://arxiv.org/abs/2405.15793", accessed: "2026-07-09"}
tau-bench-paper: {title: "τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (Sierra, Jun 2024)", url: "https://arxiv.org/abs/2406.12045", accessed: "2026-07-09"}
tau2-bench-paper: {title: "τ²-Bench: Evaluating Conversational Agents in a Dual-Control Environment (Jun 2025)", url: "https://arxiv.org/abs/2506.07982", accessed: "2026-07-09"}
terminal-bench: {title: "Terminal-Bench: A Benchmark for AI Agents in Terminal Environments", url: "https://www.tbench.ai/", accessed: "2026-07-09"}
toolformer: {title: "Toolformer: Language Models Can Teach Themselves to Use Tools (NeurIPS 2023)", url: "https://arxiv.org/abs/2302.04761", accessed: "2026-07-09"}
toolllm: {title: "ToolLLM: Facilitating LLMs to Master 16000+ Real-World APIs (ICLR 2024)", url: "https://arxiv.org/abs/2307.16789", accessed: "2026-07-09"}
codeact: {title: "Executable Code Actions Elicit Better LLM Agents (CodeAct, ICML 2024)", url: "https://arxiv.org/abs/2402.01030", accessed: "2026-07-09"}
swe-rl-paper: {title: "SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution (Meta, Feb 2025)", url: "https://arxiv.org/abs/2502.18449", accessed: "2026-07-09"}
multi-turn-swe-rl: {title: "Training Long-Context, Multi-Turn Software Engineering Agents with Reinforcement Learning (Aug 2025)", url: "https://arxiv.org/abs/2508.03501", accessed: "2026-07-09"}
agentic-rl-survey: {title: "The Landscape of Agentic Reinforcement Learning for LLMs: A Survey (Sep 2025)", url: "https://arxiv.org/abs/2509.02547", accessed: "2026-07-09"}
coala-paper: {title: "Cognitive Architectures for Language Agents (CoALA, 2023)", url: "https://arxiv.org/abs/2309.02427", accessed: "2026-07-09"}
memgpt-paper: {title: "MemGPT: Towards LLMs as Operating Systems (Oct 2023)", url: "https://arxiv.org/abs/2310.08560", accessed: "2026-07-09"}
anthropic-effective-agents: {title: "Building Effective Agents — Anthropic Engineering (Dec 2024)", url: "https://www.anthropic.com/engineering/building-effective-agents", accessed: "2026-07-09"}
anthropic-multi-agent-research: {title: "How We Built Our Multi-Agent Research System — Anthropic Engineering (Jun 2025)", url: "https://www.anthropic.com/engineering/multi-agent-research-system", accessed: "2026-07-09"}
anthropic-context-engineering: {title: "Effective Context Engineering for AI Agents — Anthropic Engineering (Sep 2025)", url: "https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents", accessed: "2026-07-09"}
anthropic-harness: {title: "Effective Harnesses for Long-Running Agents — Anthropic Engineering (Nov 2025)", url: "https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents", accessed: "2026-07-09"}
anthropic-writing-tools: {title: "Writing Effective Tools for Agents — with Agents — Anthropic Engineering (Sep 2025)", url: "https://www.anthropic.com/engineering/writing-tools-for-agents", accessed: "2026-07-09"}
claude-code-agent-loop: {title: "How the Agent Loop Works — Claude Code / Agent SDK Documentation", url: "https://code.claude.com/docs/en/agent-sdk/agent-loop", accessed: "2026-07-09"}
cognition-no-multi-agents: {title: "Don't Build Multi-Agents — Cognition AI (Jun 2025)", url: "https://cognition.com/blog/dont-build-multi-agents", accessed: "2026-07-09"}
openai-agents-guide: {title: "A Practical Guide to Building Agents — OpenAI (2025, PDF)", url: "https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf", accessed: "2026-07-09"}
langgraph-durable-execution: {title: "Durable Execution — LangGraph Documentation (LangChain)", url: "https://docs.langchain.com/oss/python/langgraph/durable-execution", accessed: "2026-07-09"}
claude-code-subagents-docs: {title: "Subagents — Claude Code Documentation", url: "https://code.claude.com/docs/en/sub-agents", accessed: "2026-07-09"}
langgraph-subgraphs: {title: "Use Subgraphs — LangGraph Documentation", url: "https://docs.langchain.com/oss/python/langgraph/use-subgraphs", accessed: "2026-07-09"}
langgraph-subagents-docs: {title: "Subagents — LangChain Multi-Agent Documentation", url: "https://docs.langchain.com/oss/python/langchain/multi-agent/subagents", accessed: "2026-07-09"}
openai-agents-handoffs: {title: "Handoffs — OpenAI Agents SDK Documentation", url: "https://openai.github.io/openai-agents-python/handoffs/", accessed: "2026-07-09"}
openai-agents-multi: {title: "Orchestrating Multiple Agents — OpenAI Agents SDK Documentation", url: "https://openai.github.io/openai-agents-python/multi_agent/", accessed: "2026-07-09"}
langchain-context-engineering: {title: "Context Engineering for Agents — LangChain Blog (Jul 2025)", url: "https://www.langchain.com/blog/context-engineering-for-agents", accessed: "2026-07-09"}
context-engineering-survey: {title: "A Survey of Context Engineering for Large Language Models (Jul 2025)", url: "https://arxiv.org/abs/2507.13334", accessed: "2026-07-09"}