Built once, runs every episode: the machinery
Between the cast and the episodes sits the machinery used for each run: the graph that organizes the steps and the rules that check their output. In theater terms it’s the rigging and the lighting board. Nobody in the audience sees it, and every performance depends on it. This page has two sections: the stage, then the rules in code and in the instructions my coding agents follow.

The stage
Each episode is one run through a graph built with LangGraph. A graph here is a map of steps and the paths between them: each step (a “node”) is a Python function, and the arrows say which step comes next. Some arrows are forks, decided at run time: if the checks fail, the run goes to “needs fixing” instead of the approval pause. One is a loop: the director picks a speaker, that seat speaks, and control returns until it decides to wrap.
I built it one new idea per phase, so that when something broke there was only one new thing it could be. It’s the electrician’s rule: test the outlet with a lamp before you plug in the new appliance.
So the first version of this graph had no AI in it at all. Phase 0 was a blocking rehearsal, stand-ins walking the stage before the actors arrive. Every step ran for real, and the dialogue was placeholder text like “[Edward, so what check, lane: funding rounds, earnings, pricing; draws on claim 2].” It had four checks, which still pass today. A run stops at the approval pause and prints its run ID. Approving it in a later command writes the script, Monica first. Reordering the booked panelists changes the speaking order with no code change. And deleting the AI disclosure from the show’s settings sends the run down the “needs fixing” branch instead of letting it reach me.

