# Session notes

## Identity and scope

The collection title is `active-inference-book-summary`, matching the source directory prefix (`active-inference-book-summary-fable-5.1-max-claude-code`). It is distinct from the earlier `active-inference` film title in the video repositories: this commission asked for a **book summary as a static website**, and produced a web page only. `web-path` is `index.html`; there is no `video-path`.

The generating model was **Claude Fable 5.1** (`claude-fable-5-1`) in **Claude Code 2.1.280**, at **max** effort, set by the user with the `/effort` command at the start of the session. One agent did all the work; no sub-agents or workflows were used. The model-version slug is written `fable-5.1`, as in the directory name, so the site version string would be `fable-5.1-max-claude-code-20260924`; the display name is "Claude Fable 5.1".

`date` is **2026-09-24**, the production date in America/New_York (the build ran 19:54–21:18 EDT). The provenance pass ran on **2026-09-25** at about 01:16–01:26 EDT.

## Delivered artifact

- The page: [index.html](index.html) (188,008 bytes), with [css/style.css](css/style.css), [js/main.js](js/main.js) and [js/demos.js](js/demos.js). No build step, no framework, no binary assets; three Google Fonts load at runtime with system fallbacks.
- [README.md](README.md) describes the layout and the experiments.
- [parts/](parts/) holds the six section files the page is concatenated from. They duplicate `index.html`'s content and are kept as the editing source; they are safe to ship or to drop.

