This lesson is being recorded
Every video of this course is being uploaded to my YouTube channel. Subscribe so you do not miss it.
Module 4 · Lesson 4.5 · 13 min
Managing Long Sessions
Keep answers sharp in long working sessions using /context, /compact, /clear and a simple handover note.
Use ← → to move. The marker highlights text and the pencil draws on the slide; navigation locks while you annotate. Undo removes the last mark, Esc exits.
1Check the desk regularly
Run /context when a session has been going for a while or answers start to drift. If the context is mostly full, it is time to act, before quality drops.
/context2Compact when you are mid-task
/compact summarises the conversation so far and frees space, while keeping the thread of the task. You can tell it what to keep. Claude Code also compacts automatically when the window gets full, but doing it yourself at a natural break gives you control over what is kept.
/compact Keep the pricing decisions, the client list we agreed and the open questions. Drop the drafts we rejected.3Clear between unrelated tasks
Finished the sales analysis and starting on a marketing email? Type /clear. A clean start is faster, cheaper and more accurate than dragging the old task along. Your CLAUDE.md loads again automatically.
/clear4Write a handover note before you stop
Anything said only in conversation can be lost. At the end of a long task, ask Claude to write a short handover note to a file, and to move lasting rules into CLAUDE.md. Tomorrow you start from the note, not from memory.
We are stopping for today. Write a handover note to reports/handover.md: what we did, decisions made, files created, open questions and the next three steps. Then tell me if any of today's decisions should become permanent rules in CLAUDE.md.5Pick up where you left off
Claude Code can resume earlier conversations, and a handover file makes any fresh session productive in one message. For most business work, a fresh session plus the note beats resuming a huge old conversation.
claude --continueYou have probably noticed it. The first hour with Claude is brilliant. By the third hour, it repeats itself, forgets a decision you made at lunch and starts to feel slower. That is not fatigue. It is a crowded desk.
Long sessions fill the context window with old files, old drafts and dead ends. The fix is a few simple habits: check the desk, summarise it when it gets full, start fresh between tasks, and save important decisions somewhere permanent.
Key points
- Long sessions crowd the context and quality drops.
- /context shows how full the desk is.
- /compact summarises and frees space mid-task.
- /clear starts fresh between unrelated tasks.
- Save decisions in a handover note or CLAUDE.md, not only in chat.
Avoid
- Running one conversation all day across unrelated tasks.
- Making important decisions only in chat and never writing them down.
- Waiting for answers to go bad before checking /context.
- Resuming a huge old session when a fresh one plus a note would be better.
Priya spent a full afternoon with Claude rebuilding her product descriptions for 120 items. Around item 70 the tone started drifting back to generic. She ran /context, saw the window was nearly full of old drafts, and ran /compact asking it to keep the approved voice examples. Quality came back immediately. She now writes a handover note after every batch of 30 and starts the next batch fresh.