Welcome to the Act 2 finale. Last week ended with an accounting: ten mysteries solved, one (mystery 8) left open. Today the board comes down for good. One move of the camera makes it possible — for three weeks we were INSIDE the model; today we step outside it.
Make the debts explicit from page one. Hold the class to this contract: every promise gets checked off by the end. The shift that makes all four possible is a single move of the camera — out of the model and into the wrapper around it.
Block A is dense: ten chapters of architecture. Block B is hands-on, then ceremonial. On the page the lab sits last by convention; in the room the exercises come FIRST and the ceremony after — the board should come down while your hands are still warm from the lab.
State the thesis BEFORE it is earned — chapter 2 earns it properly. For now, hold it as the lens through which every chapter looks.
Every Act 2 lecture opens by changing what the running diagram shows. L4 introduced it; L5 unlocked the transformer interior. Today the camera moves backwards for the first time — the whole picture becomes one box inside a larger one.
v1.3 — one version tick per lecture since L4. Nothing INSIDE the old picture changes; what changes is the frame. Read the arrows: the arrow IN (token injection) is everything this lecture is about; the arrow OUT goes to the wrapper, not the world, and is the tool loop (ch8). The outer box is DIFFERENT for every tool — which is precisely mystery 8's soil.
Read the arrows, because the arrows are new and they are the whole lecture. The arrow IN is everything this lecture is about. The arrow OUT is the tool loop (ch8). The outer box is different for every tool — mystery 8's soil.
Walk each row. This table is the lens for the rest of the course. When something goes wrong, the first question is: which box? People write elaborate prompts to fix orchestration problems and fiddle with config to fix distribution problems — misdiagnosing the bin is the most common failure mode.
Quick. Each card is a diagnostic exercise. Ask the room to call the box before revealing the tag. Surprising word choice → inner (Lectures 4–6 toolkit). File loaded or not, a 'memory' that appeared → outer (this lecture).
Reference their own Locust CLAUDE.md. The magic was twelve lines of ordinary code (a directory walk) plus attention (L5). Two systems, one illusion.
EXTENDED. Why users misattribute everything to the model. Act 3 is largely about making deliberate decisions in this invisible layer.
The centrepiece. The one object that ever crosses the boundary between the two boxes: the token sequence the orchestration layer assembles and ships. If you carry a single picture out of today, carry this one.
Walk it top to bottom. System prompt: the vendor's block, before anything you control. CLAUDE.md: your first control point. Memory: files the model wrote for itself. Conversation: the growing middle. At the bottom, your current message; after it, nothing. There is no side channel — if a fact is not in this sequence, the model does not have it.
The tool result — the contents of a file the MODEL asked for — arrives marked [user]. From the model's standpoint, the world answers it in the user's voice. Nobody inside the model chose that; the orchestration layer assigns the label.
Strip the learned preference away and [system], CLAUDE.md, and your question are the same kind of thing: text in a sequence. The visual hierarchy you experience has no counterpart on the other side of the API.
Quick. Foreshadow ch6: this property stops being bookkeeping and starts producing behaviour when you edit CLAUDE.md mid-session.
The KV cache is L5's optimisation. What the growing payload implies for long sessions — Lecture 9 picks up. Today it is enough to register the protocol fact.
Foreshadow ch8. You typed one question; behind the scenes, five API calls happened, each re-sending the entire accumulated sequence.
This is the simplest possible data structure doing the simplest possible thing. No database, no relevance ranking, no intelligence — bookkeeping that the entire system stands on. Once you see the array, every behaviour in chapters 4–10 is some rule about what gets appended to it, and when.
Pivotal framing. CLAUDE.md loading = an append rule at start. Memory = an append at start from a model-written directory. A skill = an append on a trigger. A tool result = an append mid-loop. The context budget = what to do when the array's serialisation approaches the window's edge.
Quick consolidation. These four observations carry most of the explanatory weight of the lecture.
Three closely related sections in one chapter: how files become tokens (CLAUDE.md), the files the model writes for itself (memory), and what happens when a file changes mid-session.
A loop any of you could write in a dozen lines. No model has run yet. The most consequential context decision of the session is made by filesystem traversal. The Locust CLAUDE.md was a root-level file — present in every session you ever ran.
The testing conventions arrive when the model first touches the tests — mid-array, at a late position. A conversation that never touches tests/ never receives those tokens.
The closest the model comes is indirect: rule 2's trigger is a tool call it emitted — but it asked for the test file, not for the conventions. The orchestration layer's stupidity is what makes the system debuggable.
Before today you couldn't tell these apart; now it's a five-minute check.
In session 1 the model wrote a memory file recording your preference. In session 2 the orchestration layer injected it before you typed anything. Attention did the rest. At no point did the model retain anything between sessions.
By the time the tokens reach the model, both are the same kind of thing: text in early positions competing for attention. Every difference that matters lives one layer up — in who writes the files, and where they sit.
A chat hallucination scrolls away. A hallucinated memory is re-injected into every future conversation until someone deletes it. The repository is ground truth; the memory directory is notes about it.
Your edit changed the file on disk — but the file on disk is not what the model sees. The model sees the sequence, and a sequence cannot be edited retroactively. Both versions now vote at every generation step — intermittent compliance.
Assignment is destructive — after line 2, the value 5 does not exist anywhere. A token sequence is the opposite: both 'assignments' exist forever, and a question about x is answered by weighing them.
A new conversation is the only true overwrite this system offers. If you must stay in the session, repeat the corrected rule in your next message — recency advantage. But that is influence management, not an overwrite.
EXTENDED. One forward-pointer to Act 3. Names only — do not expand.
The first half of Block A moved text INTO the sequence. This half is where the layer stops being a loader and starts being a system — skills loaded on a trigger, and the loop that lets a passive predictor act on the world.
L6 taught you the patterns; a skill is how a team reuses one without retyping it — and without spending its tokens in sessions that never need it. Structure, promoted from habit to artifact: it has a filename, lives in version control, can be diffed and improved for everyone at once.
Anything in your CLAUDE.md only relevant to one kind of task is a skill waiting to be extracted. The lab asks you to find exactly those lines.
Keep light. The thread ends at the course finale, where the orchestration layer stops being simple.
Mark the turn from inbound context to outbound action.
The model emits tokens that look like a tool call. The wrapper intercepts, executes, appends the result, calls again. The model has no hands; it only ever emits tokens.
Each arrow is the end of one API call. Four calls behind a single 'response'. The model never saw stats.py before the wrapper executed its request and appended the contents. By the final 'Done', the conversation is permanently heavier.
The named loop: act–observe–act. L8 references it by this name. When an agent 'self-corrects', this is the mechanism.
The last row is the one to keep for Act 3. Model failure = distribution problem. Wrapper failure = software problem.
Let this land. The sharpest articulation of the polarity, and the sentence Act 3 references.
Quick consolidation. Bridge to MCP and the budget.
Keep schematic. The argument is arithmetic, then a reference to LSP, then MCP by name. No wire-level detail.
The loop from ch8 runs unchanged; only the executor behind it got pluggable. Extending what the system can do required touching only the simple-but-active layer.
Wiring up a tool is a security decision, every single time.
Security = tool surface + permissions + schema validation + human gate. The defence is enforcement, not influence.
Read the control column: no single party manages the budget. The vendor takes its share before you type; the task dictates tool-result size; the response is the remainder.
Quick poll. Most people underestimate. The first lab exercise turns this guess into a measured number.
Coming from L5, students see no reason for a ceiling — feed a longer sequence through the same weights and every matrix multiply is still defined. The limit is declared, not architectural.
Position bounds where it can place a token; quadratic cost holds the training length down; the KV cache holds the servable length down. The usable window can be smaller than the declared one — model/task-dependent (§10.1's attention competition).
Demand grows to fill supply: agentic workflows read whole files and run whole test suites. A serious session fills even a 200K window without trying.
EXTENDED. In all three strategies information is lost — the only choice is which, and by whose rule. The heuristic: when responses slow or early instructions stop biting, a fresh conversation is a budget reset.
Every component is on the table. Now step back: revisit Lecture 6's three-layer model with Act 2's full vocabulary — nothing needs to be asserted anymore, every property can be derived. Then the board comes down.
L6 said 'keep CLAUDE.md concise' was advice. Now it is arithmetic over rule one. Memories, skills, tool results — all influence-layer material, whoever wrote it, whenever it arrives.
Determinism cannot be prompted into the model — L5's forward pass ends in a sample. The enforcement layer truncates; the influence layer only narrows.
Let it land. This is why Lecture 6's three-layer model places enforcement as a separate, non-negotiable layer.
The human layer is not just review — it owns the wrapper.
Point at each cell: where did we derive this? This table is the framework students carry into Act 3.
T17 verbatim. The summary sentence, asserted in L6, derived today.
Bridge to the Mystery Board. Quick consolidation before the closing ceremony.
60 seconds in pairs. This is mystery 8 — the one left open since Act 1. Let them assemble the answer from the token-sequence mechanism before you show the four factors.
The emotional climax of Act 2. Take a beat. The token sequence is the only input the model has — same model under different orchestration is processing different sequences.
Walk each row quickly. Eleven mysteries, eleven mechanisms, zero appeals to magic. The fourth column is a compressed index of Act 2 itself.
In the room, this is the closing ceremony. Each student articulates one sentence: 'I experienced X in Act 1; now I understand it because Y.' If you can say it without hand-waving, the act has done its job.
No magic does not mean no open questions. The claim is narrower: no question of the form 'why did the tool do that?' needs an appeal to mystery. And the no-magic reach extends past the eleven, to questions the board never thought to ask.
Explanation is finished when the mechanism is named. Engineering wants budgets turned into policies and 'it seems better' upgraded to a number.
Preview of Act 3. SWE-bench named per L6's promise.
One compact frame. The exercises run outside the theory deck — do NOT expand into full worksheets; the lab instructions live separately. In the room, these come BEFORE the ceremony.
Act 2 ends here. The board is empty, and it stays empty. Next week: Act 3 opens with "how do we know what these systems can do?"