Chapter 4Cognitive patterns: A reference map
Cognitive patterns structure the internal reasoning of a single agent, how it converts a goal and a current state into a next action. They are the most heavily documented part of the agentic literature, and they are also the part most rapidly being absorbed into the reasoning models themselves.
This chapter closes Part I with a deliberately compressed treatment. The cognitive layer gets less space because erosion has moved much of it into the models, and the book’s budget goes to what remains architectural.
The canonical patterns, ReAct, Plan-Execute, Reflection, Self-Consistency, Debate, Tree-of-Thought, Constraint-Guided Reasoning, and Tool Use, are each documented at length in the sources cited in Chapter 21. Gulli (2025) covers them with hands-on code. Anthropic’s Building Effective Agents essay treats the workflow shapes. Andrew Ng’s Agentic Design Patterns (DeepLearning.AI, 2024) introduces reflection, tool use, planning, and multi-agent collaboration as foundational. The CSIRO catalog formalizes them in the academic literature.
How to read this chapter
This chapter gives the architectural reader the vocabulary in one place and an assessment of pattern erosion, which patterns have moved into the model and which remain architectural. The reference table below carries each pattern’s intent, the architectural residue it leaves in 2026 (what the surrounding system must still provide), and where to read the full treatment, compressed to a fraction of the length a per-pattern entry would require. The Erosion column marks how far the reasoning core has moved into 2026 models: partial for patterns whose reasoning has moved substantially into the model but which retain an architectural footprint; a dash (—) for patterns that remain fully architectural, requiring external coordination, isolation, or enforcement the model cannot provide for itself.
Chain-of-Thought, reasoning step by step within the model’s own context, is the one cognitive pattern that has eroded totally, which is why it gets no row of its own. It is the substrate the others build on (ReAct adds action to it, self-consistency votes across several runs of it), and it now happens natively inside any reasoning model, leaving no architectural residue to manage. Its total erosion is precisely why none of the patterns below are tagged total: each retains an architectural residue because it reaches outside the model’s context, for a tool, a second opinion, a validator, a vote, where Chain-of-Thought never had to.
Two patterns readers often expect here are deliberately absent. Routing dispatches an input to one of several handlers through a deterministic workflow (Chapter 2); a fixed classifier makes no goal-directed choice that could erode. Retrieval-augmented generation (RAG) provides a memory and retrieval architecture (Chapter 7) on the read path. Where it constrains the model to grounded sources, it is an instance of Constraint-Guided Reasoning. Both matter, but this chapter maps cognitive patterns within an agent’s reasoning loop.
Cognitive patterns: reference table
| Pattern | Intent | Architectural residue in 2026 | Erosion | Where to read more |
|---|---|---|---|---|
| ReAct (reason-act loop) | Interleave reasoning and action in bounded iterations so the agent adapts to feedback without committing to a full plan upfront | The loop is increasingly model-internal; what remains is the bounding: iteration limit, cost ceiling, tool schemas, observability of the trace | partial | Yao et al., ReAct (2022); Gulli, Tool Use; Anthropic, Building Effective Agents |
| Plan-execute | Separate planning from execution: produce a structured plan, then execute, replanning on failure | Useful when the plan is an auditable deliverable (a step-by-step approval, a migration runbook); commitments are plan persistence, plan diffing on replan, and a governance gate between plan and execution | partial | Gulli, Planning; Augment Code 2026 catalog |
| Reflection (generate, critique, revise) | Improve correctness by inserting bounded self-evaluation between generation and commit | Whether the critic is the same model or a different one (separation matters for catching consistency failures) and whether the critique is bounded (cap on critique iterations to prevent thrashing); worthwhile when the critic has information the generator does not | partial | Andrew Ng, Reflection; Anthropic, Evaluator-Optimizer; Gulli, Reflection |
| Self-consistency | Run multiple independent reasoning traces over the same problem and aggregate by voting or selection to reduce stochastic error | A cost/quality tradeoff: how many traces, what aggregation rule (majority vote, weighted vote, judge model), whether traces share state | — | Wang et al., Self-Consistency (2022); Gulli, Self-Consistency |
| Debate | Structured adversarial exchange between two or more agents (or two roles of the same agent) before a final judgment | Role isolation (each side cannot see the other’s prior turns in a way that compromises the dialectic), a judge component, bounded rounds; costly, reserved for problems that benefit from opposing perspectives | — | Du et al., Multi-Agent Debate (2023); Gulli, Debate |
| Tree-of-thought | Explicit branching reasoning: generate candidate next-steps, score, prune, recurse, for problems with combinatorial structure | Heavy. Branch factor, depth limit, scoring function, pruning policy. Rarely justified in enterprise tasks, which lack the objective intermediate-state evaluator ToT needs; cost grows as the product of branch factor, depth, and scorer cost | — | Yao et al., Tree of Thoughts (2023); Gulli, Reasoning Techniques |
| Constraint-guided reasoning | Apply explicit domain or structural constraints during reasoning to reduce hallucination and ensure output conformance | Substantial and underappreciated. Structured-output constraints (JSON schema, regex, grammar-constrained decoding), retrieval-grounded prompts, and pre/post-validators (Chapter 6) are all instances. The most architectural of the cognitive patterns: the constraint typically lives outside the agent and is enforced by deterministic infrastructure | — | Anthropic, Building Effective Agents (validators); Gulli, Safety Patterns |
| Tool use | Recognize a gap in the model’s own knowledge or reach, formulate a query to close it, and suspend reasoning until the observation returns | Where the cognitive layer meets the architecture. The model decides which tool; the architecture decides which tools are available, with what authorization, with what schema enforcement, with what side-effect logging. The footprint has grown, not shrunk: the tool surface is where most production failures happen (Chapter 11) | — | Andrew Ng, Tool Use; Anthropic, Tool Use docs; Gulli, Tool Use |
The erosion column rests on a dated line of releases, not on impression. OpenAI’s o1 (September 2024) was the first production model trained to run chain-of-thought internally rather than being prompted into it. DeepSeek-R1 (January 2025) reproduced the result in an open-weight model. Claude 3.7 Sonnet (February 2025) added extended thinking to the Claude line. The action side followed within months: OpenAI’s o3 and o4-mini (April 2025) and the Claude 4 models (May 2025) interleave tool calls inside the model’s own reasoning pass, the inner ReAct loop moving into the model, which is what the table’s partial verdicts record. These dates will age. The discriminating mechanism is what to carry forward.
The pattern is clear. Cognitive structures the model can run inside its own context have eroded. Structures that require external coordination, isolation, or enforcement have not. The pattern would be falsified only if provider-hosted execution became the norm and customers lost the ability to enforce deterministic bounds and refusals on every proposed action. They have not: the execution seam remained customer-controlled even when tools ran on provider infrastructure. Chapter 19 treats the seam where that control is most at risk today. This is good news for architects. The eroding patterns carry the most public attention but the smallest production payoff. The ones that remain decide whether a system holds up in production: bounding, governance, observability, the tool surface. The rest of the book is about those.
The harness: the envelope that did not migrate
The reference table just presented tells a story of migration: the cognitive loop has moved into the model, and what remains outside is the envelope around it. That envelope is the harness, the deterministic program that turns a model into an agent, and it is the structure the rest of this book attaches to. This section introduces the concept; Chapter 19 designs it in full.
The inner loop moved into the model
What migrated into the model is the inner cognitive loop; what did not migrate is the envelope around it: assembling context, executing proposed actions, enforcing bounds, calling governance, persisting state, and recording the trace. This is the work the harness does on every turn.
A single harness turn may wrap several model-internal steps: the harness makes one model call and sees only the boundary (what went in, what actions came out), deliberately blind to the deliberation in between. As the inner loop moves into the model, the envelope carries more, because more behavior is decided inside an opaque call only the envelope can constrain.
The harness executes what the model proposes
The harness executes every tool call the model proposes. The model emits text that proposes actions. The harness then executes those actions with authorization, schema enforcement, and trace logging. Chapter 19 develops the execution seam, including provider-hosted execution of effectful tools where the principle is most at risk.
What attaches to it
The remaining architectural chapters each fill a slot in the envelope:
-
Bounded autonomy (Chapter 5) is the set of limits (iteration, cost, deadline, risk) the harness checks before and after each turn.
-
Governance (Chapter 6) is the pipeline the harness routes every proposed action through before it touches anything.
-
Memory (Chapter 7) is the state the harness assembles into context each turn; the ingestion pipeline (Chapter 8) is how semantic memory is written.
-
Coordination (Chapter 9) is what the harness does when the work needs more than one envelope.
-
Skills (Chapter 10) are procedural know-how the harness loads into context at runtime.
-
The trace (Chapter 12) is the record the harness writes of every model call and every action result.
The forward references in those chapters now point at a defined structure: each describes the slot it fills in the envelope.
Scope of this section
This section has introduced the concept of the harness. Chapter 19 designs it in full, including the decision about whether a new capability belongs in harness code, a tool, a skill, or another agent. That design puts the book’s thesis into a concrete loop: the harness is the system, and the model is a bounded component within it. Parts II and III develop the layers the harness enforces at each turn. Part IV composes them into whole systems and operational practice before the capstone specifies the loop.
A reader who wants the practical answer sooner can jump ahead to the decision sequence in Chapter 19. It asks the cheapest distinguishing questions first: is the addition knowledge or capability? Does it need a new effector or sensor? Is it know-how over existing tools, or internal logic that must be guaranteed? The governing constraint is that know-how may move into skills freely; power may not. It prevents a skill from bypassing governance. The distinction matters most when defining the action surface (Chapter 5) and the skills layer (Chapter 10).
Where the book goes from here
The cognitive patterns themselves are cataloged elsewhere; read Gulli, Anthropic, and Andrew Ng for full treatments, and they are used here by name without further re-derivation. For academic survey treatments of the surrounding literature (agent methodology, planning, tool learning) see Chapter 21. The book’s budget goes to the structure that did not migrate: the envelope and its slots, beginning with bounded autonomy in Chapter 5.