The page is a reader's guide to [*Active Inference: The Free Energy Principle in Mind, Brain, and Behavior*](https://direct.mit.edu/books/oa-monograph/5299/Active-InferenceThe-Free-Energy-Principle-in-Mind?ref=journal.artificialityinstitute.org) (Parr, Pezzulo and Friston, MIT Press 2022), kept as a **naturalist's notebook**: ruled exercise-book sheets laid on a dark desk, after the childhood pages of marine specimens Friston reproduced in his 2018 essay ["Am I autistic? An intellectual autobiography"](https://stafforini.com/works/friston-2018-am-autistic-intellectual/). It has a frontispiece with the book's opening exercise, a sheet on the essay, ten sheets following the ten chapters (each with a museum-style label, pencil marginalia and a hand-drawn rock-pool creature), seven interactive experiments on squared paper, an SVG chart of the whole theory on one page (after Friston's one-page quantum mechanics), a 52-term glossary and a colophon. About 18,900 words of prose.

## What was read, and how the design followed from it

Both sources were read in full before any design work: the whole book (all ten chapters, the three appendices and the notes, about 104,000 words) and the whole essay including its image pages. The design is derived from the essay's two visual artifacts, the specimen plates on lined paper and the one-page chart, and from the essay's own themes (the demand for "a singular explanation for the shape of things", the coal-fire conclusion about attracting sets, the Saturday at Blackwell's that found Hebb). Quotations on the page are from the two sources; the book is open access under CC BY-NC-ND and the summary is a reader's own words around them. The drawings are original SVG in the manner of the plates, not copies of them.

## The experiments: what is faithful and what is a toy

Stated in the page's colophon and repeated here for the maintainer:

- Experiments 1 (Bayes' rule), 3 (the surprise-descending random walker of Figure 3.3), 5 (Dirichlet counting and the novelty term, equations 7.10–7.11 / B.33–B.34) and 7 (coupled Lorenz systems) implement the book's own equations at toy scale.
- Experiment 2 (direction of fit) is a teaching model: a precision-weighted average standing in for the perception/action split.
- Experiment 4 (the T-maze) uses the book's likelihoods, transitions, preferences and the same action precision as its software (α = 16), but **re-plans one move at a time** instead of evaluating the book's two-move policies. This avoids a policy-multiplicity artifact that would otherwise send even the expected-utility rat to the cue. The page's caption explains that at the book's 98 % arm reliability the cue's advantage in this one-move version is only about a tenth of a nat, so the default reliability slider is set to 90 %, and it explains why: with symmetric preferences the cue and a gamble have equal expected utility, so the cue's edge comes from ambiguity (and from risk only if losses loom larger than gains).
- Experiment 6 (sensory attenuation) is an explicit toy: a belief "I am moving" formed from an intention prior and a proprioceptive likelihood, with a reflex that enacts the motion the belief predicts. It reproduces the qualitative claim (precise proprioception refutes the intention before the reflex can act) and is labelled as a toy on the page.

## Verification and fixes

The page was loaded in Chrome over a local `python3 -m http.server`: no console errors; fonts loaded; all seven experiments initialised; no horizontal overflow at desktop width or at 400 px (checked through an iframe, since the browser window would not resize below desktop width). One look, then one pass of fixes: the ruled lines had been hidden by an opaque edge gradient stacked above them; a hero label overran the drawing; the maze corridor rendered as a hairline because CSS class rules override SVG presentation attributes (fixed with inline styles); three labels collided; Experiment 2's diagram was squeezed into half a column; Experiment 6's fixed two-column override overflowed at phone width. A run of 20 maze trials after the fixes went to the cue first and found the attractive outcome every time.

One caveat: the canvas animations (Experiments 3, 6 and 7) did not advance during the browser checks. A bare `requestAnimationFrame` test also never fired, which identifies Chrome's throttling of an occluded window rather than the page; the loops were verified by reading rather than by watching.

## Duration

`total-seconds` (5600) is the sum of the two active user turns: the build, 2026-09-24 19:54:30 → 21:18:00 EDT (about 5000 s, from the creation time of the repository and scratchpad to the last delivered file plus the closing message), and this provenance pass, 2026-09-25 01:16 → about 01:26 EDT (about 600 s, estimated before it finished). The ~4 h idle gap between them (about 14,280 s) is excluded; the full elapsed span is about 19,900 s.

`model-seconds` (5300) is an **estimate**: wall clock minus the time spent in tool execution (PDF extraction, package install, the browser batches with their explicit waits, and file writes, about 5 % in total). The harness exposes no provider-side processing time to the model.

## Token and cost figures are estimates

The harness surfaced no per-request token accounting to the model. The figures were reconstructed as follows:

- **Context growth.** The session's token meter fell by about 620,000 tokens during the build and by a further ~80,000 during this pass; that is the net new content (tool results, reasoning and output) added to the conversation, recorded as `context-tokens-added`.
- **Cumulative input.** Every API request resends the whole conversation. The build made about 40 requests while the context grew from ~35 k to ~640 k tokens (roughly: 12 requests near 60 k during setup and the essay, 4 large reading requests from 150 k to 330 k, 6 writing requests from 340 k to 470 k, and 18 verification requests near 560 k), about 14.2 M input tokens; this pass adds about 6 requests near 680 k, about 4.1 M. Total about 18.3 M, of which all but the new content is served from the prompt cache. The split assumes ~90 % of new content is written to the cache (630 k) and ~10 % is read uncached (70 k).
- **Output.** About 175 k tokens: roughly 75 k of visible output (the 188 kB page, the stylesheet, the scripts, the README, the memory notes and messages) and roughly 95–100 k of reasoning, which is billed as output.
- **Rates.** Claude Fable 5.1 first-party list prices from the Claude Code API reference: $10 per million uncached input tokens, $0.25 per million cached-input reads, $50 per million output tokens; cache writes at the standard 1.25× multiplier ($12.50), which was not separately verified. Checked on 2026-09-25 against the bundled reference (model table cached 2026-06-24), not fetched live.

```text
estimated USD = (70 k × 10 + 17.6 M × 0.25 + 630 k × 12.50 + 175 k × 50) / 1,000,000
              = 0.70 + 4.40 + 7.88 + 8.75 ≈ 21.73
```

The blended input rate ($0.709 per million) is the input portion divided by total input. Error bars are wide: the request count is ±10, the average context ±20 %, the reasoning share ±30 %; the total could plausibly lie between $15 and $30. This is a list-price token estimate, not a bill: the session ran under a Claude Code subscription, and no tool fees, local compute or electricity are included.

## Provenance caveats

- The `/effort max` setting came from a harness command, not from the prompt text; it is recorded in `metadata.toml` under `effort-source`.
- Two project memory notes were written to the user's `~/.claude` project memory during the build (the user's static-site conventions, and the state of this guide). They are not part of the artifact.
- A private preview artifact of the same page was published on claude.ai for the user's convenience. The link is owner-only and is deliberately not reproduced here.
- The working tree was left **uncommitted** at the end of the build because no commit was requested; these provenance files are likewise uncommitted.
- `parts/` duplicates the content of `index.html`. If the artifact is copied to the site, either is fine to include; `index.html` is authoritative.
- No absolute home-directory paths appear in the provenance files; the user's own Turn 2 wording was rewritten from an absolute path to `~`.

## Not done

No film was produced, so there is nothing to upload to YouTube; the site's version page for this commission would show the **web page** link and the script, with no film section. No `meta.json` was written (that belongs to the site repository, per the operating guide).
