Symptom: High-cost, low-quality trajectories past 50 turns.
Fix: Decompose into subagents (each with own context).
Source: LangChain Deep Agents (drop-in alternative to flat agents).
---
## 12. Quick-Reference Patterns (Anthropic Dynamic Workflows)
These six orchestration patterns are the *de facto* vocabulary for 2026 multi-agent systems. Each maps cleanly to a JS code shape.
| Pattern | When to reach for it |
|---|---|
| Classify and act | Mixed inputs needing different specialists |
| Fanout and synthesize | Independent units β single report |
| Adversarial verification | False positives are costly |
| Generate and filter | Exploring options beats one-shot |
| Tournament | Subjective / relative criteria |
| Loop until done | Unknown scope, want completeness |
(Anthropic Claude Code dynamic workflows docs / LangChain Deep Agents docs.)
---
## 13. Recommended Loops to Implement First (Priority Order)
For developers new to agent loops in July 2026, implement in this order β each builds on the last:
1. Tool-call loop with strict JSON validation (3.6)
2. Just-in-time context retrieval (4.1) β defeat context rot
3. Pre-completion verification hook (2.2) β kill premature termination
4. Tool retry middleware (7.1) β trivial to add, removes ~30% of user complaints
5. Subagent isolation (5.1) β clean context boundaries
6. Code-as-orchestrator (5.6) β when fan-out exceeds ~10 items
7. RLM-style REPL (4.7) β when input approaches 50k tokens
8. Harness engineering iteration cycle (9.4) β when quality plateaus
9. Sandbox isolation (8.10 from LangChain essay) β before any side-effecting production deploy
10. RLM-recipes for reasoning sandwich + adaptive thinking (6.4, 6.5)
Skip ahead only if your domain demands it.
---
## 14. Master Source List (Verified URLs)
1. Anthropic β Building Effective Agents β <https://www.anthropic.com/engineering/building-effective-agents>
2. Anthropic β Effective Context Engineering for AI Agents β <https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents>
3. Anthropic β The "think" tool β <https://www.anthropic.com/engineering/claude-think-tool>
4. Anthropic β Writing tools for AI agents β <https://www.anthropic.com/engineering/writing-tools-for-agents>
5. Anthropic β Adaptive Thinking β <https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking>
6. Anthropic β Introducing the Model Context Protocol β <https://www.anthropic.com/news/model-context-protocol>
7. Claude Code β Dynamic Workflows Docs β <https://code.claude.com/docs/en/workflows>
8. Claude Code Blog β Dynamic Workflows β <https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code>
9. LangChain β Improving Agents is a Data Mining Problem (Jul 7 2026) β <https://www.langchain.com/blog/improving-agents-is-a-data-mining-problem>
10. LangChain β Improving Deep Agents with Harness Engineering β <https://www.langchain.com/blog/improving-deep-agents-with-harness-engineering>
11. LangChain β Running Untrusted Agent Code Without a Sandbox β <https://www.langchain.com/blog/running-untrusted-agent-code-without-a-sandbox/>
12. LangChain β Agents Need Their Own Computer β <https://www.langchain.com/blog/agents-need-their-own-computer>
13. LangChain β Introducing Dynamic Subagents in Deep Agents β <https://www.langchain.com/blog/introducing-dynamic-subagents-in-deep-agents>
14. LangChain β How to Use RLMs in Deep Agents β <https://www.langchain.com/blog/how-to-use-rlms-in-deep-agents/>
15. LangChain β Introducing OpenWiki Brains β <https://www.langchain.com/blog/introducing-openwiki-brains-general-purpose-wiki-memory-for-agents>
16. LangChain β Middleware Overview β <https://docs.langchain.com/oss/python/langchain/middleware/overview>
17. LangChain β Multi-Agent Handoffs β <https://docs.langchain.com/oss/python/langchain/multi-agent/handoffs/>
18. Chroma β Context Rot β <https://research.trychroma.com/context-rot>
19. Zhang et al. β Recursive Language Models β <https://arxiv.org/abs/2512.24601>
20. OOLONG benchmark (long-context reasoning) β <https://arxiv.org/abs/2511.02817>
21. Simon Willison β "I think 'agent' may finally have a widely enough agreed upon definition" β <https://simonwillison.net/2025/Sep/18/agents/>
22. Simon Willison β Judgement (July 2026) β <https://simonwillison.net/2026/Jul/3/judgement/>
23. Simon Willison β Hacker Uses Meta AI for Account Takeovers β <https://simonwillison.net/2026/Jun/1/hackers-simply-asked-meta-ai/>
24. Armin Ronacher β Better Models: Worse Tools (Jul 4 2026) β <https://lucumr.pocoo.org/2026/7/4/better-models-worse-tools/>
25. Geoffrey Huntley β everything is a ralph loop β <https://ghuntley.com/loop/>
26. Meta β Practical AI Agent Security (Rule of Two) β <https://ai.meta.com/blog/practical-ai-agent-security/>
27. OpenAI β Lockdown Mode β <https://help.openai.com/en/articles/20001061-lockdown-mode>
28. OWASP Top 10 for LLM Applications β <https://genai.owasp.org/resources/?e-filter-3b7adda-resource-item=cheat-sheets>
---
*Compiled 2026-07-18. Scope strictly limited to AprβJul 2026 state-of-the-art material. All techniques are implementable on Monday by a competent agent engineer. The window of "RLMs + dynamic workflows + harness engineering" is the dominant 2026 paradigm.*