Exhibit 1 · the stand-in rehearsal, rerun without a model
Made by: code, no model
Checked by: the current graph’s script checks
Approved: not approved for production; a free demonstration
Source:run.py ep01, runep01-20261129-211702-2ddb, November 29, 2026The current stand-in route reached the script pause with 16 turns, 274 words and model calls costing $0.0000.
Sarah’s stand-in line begins:
[Sarah, depth check, lane: papers, benchmarks, evaluation reports; dra(the history view truncates here).This reruns the rehearsal idea through today’s graph. It is not an archived November 5 script.
load_inputs- Director and speaker loop
directorpersona_turnSpeaker selected: the panelist speaks, then control returns to the director. Repeat until the director chooses to wrap.
wrap_upchecksFailneeds_fixingPass◇ Pause for approval
write_output
Model calls came in phase 2, inside one node, with everything around them already working, which I’d think saved me more debugging than any other choice in the build.
The graph has grown from nine nodes to 27 since then. Its five approval pauses cover research spend, dossiers, follow-ups, the script and finished media. Since S1 E4, the production procedure also stops for MP3 approval before rendering the video, followed by a separate picture review. Simplified, with the loops for retrying a dossier left out:
- Inputs and research
load_inputs→research_requests◇ Pause: approve spending
research◇ Pause: review dossiers
- Green room and follow-ups
green_room→disagreement_map→ follow-ups◇ Pause: approve follow-ups
- Briefing and discussion
host_briefingdirectorpersona_turnReturn to the director after each panelist turn, until the director wraps.
- Wrap and check
wrap_up→checksFailneeds_fixingPass◇ Pause: approve script
write_output→record_memory - Sound
render_lines→edit_episode→check_transcript◇ Stop: approve MP3 before video rendering
- Picture
render_video◇ Pause: approve picture
The director loop and pass/fail branches are shown explicitly. Dossier retry loops are omitted from this simplified view.
Pauses that survive a restart
The pauses are what make this a pipeline I can use rather than a script I babysit. When a run
reaches one, LangGraph’s interrupt stops it and the process exits. Days later I run a new command,
run.py --resume <run-id> --approve, and the run picks up exactly where it stopped.
What makes that work is the checkpointer, which saves the run’s whole state to a SQLite database file on the machine running the episode at the end of every step. The state is one shared notepad the steps read and write (the topic, the booking, the transcript so far, the running cost). Some fields are append-only: a step returns only its new lines and LangGraph adds them to the end, the way a transcript only grows. Each run gets its own thread ID, which is its run ID, and that ID is also on every line of the run’s event log and every receipt. The alternative, rerunning from the start after each approval, would have meant paying for every model call before the pause again, and getting different answers.
That file has to survive for a later process to resume it. Running in the cloud doesn’t make the checkpoint portable: replacing the environment can still lose it unless it’s preserved separately.

Exhibit 2 · a saved pause and a production approval later in the log
Made by: LangGraph for rehearsal history; code for the S1 E4 log
Checked by: views of saved state and logged events
Approved: S1 E4 script approved by me with edits, November 29, 2026
Source:run.py --history ep01-20261129-211702-2ddb;episodes/ep04/draft1/run-log.txtFree rehearsal history:
step 43 next=wrap_up turns=15 step 44 next=checks turns=15 + Monica: [Monica, recap and one open question] step 45 next=approval turns=15 PAUSES1 E4’s production log, UTC:
2026-11-29T01:29:58+00:00 checks passed 2026-11-29T03:02:04+00:00 approval: approved with Mike's edits to turns 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16 2026-11-29T03:02:04+00:00 write_output: wrote out/ep04/ep04-20261128-220345-2e54/script.mdThese are two distinct records. The production log shows the interval and subsequent approval; it does not establish a process restart. The exported S1 E4 checkpoint retains only the latest state and pending writes, not its complete history.
Two later additions came from needing them. --stop-before <step> is a breakpoint, so I can hear the
MP3 before the video is built. --from-checkpoint answers an earlier pause again, so I can go back
to a dossier decision and branch the run from there.
LangGraph felt invisible to me until I could see it, so the stage has two views. run.py --graph
prints the map as a diagram drawn from the compiled graph itself, so it can’t drift from the code.
run.py --history <run-id> replays every snapshot the checkpointer saved, oldest first: which step
ran, the turn count, and each new transcript line. Later I added an interactive board of every node
and route.
Exhibit 3 · the episode workflow
Made by:make_lanes.pyfrom the compiled graph
Checked by: the generator refuses graph steps it cannot draw
Approved: me, existing diagrams
Source:docs/architecture/graph-diagrams/graph-lanes.htmlFollow the full workflow in three lanes: my decisions, Codex Cloud, and connected services. The diagram also shows how approved files reach YouTube and how release records return to GitHub.
What code checked in this section:
- The four phase 0 checks, kept passing as the graph grew.
- A resume refuses a run that isn’t waiting at a pause, and says so.
What I judged myself:
- What each phase added, one idea at a time, and whether I could explain it before moving on.
What went wrong:
- A run saved before I added a new field to the state crashed when I came back to approve it
(
KeyError: 'chars'). Checkpointed state outlives the code that wrote it, so any new field a step reads needs a fallback for runs saved without it. - Answering an old pause directly didn’t work. Once a pause has been answered, LangGraph stores that step’s result beside its checkpoint and replays it, so my second answer was silently ignored. The fix was to fork: write a fresh checkpoint on top of the old pause, as if the step before it had just finished, and run from there. What came after the old pause stays in the history, on a branch nobody follows.
- A reply from the model provider came back as a success with a body that wasn’t JSON, the structured data format the code expected, and the run crashed without a record of the call. Now that’s logged as a failed attempt, with what came back, and retried.
The rules in code, and the agent’s instructions
A model can be asked to follow a rule. Code can make sure it did. Wherever a rule mattered, I tried
to have both: the instruction in the prompt is the request, and a check in code is the lock behind
it. The disagreement map is the clearest case. The director is asked not to include sources or
numbers, and then leak_check.py strikes any line that holds a URL or a figure found in any
panelist’s dossier anyway.
Exhibit 4 · Sarah’s map line and the leak check’s actual result
Made by: the director’s model
Checked by:leak_check.py
Approved: me, in the reviewed script workflow
Source:episodes/ep04/approved/disagreement-map.md;episodes/ep04/draft1/run-log.txt, 00:38:57 UTCSarah: A consequence display plausibly helps, but the exact proposal is untested, and for destructive actions a narrower permission or real undo probably beats a better dialog, though that comparison has not been run either.
Log result:
16 lines, 0 struck by the leak check.The saved map passes. There is no rejected map line in this run to show as a before-and-after. The research failure below is a separate, recorded case of a check rejecting output.
Checks that fail, and checks that warn
Some checks stop the run. A quote missing from the pages the search returned fails the dossier check. A seat’s model call that carries any tools is refused before it’s sent, since dossiers bring web pages’ words into its prompt. Two seats sharing a voice ID stops rendering before any money is spent. A file whose SHA-256 doesn’t match the approved record can’t be uploaded. A panelist’s memory that mentions an episode that hasn’t aired yet stops the booking.
Exhibit 5 · Sarah’s dossier: an initial failure beside the final check
Made by: code, from the dossier and its saved search results
Checked by:check_dossier.py
Approved: me, dossier approval logged November 29 at 00:36:59 UTC
Source:episodes/ep04/draft1/run-log.txt, 22:13:49 UTC;drafts/ep04/checks.json, SarahInitial failure, excerpt:
Q2-C3: wrong source: "mean total intervention time was 128.8 s for POLICY and 142.1 s for HI".The final saved check records 49 verified claims and no failures. Two rows:
Q4 | partly | 6 | 6 verified Q6 | partly | 8 | 8 verifiedThe words can verify while a question remains partly answered. This check establishes a match to the saved excerpts, not whether the underlying study is correct.
Others only warn, because the judgment is mine. jargon.py flags a term of art used for the first
time without an explanation nearby, repeats.py identifies a seat arguing the same point twice, and the
greeting checks flag two panelists opening the same way. A heuristic can tell that a speaker tried
to explain a term, but not whether the explanation was good, so these show up at the script pause
for me to read rather than failing anything.
Exhibit 6 · a warning that leaves the decision with me
Made by: the jargon check
Checked by: a warning; the run still reaches approval
Approved: demonstration only; not a production script decision
Source: free stand-in runep01-20261129-211702-2ddb, script-pause output
warning: Sarah first uses benchmark, eval in turn 3 with no explanation nearbyThe stand-in text names the research lane without explaining those terms, so the warning is expected. S1 E4’s script-review README also notes jargon warnings on evaluations and checkpointing; this example shows the exact console format without inventing its production wording.
Automated tests exercise these checks as the code changes.
Every paid call writes its receipt before processing the result further. The record names the provider and request ID, requested model and the one served, tokens in and out (units of text), searches and cost. It also identifies the step, seat and attempt number. Retries and discarded calls count, because they cost money. A local ledger in SQLite imports each run’s receipts once, keyed by provider and request ID, so importing the same run twice adds nothing, and it checks its OpenRouter total against what OpenRouter itself reports. Keys and request headers are never logged.
Exhibit 7 · Sarah’s research-request receipt, selected fields
Made by: code when the paid call returned
Checked by: the ledger imports by provider and request ID
Approved: n/a; a spending record
Source:episodes/ep04/draft1/receipts-ep04-20261128-220345-2e54.jsonl, Sarah research_request receipt{ "ts": "2026-11-28T22:05:44+00:00", "run_id": "ep04-20261128-220345-2e54", "episode": "ep04", "event": "receipt", "step": "research_request", "seat": "Sarah", "provider": "openrouter", "request_id": "gen-1795903531-zm8BQfqYDlf3bDBThpGZ", "input_tokens": 7365, "output_tokens": 1483, "cost_usd": 0.02956, "attempt": 1 }This is a field selection from one receipt, not the complete JSON line. Model fields are omitted while the naming decision remains open. The call’s $0.02956 is part of the episode cost, not its total.
Where things live
Text lives in git, the version-control system; media is stored in the show’s private Google Drive. Every media file is named in the repo by its Drive path and its SHA-256 fingerprint, which is how a copy is proven to be the approved one: download it and compare the recorded value. A short list of media stays in git so a fresh copy of the repo can still render (the headshots, the backdrop, the intro and outro), and a test fails if git tracks anything else.
Earlier episodes still needed my Mac for parts of the handoff. The Drive connector we were using couldn’t upload the larger files. For S1 E4, I configured a cloud environment in Codex. Its Drive connector uploaded the media directly, including a 73.5 MB draft MP4, and the cloud runtime performed the private YouTube upload. The file fingerprints still determined which copies were approved. The production location changed without dropping that check.
The run also files its own text records. At the script pause it copies the draft, the disagreement map, the memos and the receipts into the episode’s folder. Later steps file the approved text, the edit, the transcript check and the cue sheet. The working folders are only on the machine that ran the episode, so without this a session in the cloud could finish production and leave no record of it.
episodes/ep03/- Text records filed by the run
script/v1/,v2/Each draft script at its pause, with the disagreement map, memos and receipts
draft1/…draft4/Per run: approved script, edit, transcript check and receipts
line-fixes/The two reworded sentences and their receipts
audio/lines.jsonThe cue sheet
approved/What I approved, plus
record.json: each media file’s SHA-256 fingerprint, size and Drive path
The agent’s instructions
I built all of this with coding agents, Claude Code and Codex, and most of what keeps them on track
is one file, AGENTS.md. It holds the goal and the phase ladder, with a “done when” for each step. It holds
the rules (never print a key, ask before installing anything, don’t guess endpoints or model names,
publish only what I’ve approved). And it says how I want to be taught as we go: an analogy for each
new idea, an explanation before each step, and what I should see if it worked. Claude Code’s own file
imports it, so every session starts with it loaded rather than relying on the agent to open it.
Exhibit 8 · the instructions that make the build a learning exercise
Made by: me, with coding agents over the build
Checked by: n/a; instructions to the agent
Approved: me, standing repository instructions
Source:AGENTS.md, About me, and how to work with me; excerpts belowBefore writing code, explain what the phase adds, in plain English and with an analogy.
One new idea per phase. If a phase needs two new things, split it, so a failure points at one cause.
The first instruction asks for an explanation I can follow. The second changes the size of the work we attempt before checking it.
Procedures that repeat live in skills, one folder each, readable by either agent: reviewing a draft script (the checks, the fact sheet, edits proposed by letter), revising an episode by ear, filing media in Drive, and publishing to YouTube. Each was written while doing the step for real, never ahead of it, and an index lists candidates for the next ones. The YouTube skill keeps every error met so far with its fix, so it shouldn’t need working out twice.
Troubleshooting notes record the errors we encountered and how we resolved them, so a later session can identify a familiar problem before changing anything.
What code checked in this section:
- Dossier quotes, the map’s leak check, tools on seat calls, voice IDs, file fingerprints, memory that’s ahead of the air order, and what media git may track.
- The ledger against the provider’s own totals.
What I judged myself:
- Every warning at the script pause, line by line.
- Which rules belong in
AGENTS.md, since each one came from something that went wrong or that I decided.
What went wrong:
- Two sessions appended rows to one shared manifest file and collided. Now each batch of uploads gets its own dated manifest, and an old one is never appended to.
- Media in git grew the repo until 93 files had to come out, each one first downloaded back from Drive and matched by SHA-256. The old commits are kept behind a tag rather than rewriting history.
- A cloud session’s working folder disappears with its container, which is why receipts, research requests, draft dossiers and the run’s records are now copied into the repo as the run goes.
- And nothing here runs on a schedule yet. Every run happens on my laptop or in a session I’m watching; moving the checkpoint to a hosted database so a run can resume somewhere else is the next phase, not done.