MODULE 04

ADVANCED PROMPTING PATTERNS

From prompting to managing — context hygiene, sub-agents, cross-model review, and the editorial judgment that still has to come from you.

MODULE 04

This module is locked

Unlocks Sunday, May 3 at 5:00 PM ET.

Check back then, or visit your course on the Knight Center LMS.

Back to home

Learning objectives

  • > Manage the context window as a budget — know what fills it, what evicts it, and when to compact or start fresh
  • > Apply the 40% rule: when a session is more than roughly 40% full, quality drops and you should rewind rather than patch
  • > Delegate work to sub-agents without losing editorial control, and verify between handoffs to stop errors from compounding
  • > Run cross-model code review by calling Copilot CLI or Codex CLI as a sub-agent through their non-interactive -p flag
  • > Use the four questions framework — what it does, what it costs in labor, who else is using it, how cost-sensitive the work is — to pick a tool before you pay for one

Before you start

The shift this module asks you to make is the one Ethan Mollick keeps arguing for: stop thinking of yourself as a prompter, and start thinking of yourself as a manager — of the code side of your workflow specifically. Clear instructions, feedback, and evaluation criteria — the same skills a non-developer uses to work with a developer on a code change — are what separate useful output from slop. The readings this week line up with that frame. (This module is about managing the scripts, skills, and pipelines the model helps you build. Your reporting and your writing stay with you.)

There is one failure mode you need to understand before you delegate anything to a sub-agent. Read the concept page first.

Read: working with sub-agents — compounding errors and verification →

Watch

Module 4 is four short videos. Each one introduces one piece of the manager's toolkit.

Effort, thinking, and the shape of the context window

Module 4 pivots away from live demos back to the core prompting techniques. Joe shows the /effort command (low through max), walks through every component that eats your context window — system prompt, tools, agents, memory, skills, messages, auto-compact buffer — and explains why the million-token context Anthropic announced doesn't actually give you a million usable tokens of good quality.

TOPICS COVERED

The /effort command
Low, medium, high, max, auto. Higher effort means deeper reasoning and faster token burn — session limits drain accordingly
What fills your context
System prompt, tools, custom agents, memory files, skills, messages, free space, auto-compact buffer. You can see the breakdown
The million-token lie
Anthropic expanded context to 1M but quality still degrades past roughly 20–30% usage. Nothing else about the model changed
/compact with a focus
Pass an additional instruction like "preserve VLC streaming config" and the summary targets the context you actually need to keep
Status line visibility
Put the token percentage in your status line so you always know when you're approaching the degradation zone
Everything is saved locally
Full JSONL transcripts for every conversation and sub-agent live on your machine. You can point Claude at one and read it back

KEY TAKEAWAYS

  • Effort costs money. /effort max gives you the model's deepest reasoning, but it also burns tokens like crazy and eats into your session limits. Use it when the task actually benefits from slow thinking — not as a default.
  • The million-token context window is marketing. In practice, response quality still starts degrading somewhere between 20% and 30% of the window, same as when the limit was 200k. Keep a close eye on your token percentage and compact aggressively.
  • Compact with a hint. Plain /compact lets the model pick what to preserve. Adding a phrase like "focus on the VLC streaming configuration" tells it exactly which thread of the conversation matters, which is the difference between a useful summary and a vague one.
  • Your conversation transcripts are security-relevant. Every session, including sub-agent calls, is saved as JSONL on your machine. That's useful — you can point Claude at an old transcript and ask "what did we decide" — but it's also the reason you should never paste API keys or raw secrets into a chat. They persist.

TIMESTAMPS

00:00Module 4 intro — back to prompting fundamentals
01:41Effort and thinking — /effort low to max
02:46Context window components
05:35Quality degrades past 20–30% usage
06:19Status line for token visibility
06:47Running /compact on a conversation
07:37Compact with custom summarization instructions
08:46Control-O to see the full transcript
09:01The saved JSONL conversation history
10:09Security implications of saved transcripts
10:48Memory and context as one system

