# Session notes — `wondering-mind-opus-5-max-claude-code`

## Configuration

- **Model** Claude Opus 5, 1M context (`claude-opus-5[1m]`). **Effort** `max`, set for this session only
  via `/effort` immediately before the commission; every API response in the session ran at `max`. Both
  were set by slash command in Turn 0, not by prompt.
- **Harness** Claude Code in auto permission mode. Every turn carried a standing harness instruction to
  list privately what was needed next, then issue every independent tool call in one response. That is why
  the session reads as large batches of parallel writes and edits: the film commission made 155 tool
  calls — 64 Edit, 35 Write, 29 Bash, 24 Read, 2 SendUserFile, 1 ToolSearch — in only 40 API responses.
- **No subagents, no workflows, no memory.** One background task (the full render). The project's memory
  directory is empty; nothing was carried in from a previous session.
- **Prompt cache TTL was one hour**, so cache writes bill at 2× base input rather than 1.25×.

## What was produced

- `out/sandwalk.mp4` — the master, and the file `video-path` points at. 4:42 (282.0 s, 8,460 frames),
  1920×1080 at 30 fps, H.264 (`preset slow`, CRF 21, ~6.5 Mbps), AAC 256 kbps 48 kHz stereo, **218 MiB**.
- `build/sandwalk_preview_540p.mp4` — a 26.4 MiB share copy, made only because the master exceeded a
  30 MiB upload limit: two-pass 960×540 at 680 kbps with light denoising, AAC 96 kbps. A one-off ffmpeg
  command rather than a mise task, and not the deliverable.
- `daydream.md` — the daydream, written down right after it happened.
- **No web page.** The commission was film-only, so `metadata.toml` has no `web-path`.
- `out/`, `build/` and the downloaded fonts are gitignored. Nothing was committed; the repository still has
  no commits.

## Caveats worth knowing

- **The daydream itself is not in the transcript.** It ran as 15 min 30 s of reasoning in the first
  response, and that reasoning is stored only as a signature, not as readable text. `daydream.md` is a
  reconstruction written two minutes later, in the order the thoughts came: faithful in content and
  sequence, but written rather than recorded. The film's design was worked out at the end of that same
  reasoning, so "do not pursue any goals" gave way to planning inside one uninterrupted block.
- **The soundtrack was never heard.** There is no way to listen from this harness. It was checked only by
  numbers (per-30-second RMS and sample peak) and a spectrogram image: −18.7 dBFS RMS and −5.3 dBFS sample
  peak overall. Those are not LUFS or true-peak measurements. The balance, the Lucier-style dissolve and
  every synthesized effect are unauditioned.
- **One passage shipped broken: falling asleep (≈206–212 s) is nearly black.** Its motes were brightened
  just before the full render and not re-checked. Frames pulled from the final film during the provenance
  pass show only faint drizzle under the caption "falling asleep, then a jolt". The branch that follows
  renders correctly.
- **The code changed after the render, but not its behaviour.** A refactor (shared helpers moved into
  `scenes/base.py`, `PileRole.drive` became `drive_pile`, dead helpers and placeholder `__all__` lines
  removed) and a README edit landed while the film rendered. They were verified with
  `ruff check --select F,E9`, an import check and a quarter-resolution run of the whole timeline, not by
  re-rendering and comparing frames. Everything random is seeded (`config.SEED = 1375`), so a rerun should
  reproduce the film, but bit-exact reproduction was not tested.
- **Build cost.** About 11 minutes on an Apple M5 (10 cores, 16 GB): 8,460 frames at ~13.5 fps with the
  H.264 encode running inline, plus ~35 s to synthesize the soundtrack. `mise run render` also re-runs
  `uv sync`, the font fetch and the audio. `mise run stills` is the loop for iterating on a scene.
- **The first build needs network**: uv packages from PyPI and the two fonts from the google/fonts GitHub
  repository (falling back to macOS system fonts when unreachable). There are no other external assets —
  every frame and every sound is generated from source.
- **The prompt's "wonder"** was kept as written and read both ways: the film opens by typing the prompt,
  and the o in "wonder" flickers to an a.
- **The provenance pass started from a cold cache.** The 5 h 28 min idle gap outlasted the one-hour TTL,
  so the first response of Turn 2 re-wrote ~574k tokens of context to cache at 2× input, about $5.74 of that
  pass's cost.

## Bugs found by looking

Each was found in rendered stills, not by reading the code:

1. **Ghost shapes.** A divergence-free flow carries a released shape along intact, so a finished thought
   lingered over the next one — a coastline hanging over the sandwalk like lightning, and later the candle
   flame smudging three scenes. Fixed first with diffusion on release, then with fade-and-respawn.
2. **Water trapped in the stones.** Clamping the potential-flow doublet near each stone's centre made a
   sink, and water particles collapsed into bright dots inside the stones.
3. **A mirror tunnel made of haze.** Each particle had a continuous random depth, so the nested frames
   blended into a solid band. Integer depths made them distinct.
4. **Beaded moth trails.** A moth moves ~20 px per frame; its trail was dotted until targets were smeared
   along each frame's path.
5. **Saturated flint piles.** Thousands of particles in a few pixels clipped to white; brightness now
   compensates for density.

## How the figures in `metadata.toml` were derived

Not estimated. Parsed from the Claude Code session transcript
(`~/.claude/projects/<project>/<session-id>.jsonl`), deduplicating streamed rows by message id and summing
`usage` per API response:

- **Duration** is wall clock from the first record (the `/model` command, 03:36:12 UTC) to the snapshot,
  **less the 5 h 28 min idle gap** (19,687 s) between the film's final message and the provenance request.
  `model-seconds` is, for each API response, the time from the preceding record to the response's last row;
  the remainder is tool execution, dominated by the 10.6-minute render and the stills runs.
- **Tokens** are exact sums of `input_tokens`, `cache_creation_input_tokens` (all of it the one-hour tier),
  `cache_read_input_tokens` and `output_tokens`; thinking tokens come from `output_tokens_details`.
- **Cost** is at Anthropic list rates for Claude Opus 5 ($5.00 input / $25.00 output per MTok), with cache
  reads at 0.1× and one-hour cache writes at 2×. It estimates the equivalent API cost; how the session was
  actually billed is not recorded in the transcript.
- **The film commission alone** (Turn 1, 03:36:34 → 06:14:41 UTC, 2 h 38 min): 40 API responses;
  14,623,774 input tokens, 96.6% of them cache reads; 389,688 output tokens, 266,633 of them thinking;
  $21.78; 4,102 s of model time. The longest response was the daydream at 932.8 s; the median was 23.1 s.
- The whole-session figures in `metadata.toml` are a **snapshot** taken at 11:55:59 UTC, in the same
  response that wrote this file and `script.md`, so they include the provenance pass up to that point.
  Writing `metadata.toml` and checking the three files came afterwards and is not counted, so the true
  end-of-session totals are slightly higher.
