The Latticework A Mental-Models Reading · Jul 2026
Tap edges or swipe ← →
Field Note · AI Tools & Agentic Workflow

Best practices for Claude Code.

A latticework reading of Anthropic Engineering's guide to working effectively with Claude Code — which mental models the advice amplifies, which it challenges, and what new operational frames it introduces.

1 / 7
Source Overview

The doc at a glance.

Anthropic's best-practices guide for Claude Code is organized around five core themes: giving the model a way to verify its own work; exploring before planning before coding; providing rich context; managing session state aggressively; and running at scale through subagents and automation. It is primarily a practitioner's guide — dense with specific commands, invocations, and workflow patterns — but underneath the how-to surface runs a clear set of beliefs about what kind of agent Claude Code is and how humans should think about working with it.

5Core workflow phases
/clearKey context command
8Consecutive hook blocks before override
~4Failure patterns named

Source: Anthropic Engineering — anthropic.com/engineering/claude-code-best-practices

2 / 7
I · The Frame

What this guide is really teaching.

Most tool documentation teaches you the interface. This document does something more interesting: it teaches you a theory of failure. The advice is organized not around features but around collapse modes — the specific ways an agentic coding session degrades when the human doesn't manage it well. That framing makes it unusually useful as a latticework source, because each failure pattern illuminates a mental model that was misapplied or missing.

The guide implicitly models Claude Code as something between a very capable contractor and a short-term-memory patient. It can do extraordinary things with the right context, and it will lose the thread entirely if context fills with noise. The best-practice advice follows from that dual nature: give it rich, precise input, then manage what accumulates in the session window as aggressively as you'd manage RAM in a low-memory system.

Three categories of perturbation: amplified models (inversion, margin of safety, hierarchical organization); bent or complicated models (trust, autonomy, the "write less code" principle); and new operational frames that earn a place in the latticework.

3 / 7
II · The Reinforced

Old models, sharpened by agentic use.

The "explore first, then plan, then code" advice is a clean instantiation of inversion applied to the creative process. The canonical failure mode — plunging directly into implementation — maps exactly to what Munger called "not inverting sufficiently." If you knew the code was going to go wrong, the most likely cause would be writing it before understanding the problem. The guide turns that observation into a workflow gate: exploration is not optional pre-work but the first executable step.

In one prompt: ask Claude to run the check and iterate in the same message.
In one prompt: ask Claude to run the check and iterate in the same message, as in the table above. Across a session: set the check as a goal condition. A separate evaluator re-checks it after every turn and Claude keeps working until it holds. As a deterministic gate: a Stop hook runs your check as a script and blocks the turn from ending until it passes. Claude Code overrides the hook and ends the turn after 8 consecutive blocks. By a second opinion: a verification subagent or a dynamic workflow that checks its own findings has a fresh model try to refute the result, so the agent doing the work isn't the one grading it.

Margin of safety gets a structural treatment in the "give Claude a way to verify its work" section. The guide doesn't frame this as a nice-to-have; it frames the absence of verification as a critical gap. Four specific verification mechanisms are provided: in-prompt self-check, session goal condition, deterministic Stop hook, and verification subagent. The hierarchy moves from soft (in-prompt) to hard (Stop hook that blocks the turn). The Stop hook — a script that physically prevents the session from ending until it passes — is margin of safety operationalized as infrastructure.

Hierarchical organization reappears in the CLAUDE.md architecture. There are five distinct levels: home folder (applies to all sessions), project root (shared with team), project root local (personal, in .gitignore), parent directories (for monorepos), and child directories (loaded on demand). The hierarchy is explicit and reasoned — each level has a different audience and persistence scope. This is more sophisticated than most teams' actual documentation practices; the model is the same one used in organizational design, where different levels of policy have different audiences and revision cycles.

4 / 7
III · The Contradicted

Models that do not survive intact.

The "write less code, prefer simplicity" principle — a perennial software engineering virtue — gets complicated by the subagent and worktree patterns. The guide enthusiastically recommends "fan out across files": generate a task list, write a script to loop through it, test on a few files, then run at scale. This is procedurally generated code running agents in parallel — the opposite of minimal, and explicitly recommended. The simplicity virtue hasn't disappeared, but it now applies at the skill level (the plain-English instruction) rather than at the harness level (the execution loop), which can and should be as automated as the task warrants.

Trust but verify as a single compound operation gets split. The guide's "kitchen sink session" anti-pattern names the failure mode: you start a task, ask something unrelated, return to the first task, and now the context is full of irrelevant history that degrades future responses. The fix — /clear between unrelated tasks — is not just hygiene; it's an argument that trust and verify have to be applied to the context window, not just to the output. What you've let accumulate in the session is as important as what the model produced.

The "more instructions = more compliance" assumption, familiar from prompt engineering folklore, gets directly challenged by the over-specified CLAUDE.md failure pattern. A CLAUDE.md that tries to specify everything causes important rules to get lost in the noise. The fix: "ruthlessly prune." Any instruction Claude already follows without being told should be deleted. The model's defaults matter; working against them with redundant specification is not caution, it's overhead. The counterintuitive advice is to write less of your most important guide.

5 / 7
IV · The New

New entries for the latticework.

The most transferable new model is context as working memory. Claude Code sessions degrade not because the model forgets but because the context window fills with irrelevant material — failed attempts, tangential explorations, old corrections — that the model must pay attention to even when it shouldn't. Managing context is not a UX preference; it is memory management. The right frame is not "how do I communicate better?" but "what do I want in this model's working memory, and what do I need to flush?"

Verification as architecture, not afterthought is the practice-level version of margin of safety. The guide provides four distinct verification mechanisms, ranging from soft (in-prompt self-check) to structural (Stop hook that physically blocks session end). The progression from soft to hard is a design decision: how much confidence do you need before the work is considered done? Choosing the verification level is part of the task design, not an addition to it.

The failure-pattern taxonomy introduces agentic anti-patterns as a design category: the kitchen sink session, the correcting-over-and-over spiral, the over-specified CLAUDE.md, the trust-then-verify gap, and infinite exploration. Each has a specific structural fix. Naming the anti-patterns is the first step to designing workflows that route around them. This is system design thinking applied to human-AI interaction: you don't fix the model's behavior by correcting it; you fix the workflow that invites the bad behavior.

Finally, subagents as scoping tools: the guide recommends subagents not primarily for parallelism but to isolate exploration from the main context. When you need to investigate something deeply, a subagent does it without polluting the session. The main context stays clean; the investigation happens in a disposable workspace. This is a different frame than "parallelism is good" — it's about context hygiene as a first-class concern.

6 / 7
V · The Field Card

When to reach for which.

VI · Coda

The latticework, after Anthropic Engineering.

The best-practices guide is, at its core, a theory of cognitive partnership. The model is capable but context-bound; the human is the context manager. The most important thing the human does is not write better prompts — it's decide what to keep in the session and what to flush, when to verify and at what level, and when the task needs a clean slate.

The kitchen sink session is the most common failure. Start one task, ask something unrelated, return to the first task. The context is now full of noise you can't unsee. — Anthropic Engineering, Best practices for Claude Code

The latticework leaves this guide heavier in operational hygiene and lighter in naive optimism. You get powerful tools and you get a set of failure modes that are entirely yours to introduce. The models to reach for — inversion, margin of safety, hierarchical organization, verification as architecture — are the ones that were always about managing the gap between what you intended and what you shipped.

7 / 7