2025 ended with Meta buying Manus for $2B+ and Claude Code reaching a $1B run rate. Agent task length doubles every 7 months. But there's a fundamental constraint: models degrade as context grows. Chroma calls it "context rot" — every token depletes an LLM's finite attention budget.
Every design pattern in modern agents is ultimately a strategy for managing this scarce resource. The context window is small and expensive; the filesystem is large and cheap. The best agents constantly shuttle information between the two.
Lance Martin identified seven recurring design patterns across Claude Code, Manus, Cursor, Amp Code, and others. Each targets a different aspect of the context management problem. Together, they form a coherent playbook.
Filesystem + shell = persistent context + unlimited action space. The agent "lives on your OS."
FoundationFew atomic tools (~12–20), push everything else to code execution via shell/bash.
Token SavingsShow only essential info upfront. Reveal tool definitions, docs, and skills on demand.
Context EfficiencyWrite tool results and plans to files. Read back only when needed. Avoids lossy summarization.
Memory ExtensionPrompt caching is the "most important metric." Higher-cost model + caching beats cheaper model without.
Cost ControlSub-agents with own context windows for parallel tasks. The "Ralph Wiggum" loop for long-running work.
ScalabilityLearn from past sessions. Distill experiences into memories, update prompts, save reusable skills.
Continual LearningThese patterns aren't independent — they form layers of a system. The foundation is computer access. On top of that, you build action management, context management, and finally learning. Each layer addresses a different failure mode.
Different agents have adopted different subsets of these patterns. Claude Code and Manus are the most complete implementations. Cursor Agent pioneered progressive disclosure for MCP. No agent fully implements all seven yet.
| Pattern | Claude Code | Manus | Cursor Agent | Amp Code | Devin |
|---|---|---|---|---|---|
| Computer Access | ✓ Local OS | ✓ Virtual | ✓ IDE + Shell | ✓ Local OS | ✓ Cloud VM |
| Multi-Layer Actions | ✓ ~12 tools | ✓ <20 tools | ● ~30+ tools | ✓ Curated few | ● Medium set |
| Progressive Disclosure | ● Skills | ✓ CLI --help | ✓ MCP folder sync | ○ | ○ |
| Offload Context | ● Via filesystem | ✓ Files + summary | ✓ Trajectory files | ○ | ● Workspace files |
| Cache Context | ✓ Essential | ✓ Top metric | ✓ | ✓ | ✓ |
| Isolate Context | ✓ Sub-agents | ● | ✓ Task agents | ● | ✓ Multi-agent |
| Evolve Context | ● CLAUDE.md | ○ | ● Rules + Skills | ○ | ● Memory |
In a well-designed agent, context doesn't just accumulate linearly. It flows through a lifecycle: loaded on demand, used for the current step, offloaded to the filesystem, cached for reuse, and eventually distilled into persistent learnings.
Index tool definitions separately. Give agent a search tool to find and load specific tools on demand.
Used by: LangGraph BigTool, Anthropic's advanced tool use pattern.
Saves: 10–30K tokens when MCP servers have 30+ tools. Agent loads only 1–3 tool defs per step instead of all 35.
List available utilities in instructions. Agent calls --help on any CLI it needs to learn about.
Used by: Manus. Agent instructions mention available CLIs but don't load their full docs.
Saves: Unbounded — hundreds of CLI tools available at zero upfront token cost.
Each skill has a short summary in YAML. Agent reads full SKILL.md only when the task matches.
Used by: Anthropic's Skills standard, Cursor Agent's MCP folder sync.
Saves: Only loads ~50 bytes per skill upfront vs. full knowledge base. Agent self-selects what to read.
| Pattern | Maturity | Current State | Open Question |
|---|---|---|---|
| Computer Access | MATURE | Universal across top agents. Local or virtual machine. Table stakes for 2026. | Security boundaries — how much OS access is safe? |
| Multi-Layer Actions | MATURE | CodeAct validated. Claude Code, Manus, Amp all use ~12–20 tools + shell. | Optimal tool count? Still hand-tuned per agent. |
| Progressive Disclosure | EMERGING | Cursor leads with MCP folder sync. Anthropic Skills standard gaining traction. | Standards for tool discovery? Who decides what's relevant? |
| Offload Context | EMERGING | Manus writes to files. Cursor offloads trajectories. Better than summarization. | When to offload vs. summarize vs. drop? No consensus. |
| Cache Context | MATURE | Prompt caching is universal. Manus optimizes cache hit rate as primary metric. | How to mutate context without breaking cache prefixes? |
| Isolate Context | EMERGING | Ralph Wiggum loop works. Sub-agents for parallel review. Gas Town for swarms. | Coordination protocols for multi-agent conflict resolution? |
| Evolve Context | NASCENT | CLAUDE.md updates, diary entries, skill distillation. Mostly manual today. | Can agents automatically learn what to remember? |
The seven patterns are the current state of the art. But three fundamental challenges remain unsolved. Each could reshape agent architecture over the next 12–18 months.
The context window is small and expensive. The filesystem is large and cheap. The best agents shuttle information between the two.
Distinct strategies for managing context — from computer access to continual learning. Together they form the playbook.
Before models may learn to manage their own context. The Bitter Lesson suggests hand-crafted scaffolding gets absorbed.
Give agents a computer. Use ~12 tools + shell for unlimited actions. Offload context to files. Cache aggressively. Isolate sub-agents for parallel work. These are battle-tested and universal across top agents in early 2026.
Automatic context evolution (memories that update themselves). Multi-agent conflict resolution (parallel agents stepping on each other). Agent observability standards (we can't debug what we can't see). The next wave of agent infrastructure will target these.
Lance Martin — LangChain, original blog post
Andrej Karpathy — "Context engineering" framing
Barry Zhang & Erik Schluntz — Anthropic agent definition
Peak Ji — Manus action space hierarchy
Boris Cherny — Claude Code internals
Geoffrey Huntley — "Ralph Wiggum" loop
Steve Yegge — Gas Town multi-agent coordination
CodeAct — Agents chaining actions via code execution
Context Rot — Chroma research on degradation
RLM — Recursive Language Models (Prime Intellect)
Sleep-Time Compute — Offline agent reflection
GEPA — Evolving task-specific prompts
Anthropic Skills Standard — Progressive disclosure
Manus Context Engineering — Cache hit rate optimization