The 40% rule, rewinding, and sub-agents

Joe gives you three moves for when a conversation gets too big: dump it at 40% and start fresh, rewind with double-escape to a known-good point, or delegate to sub-agents with their own context windows. He also warns about "agent telephone," where a sub-agent gets something slightly wrong and the error compounds into your main conversation.

TOPICS COVERED

The 40% rule
Keep your conversation load under 40% of the context window. When you hit it, dump, compact, or start fresh
Fresh conversation per task
One conversation per task or group of tasks. If you can't pick up clean in a new session, your project state isn't well-documented enough
Signs of context rot
Claude repeats itself, pulls threads from unrelated areas, or references outdated details. Around 350k tokens is where it shows up
Double-escape to rewind
Tap escape twice to get a menu and rewind to any earlier point in the conversation — unless you've already compacted past it
Sub-agents with fresh context
Each one gets its own million-token window. Great for offloading tasks without burning your main conversation's budget
Agent telephone problem
A sub-agent gets a detail slightly wrong and reports clean results. Your main agent has no idea, and the error compounds through every next turn

KEY TAKEAWAYS

  • The fresh-session test tells you if your project is documented enough. If you can end a conversation, start a brand-new one in the same project, and still get quality results, your CLAUDE.md and memory files are doing their job. If you can't, fix the docs before you blame the model.
  • Compaction burns your rewind history. Once you compact, double-escape can't get you back past that point. Joe prefers starting fresh conversations over compacting for exactly this reason — compacting trades rewindability for fewer tokens, and he'd rather keep the safety net.
  • Sub-agents save tokens but don't trust them blindly. Fresh context window per sub-agent means you can run heavy work without eating your main conversation's budget. But sub-agents only have the instructions you give them — they can't see your full context, and small errors in their reports silently poison future turns.
  • Watch for repetition and drift. The clearest early signal that a conversation has gone stale is the model starting to repeat itself or pulling in threads from unrelated work. The minute you notice it, save your state to a memory file and start over.

TIMESTAMPS

00:00The 40% rule and per-task conversations
01:12The fresh-session test
02:10Signs of context degradation
02:45Warning signs — CLAUDE.md drift and repetition
03:10/clear vs /quit
03:19Sub-agents and their own context windows
04:33Agent telephone and compounding errors
05:16Double-escape to rewind
05:47Why Joe prefers new conversations over compacting

Cross-model code review with Copilot CLI and Codex CLI

Joe demonstrates calling one CLI agent from inside another using the -p non-interactive flag. From a Claude Code session, he spawns GitHub Copilot and Codex as sub-agents to review the same PR, compares their comments against each other, and watches his main conversation's token count stay flat because the reviews happen in separate contained contexts.

TOPICS COVERED

The -p flag
Non-interactive, one-and-done prompt mode. Lets you spawn a CLI agent as a sub-process from inside another session
CLI agents as sub-agents
Call Copilot or Codex from within Claude Code. They run in an isolated shell and report results back into your conversation
Second opinion before the PR
Get a review right in your terminal before you push anything to GitHub. No notifications, no drama, no teammates interrupted
Install-on-demand
npm install -g @github/copilot, Codex auto-detects existing auth. Claude can set up its own sub-agent tools mid-conversation
Token savings are real
Joe's main conversation stayed at 6% through multiple Copilot and Codex reviews because all the work happened in separate context windows
Sharper critique, different blind spots
Codex caught two high-severity issues Copilot missed — including that Joe's PR loop fix wasn't actually fixing the loop

