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 earns 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, more importantly, a candid assessment of pattern erosion — which patterns have moved into the model and which remain architectural. The reference table below carries the same information the per-pattern entries in earlier drafts carried, at a fraction of the length: 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. An erosion tag marks how far the reasoning core has moved into 2026 models: [erosion: partial] for patterns whose reasoning has moved substantially into the model but which retain an architectural footprint; no tag 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 earns its residue by reaching 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, dispatching an input to one of several handlers, is a deterministic workflow, not an agentic cognitive loop (Chapter 2); when the routing decision is a fixed classifier, there is no goal-directed choice to erode. Retrieval-augmented generation (RAG) is not a standalone reasoning pattern either: it is a memory and retrieval architecture (Chapter 7) on the read path, and where it constrains the model to grounded sources it is an instance of Constraint-Guided Reasoning. Both matter enormously; neither is a cognitive pattern in the sense this chapter maps.

Cognitive patterns: reference table

PatternIntentArchitectural residue in 2026ErosionWhere 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 upfrontThe loop is increasingly model-internal; what remains is the bounding — iteration limit, cost ceiling, tool schemas, observability of the tracepartialYao et al., ReAct (2022); Gulli, Tool Use; Anthropic, Building Effective Agents
Plan–executeSeparate planning from execution: produce a structured plan, then execute, replanning on failureUseful 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 executionpartialGulli, Planning; Augment Code 2026 catalog
Reflective critique (generate, critique, revise)Improve correctness by inserting bounded self-evaluation between generation and commitWhether 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 notpartialAndrew Ng, Reflection; Anthropic, Evaluator-Optimizer; Gulli, Reflection
Self-consistencyRun multiple independent reasoning traces over the same problem and aggregate by voting or selection to reduce stochastic errorA cost/quality tradeoff: how many traces, what aggregation rule (majority vote, weighted vote, judge model), whether traces share stateWang et al., Self-Consistency (2022); Gulli, Self-Consistency
DebateStructured adversarial exchange between two or more agents (or two roles of the same agent) before a final judgmentRole 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 perspectivesDu et al., Multi-Agent Debate (2023); Gulli, Debate
Tree-of-thoughtExplicit branching reasoning: generate candidate next-steps, score, prune, recurse, for problems with combinatorial structureHeavy. 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 costYao et al., Tree of Thoughts (2023); Gulli, Reasoning Techniques
Constraint-guided reasoningApply explicit domain or structural constraints during reasoning to reduce hallucination and ensure output conformanceSubstantial 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 infrastructureAnthropic, Building Effective Agents (validators); Gulli, Safety Patterns
Tool useRecognize a gap in the model’s own knowledge or reach, formulate a query to close it, and suspend reasoning until the observation returnsWhere 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 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 law would be falsified if provider-hosted execution became the norm and customers could still enforce deterministic bounds and refusals on every proposed action — so the execution seam remained customer-controlled even when tools ran on provider infrastructure. Chapter 19 treats the seam where that control is most often lost today. This is good news for architects. The patterns that erode are the ones with the most public attention but the smallest production payoff. The patterns that remain are the ones that 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 envelope, not the inner loop

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. That envelope is the harness, the deterministic infrastructure that turns a probabilistic model into a bounded, governable agent (Chapter 19 designs it in full).

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 model decides; the harness acts

The model is the reasoning organ; the harness owns every hand and eye. The model emits text proposing action; deterministic harness code executes tools 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:

This map is the payoff that justifies the section. The forward-references in those chapters now point at a defined structure: they describe the slots they fill in the envelope the reader has now seen.

A preview, not a design

This section has introduced the concept of the harness; it has not designed it. The design, the question of where a new capability belongs when one is needed, in harness code, in a tool, in a skill, or in a new agent, is the subject of Chapter 19. That chapter designs the loop in full and inverts the book’s own thesis: the harness is the system, and the model is a bounded component within it. The harness is treated as a given in design terms through Parts II and III — each chapter develops a layer the harness enforces at each turn — and Part IV composes those layers into whole systems and operational practice before Chapter 19 designs the loop. This is the introduce-then-synthesize structure that gives the capstone its power.

A reader who wants the practical answer sooner, before the capstone, can take the question of where capability lives as a forward reference now: the decision sequence in Chapter 19 resolves a new capability by asking the cheapest distinguishing questions first, whether it is knowledge or capability, whether it needs a new effector or sensor the agent lacks, whether it is know-how over existing tools, or whether it is internal logic that must be guaranteed. The constraint that closes it, know-how may move into skills freely; power may not, is the rule that keeps the skills movement from becoming a governance bypass, and it is worth carrying through the intervening chapters, where the action surface (Chapter 5) and the skills layer (Chapter 10) are the two places the question arises most naturally.

Where the book goes from here

The cognitive patterns themselves are cataloged elsewhere, read Gulli, Anthropic, and Andrew Ng for full treatments, and used here by name without further re-derivation. For academic survey treatments of the surrounding literature — agent methodology, planning, and 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.