MiniCTRMSearch

MiniCTRM - Build Tutorial 504: Managing the context: the conductor, subagents and compaction

→ to begin · N for the speaker notes

On a phone: Next or a swipe left to begin, Notes for the words.

What you'll learn

A practice repository set up for long sessions - a status file a fresh session resumes from, shared names, compact instructions in CLAUDE.md and an earlier compaction setting - and one run of the conductor pattern with two workers, each in its own worktree.

  • Why the context matters – Three costs that grow with it: time and money, attention, and compaction risk.
  • What you can and cannot control – The levers, who pulls each, and a look at your own window.
  • State on disk – Every fact the work needs later written to a file, and a fresh session resuming from the files alone.
  • The conductor pattern – A main session that builds nothing, workers with contexts of their own, and short reports.
  • Compacting earlier – A smaller window for automatic compaction, and why not smaller still.
  • Smaller habits – The everyday habits that keep a context lean.
  • If you are watching – When a compaction by hand helps, and how to tell it what to keep.
  • Where the course does this – Lesson 811's run and the fresh check of lesson 525.

Before you start

The lessons this one builds on: 501 Meet Claude Code: install, sign in, your first conversation, 502 Working well with Claude: plan, do, verify, commit; which model, how much effort, 503 Git and GitHub: branches, pull requests, merges, main and CI.

Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.

Welcome

The scarcest thing in a long session

1 / 15
The scarcest thing in a long session
Why the context matters

Three costs that grow with the context

2 / 15
Three costs that grow with the context
What you can and cannot control

The levers, and who pulls each

3 / 15
The levers, and who pulls each
What you can and cannot control

Look at your own window

4 / 15
Look at your own window
State on disk

A compaction is harmless when nothing lives only in the conversation

5 / 15
A compaction is harmless when nothing lives only in the conversation
State on disk

Write the state down

6 / 15
Write the state down
State on disk

The test: a fresh session resumes from the files alone

7 / 15
The test: a fresh session resumes from the files alone
The conductor pattern

A main session that builds nothing

8 / 15
A main session that builds nothing
The conductor pattern

Conduct two workers

9 / 15
Conduct two workers
Compacting earlier

Compact earlier, but not too early

10 / 15
Compact earlier, but not too early
Compacting earlier

Set the window, and commit

11 / 15
Set the window, and commit
Smaller habits

Smaller habits that keep the context lean

12 / 15
Smaller habits that keep the context lean
If you are watching

Compact by hand, at a boundary, with focus

13 / 15
Compact by hand, at a boundary, with focus
Where the course does this

Where the course works this way

14 / 15
Where the course works this way
What you have now

What you have now

15 / 15
What you have now

You have finished lesson 504, Managing the context: the conductor, subagents and compaction.

Where next?

← → move · N notes · Home / End