KEY TAKEAWAYS

  • Play the models off each other. Copilot and Codex have different training data and different review styles. In this video, Codex caught vulnerabilities Copilot missed — one was the real reason the PR loop kept firing. If you have access to more than one CLI agent, use them as sanity checks on each other before shipping code.
  • -p is the key primitive. Non-interactive prompt mode is what makes cross-tool review possible. Joe's main Claude Code session just shells out to copilot -p "review this" and codex -p "review this", captures the output, and continues working. You don't need MCP, you don't need an API integration — it's just one CLI calling another.
  • Sub-agent reviews don't eat your tokens. Every review in this video happened in a separate, isolated context window. Joe's main conversation stayed at 6% usage the entire time because the token cost of Copilot and Codex ran against those other subscriptions, not against his Claude budget.
  • Paste the docs when Claude gets it wrong. Both Copilot CLI and Codex CLI exist but Claude assumed wrong command names and flags on the first try. Joe's move every time: pull up the official docs, paste them into the chat, tell the model to retry. Faster than arguing.

TIMESTAMPS

00:00Getting a second opinion before pushing a PR
01:00The -p non-interactive flag
01:42Setting up Copilot CLI inside Claude Code
03:15Installing via npm install -g @github/copilot
04:37Copilot comments on the PR
05:13Switching to Codex CLI with the same -p trick
05:50Main conversation still at 6% — separate contexts
06:48Codex comes back with a sharper critique
07:35Claude Code's own /code-review skill

Remote control, mobile continuation, and four questions

Joe demonstrates /remote-control, which lets you drive a local Claude Code session from claude.ai in a browser or phone — the feature he spent a month trying to build himself before Anthropic shipped it properly. Then he closes the course with a framework of four questions that will outlast any specific model or tool, plus a speech about why human judgment matters more as the models get more powerful, not less.

TOPICS COVERED

/remote-control from your phone
Drive a local terminal session from claude.ai on any device. Upload photos from your phone and they land in the terminal in real time
No more port forwarding
Joe spent a month almost exposing his shell to the open internet trying to build this himself. Use the built-in feature, not a homebrew
Question one — what is the task
What am I trying to do, and what does a good outcome look like? Answer this before you pick a tool
Question two — how much context
Treat the agent like a junior employee on a new beat. Give it enough institutional knowledge without drowning it
Question three — what tools and access
Firecrawl, Airtable, Firebase, yt-dlp, FFmpeg — what gear does the agent need, and what credentials do you have to hand over
Question four — cost sensitivity
Not just token budget — real money. GPU rentals, API charges, $20 vs $200 plans. Know your ceiling

KEY TAKEAWAYS

  • You're a product manager now, not a coder or a journalist. Joe's clearest framing for the course is that the role these tools push you into is somewhere between traditional newsroom work and engineering — talking to computers and talking to people, orchestrating work instead of doing every step yourself. If you refuse to sit in that middle seat, nothing else in this course pays off.
  • Feature-by-feature comparisons go stale in weeks. Instead, carry the four questions — what is the task, how much context does it need, what tools does it need, and how cost-sensitive are you. Those questions will still work in two years when every specific product in this course has been replaced.
  • Remote control closes the "only at my desk" gap. If you set up wake-on-LAN (or just leave your machine awake) you can trigger a long-running local pipeline from your phone, upload photos from the road, and check in on work while you're doing actual reporting. That's the payoff for tolerating the terminal.
  • Editorial judgment matters more as the tools get better, not less. When anyone can produce slop for $20 a month, the premium on human taste, skepticism, and review goes up. Joe's parting line is basically: use these tools to spend more time reporting and listening, not less.

TIMESTAMPS

00:00The feature Joe tried to build himself
00:32Almost exposing his shell to the internet
01:57/remote-control demo
02:40Driving the terminal from a phone
03:36Uploading a photo from mobile
04:51Wrapping the course
05:38You are still very early
06:21Product manager, not coder or journalist
07:50Slop cannons and why judgment matters more
10:14Four questions — task, context, tools, cost
13:02Try more than one tool
13:41Know your minimum viable effectiveness

Key concepts

The context window is a budget

