Course contents

Context Hygiene Cheatsheet

The one fact everything follows from: the agent's memory (context window) is finite, and it gets dumber as it fills. Clean context is free intelligence, and cheaper tokens. Same habit, both wins.

The habits

Habit When
/context Glance at it like a fuel gauge, every session
/clear Between unrelated tasks, always
Focused sessions One task per session; open with the task, not "let's improve things"
/compact Long session, still mid-task, running low, a blunt tool; prefer /clear when the task changed
Revert + /clear + better prompt After two failed corrections on the same thing
Subagents "Use a subagent to investigate X", research happens in a separate memory, you get the summary
Point, don't sweep Name the files to read; never "look at everything"

CLAUDE.md rules

Save/restore (relay-race development)

End every session on purpose; open every session where you left off:

This pair is how you get a fresh, sharp window without losing the plot. Many short, sharp sessions beat one long one losing its mind.

No-tools fallback (works in any agent, forever): end with "summarise what we did, what we decided, what's next, and which files the next session should NOT bother re-reading", save it as HANDOFF.md, and paste it into the fresh session.

Token economy (the same habits, priced)