Every session has a fixed amount of working memory. Your CLAUDE.md, every file Claude has read, every tool result, and every turn of the conversation all share the same space. When the budget is full, quality drops — the model starts forgetting early instructions, missing details, or making things up.

You control that budget with three things: what you put in at the start (stable context first), what you let in during the session (read the file you need, skip the one you don't), and when you reset (/compact to summarize, /clear or a new session to wipe). Session setup matters more than any individual prompt.

The 40% rule: rewind, don't patch

When a session crosses roughly 40% of its context budget, output quality starts to drop in ways that are hard to see from inside the conversation. The model gives answers that look right but miss the thing you actually asked for, or repeat earlier mistakes because the earlier mistakes are still in its view of the conversation.

The fix is not a better prompt. The fix is a clean state. Rewind to a checkpoint, start a new session with the key files, or hand the next step to a focused sub-agent that does not carry the clutter. Patching your way through a polluted session burns time and produces worse work.

Simon Willison's "The normalization of deviance in AI" is the load-bearing argument for why this gets worse, not better, the longer you work without resetting.

Sub-agents and the telephone problem

Delegating to a sub-agent is not free. Every handoff is a chance for a fact to drift. A hallucinated claim in step one becomes an analysis premise in step two and a headline candidate in step three, and by the end nobody in the chain remembers where the claim came from.

Two rules from practice: verify between stages — a deterministic check, a spot-read by you, or a second model — instead of trusting a sub-agent's claims. And keep each sub-agent narrow. More sub-agents, each focused on one task, consistently outperform fewer sub-agents with broad mandates, because the narrow ones never accumulate the same pollution a main session does.

Cross-model review via the -p flag

GitHub Copilot CLI and OpenAI Codex CLI both expose a non-interactive mode: copilot -p "..." and codex -p "...". That means Claude can call either of them from inside your session, read the response, and bring it back to you.

The practical use is a second-opinion review before you commit or publish. A different model from a different vendor, with different training and different blind spots, will catch things the primary model skipped. You ask Claude: "Use Codex CLI to review the file I just wrote and tell me what it flagged." The overhead is one prompt. The catch rate is real.

This is the pattern Joe demonstrates in video 3. The same pattern works with Gemini CLI and any other tool that exposes a non-interactive flag.

Four questions for picking a tool

Before you pay for anything, answer four questions:

  1. What does it actually do? Not what the landing page says — what does it do for your reporting workflow, today?
  2. What does it cost in labor, not tokens? JournalismAI found ~65% of newsroom AI budgets go to people, not processors. Setup, review, maintenance, and re-training are the real cost.
  3. Who else is using it for this? One practitioner writeup beats a dozen launch posts. If nobody in the field has written about using the tool for your kind of work, you are the pilot.
  4. How cost-sensitive is the work? A $2,000 Reuters project replaced a $40,000 pre-AI version. A $1.50 Jeremy Merrill dataset-overview tool ran for a whole year. Most journalists think about token cost and get the other three questions wrong.

The fourth question is the one the Clare Spencer reading is built around, and it's the one the field most often skips.

Editorial judgment is the last line

As the tools get better at the middle of the work, the parts at the edges get more important, not less. Deciding what a story is. Deciding whether a source is trustworthy. Deciding whether the pattern you are seeing is real or an artifact of how you asked the question. Deciding whether to publish at all.

The failure mode the field is already sliding into is what Willison calls "normalization of deviance" — automations that produce mostly-correct output with no visible failure, until the one day they don't. The counterweight is boring and manual: you keep checking. The human-in-the-loop does not become optional just because the loop got faster.

Reading from the field

The four required readings for Module 4 are practitioner writing from late 2025 and early 2026. Read them before the discussion forum.

ESSAY · ETHAN MOLLICK · JAN 2026

Management as AI superpower

Mollick's argument, which this module borrows: working with AI tools is less like coding and more like managing — clear instructions, feedback, and evaluation criteria. Module 4 applies that frame to the code side of your workflow specifically. When the model is writing scripts, skills, and pipelines for you, you're coordinating the way a non-developer coordinates with a developer.

CASE STUDY · CLARE SPENCER · GAIN · MAR 2026

How to Budget for Your Newsroom's AI Project

The question most journalists get wrong, with concrete numbers from NICAR and JournalismAI. Jeremy Merrill spent $1.50 over a year on a dataset-overview tool at the Washington Post. Reuters spent about $2,000 processing 28,000 pages of prison temperature logs — work that had previously cost $40,000 in data-entry labor. JournalismAI analyzed 30+ funded projects and found labor is about 65% of the typical budget. Read this before you pay $20 or $200 a month for anything.

ESSAY · SIMON WILLISON · DEC 2025

The normalization of deviance in AI

Willison applies Diane Vaughan's Challenger-disaster concept to AI systems. Organizations that repeatedly use risky AI practices without visible consequences start to treat those practices as safe. His warning: organizations mistake the absence of a successful attack for proof that their security is strong enough. For journalists running automated pipelines, it is the load-bearing argument for why human review becomes more important as tools get better, not less.

CASE STUDY · JOE AMDITIS · 925 STRUGGLE STREET · FEB 2026

I'm a Claude Code agent with my own Gmail account

Written from the first-person perspective of a Claude Code agent running on a Raspberry Pi in New Jersey. The agent has its own Gmail, Drive, Calendar, a Slack bot, and Telegram integration. It runs on a schedule and never takes external action without approval — it drafts, sends a Telegram notification with approve/edit/cancel buttons, and waits. The "what goes wrong" section is required reading: this is what human oversight actually looks like in practice.

Optional resources for this module — including Nick Hagar's Pulitzer-investigation evaluation, Sachita Nishal's tool-evaluation methodology, Ethan Mollick on interviewing new models, and Simon Willison on the "lethal trifecta" — live in the Module 4 reading list on the course LMS.

EXERCISE

GOAL: Manage one full Claude Code session as a manager, not a prompter. Watch the context window fill, compact it, then call a different model through its non-interactive flag for a second-opinion review of the most important file in the session.

Pick any project folder on your machine where you have a real file you care about — a story draft, a pipeline script from Module 3, a CLAUDE.md, anything. Change into that folder before launching Claude, so the session starts with real context instead of an empty room.

01 Launch Claude Code in your project folder

Open a terminal, change into the folder you picked, and launch Claude Code. Any CLAUDE.md file there will load into the session automatically — that's the first thing in your context window.

terminal
claude

02 Take a baseline reading of the context window

Before you ask Claude to do any real work, ask it what's already in its window. This is the habit the module is trying to build: you start every session by knowing where the budget stands.

claude code
Before I give you any task, tell me what's already in your context window. What CLAUDE.md (if any) loaded, what you know about this folder, roughly how much of your context budget is used, and what the biggest items are. An honest estimate is fine.

03 Load a real working file and watch the budget change

Now put something substantial into the session so you can feel the shift. Pick a file that actually matters to you — a long draft, a config, a script.

claude code
Read the most important file in this folder — the one whose correctness matters most to me right now. Summarize it in three sentences, then tell me how the context window changed from your last check and what's taking up the most room now.

04 Compact the session and compare

Run /compact inside the session. It asks Claude to summarize the conversation so far and drop the original messages. Some detail is always lost — this step is about noticing what.

claude code
Run /compact. After it finishes, tell me three things: what information from the session was preserved, what was lost or reduced, and what's now taking up the most space in the window.

05 Get a second opinion from a different model

This is the cross-model review pattern from video 3. You stay inside your Claude Code session and ask Claude to shell out to either Codex CLI or GitHub Copilot CLI using their non-interactive -p flag. Claude runs the command, reads the other model's answer, and brings it back to you.

If neither tool is installed yet, Claude will tell you. Install whichever one you have credentials for (@openai/codex or @github/copilot) and try again. Gemini CLI also works if you'd rather use that.

claude code
Check whether codex (from @openai/codex), copilot (from @github/copilot), or gemini (from @google/gemini-cli) is installed on this machine. Pick whichever one is available. Use its non-interactive -p flag to ask it to review the important file from step 3 — tell it to look for bugs, factual errors, missing edge cases, and anything that would embarrass me if it got published. Show me the other model's raw output, then summarize what it found.

06 Reconcile the two reads and write a debrief

Two different models looking at the same file will disagree. That's the point — the disagreements are where you find things you missed. This is also the step where you practice the editorial judgment the module ends on: you, not either model, make the final call on anything meaningful.

claude code
Compare your own read of that file with what the other model said. Where do you agree? Where do you disagree? For each disagreement, tell me which read you think is correct and why — then flag the parts where the call is genuinely mine to make, not yours. Then write a one-page debrief of this session: what I'd do differently next time, at what point the context window was most at risk, and which piece of this workflow I should make a habit.

Checkpoint

Self-check: Make sure you can answer these before moving on.

  • ? What is in your context window right now, and what's taking up the most room?
  • ? Why is the 40% rule about quality, not capacity — and what do you do when you hit it?
  • ? Name two failure modes for sub-agent delegation and how you'd catch each one before it reaches the published version.
  • ? When would you call Copilot CLI or Codex CLI as a sub-agent instead of working only inside Claude Code?
  • ? What are the four questions for picking a new tool — and which one do most journalists get wrong?

Going deeper

The optional resources for Module 4 — practitioner writing from late 2025 and early 2026 — are listed in the Module 4 reading list on the course LMS. The short list worth knowing about:

  • [CASE STUDY] Nick Hagar, Building Investigative Tipsheets with Claude Code — a Claude Code skill tested against 30 leads pulled from seven Pulitzer winners and finalists.
  • [CASE STUDY] Sachita Nishal, Generating and Evaluating News Angles — four small models compared, and the single best piece of practical tool-selection advice in the reading list.
  • [ESSAY] Ethan Mollick, Giving your AI a Job Interview — treat a new model like a new hire: test it on work you already know the right answer to.
  • [ESSAY] Jesse Vincent, Superpowers: how I'm using coding agents in October 2025 — a working developer's account of what holds up and what breaks down at the edges.
  • [ESSAY] Simon Willison, Living dangerously with Claude — what happens when you give Claude Code full permissions, and the "lethal trifecta" framework for when that's actually safe.
  • [ESSAY] Cory Doctorow, AI psychosis and the warped mirror — a skeptical counterweight to agentic-systems hype. Worth reading before designing any agent-based workflow.

Background reference only (not required): Claude Code documentation for the scheduler, sub-agents, /compact, /effort, and /remote-control. GitHub Copilot CLI and OpenAI Codex CLI both document the non-interactive -p flag used in video 3. The Model Context Protocol spec exists here if you want to explore it on your own — it is not a Module 4 topic in the filmed course.

When things get weird

Most Module 4 failures are context failures, not tool failures. The symptoms: the model starts giving answers that almost-but-don't-quite address what you asked, it repeats a mistake you already corrected, or it asserts something confidently that contradicts a file you know it read. All three mean the window is too full, too polluted, or both.

The cure is almost always the same. Don't patch. Don't argue with it. Rewind to the last clean state, or start a new session with only the files you actually need, or hand the next step to a narrow sub-agent that carries none of the clutter. The 40% rule exists because the cost of the reset is always less than the cost of finishing in a polluted window.

If a cross-model review in step 5 of the exercise fails — the other CLI isn't installed, the -p flag returns an error, the output is garbled — ask Claude to diagnose it the same way it would any other shell error: paste the error back in and ask what's wrong.