Steering Claude Code Through Hours-Long Sessions: Plan Mode, Compact, Rewind, Goals — Transcript
Full transcript
- 0:02You can prompt Claude and watch it
- 0:03finish a quick task, but running a long
- 0:05one is much harder. Refactoring across a
- 0:07dozen files or implementing a new
- 0:09feature can take hours, and if you
- 0:10aren't steering Claude in the right
- 0:11direction, it can potentially take
- 0:13longer. But, there are many ways to help
- 0:15Claude during these long sessions.
- 0:18There are two important habits. The
- 0:20first is to scope the work before Claude
- 0:22starts. So, if you use plan mode, Claude
- 0:24will do the research in read-only mode
- 0:26and hand you a plan.
- 0:28Once the plan has been provided,
- 0:29actually read through it. The more
- 0:31thorough the plan, the less likely that
- 0:32you're going to have hiccups when Claude
- 0:34executes. And when it comes to revising
- 0:36the plan, just ask Claude to add it
- 0:38where you want. It's much faster to
- 0:39iterate over a plan than it is to simply
- 0:42hope for the best. The second habit is
- 0:44to steer Claude in the right direction.
- 0:46And here are some ways that you can do
- 0:47that.
- 0:49Compact summarizes your conversation and
- 0:51uses that as a new context while
- 0:53deleting the old, freeing up your
- 0:55context window. However, there is a risk
- 0:57that something important will be
- 0:59removed, causing Claude to drift in the
- 1:01wrong direction. So, when you do the
- 1:02compact command, add in the changes you
- 1:04want. And adding instructions after the
- 1:06command tells Claude how to summarize.
- 1:08So, if you were done debugging a while
- 1:09ago, but want to just focus on those API
- 1:11changes, well, here you can do that.
- 1:15When Claude goes down the wrong path,
- 1:17you don't have to prompt your way out of
- 1:19it. Rewind brings you to the last
- 1:20checkpoint. To open it, double tap
- 1:22escape on an empty prompt, and you'll
- 1:24get the rewind menu. Every user prompt
- 1:27creates a checkpoint that you can revert
- 1:28back to with different options. One, you
- 1:31can restore the code, conversation, or
- 1:33both. Two, summarize from here will
- 1:35summarize everything after the
- 1:37checkpoint. Great if you had a side
- 1:39conversation and just want to free up
- 1:40some space. And summarize up to here
- 1:42will summarize everything before the
- 1:44checkpoint. So, this is great if you
- 1:46want to summarize a long setup phase,
- 1:48but keep the implementation parts.
- 1:51When we talk about steering, we assume
- 1:53that you are hands-on. If you want
- 1:55something a little bit more autonomous,
- 1:57there is the goal and loop.
- 1:59Goal sets a completion condition. You
- 2:01describe what done looks like and Claude
- 2:03keeps working across turns until a fast
- 2:06evaluator confirms that those conditions
- 2:07have been met. Instead of just stopping
- 2:10for the first time it thinks it's
- 2:11finished. So for example, I could do
- 2:13slash goal, all tests in source billing
- 2:15pass and the type checker reports zero
- 2:17errors. Doing slash goal clear will
- 2:19cancel it. And one constraint here is
- 2:21that the evaluator only reads the
- 2:23transcript, so the condition has to be
- 2:25checkable from the output that Claude
- 2:26produces, like the test results that it
- 2:28ran. Loop runs a prompt on an interval
- 2:30between turns fixed or self-paced. Use
- 2:33it to pull something external like a CI
- 2:35run or a deploy and act when the state
- 2:37changes. You can press escape to stop
- 2:39it.
- 2:41So our steering metaphor assumes one
- 2:43steering wheel in one car, but when
- 2:45we're working with multiple agents on
- 2:47the same code base, we don't want to
- 2:48have two steering wheels in one car.
- 2:51Well, that's just unsafe.
- 2:52This is where work trees come in. It
- 2:54prevents two or more Claude sessions
- 2:56from fighting over files in a
- 2:57repository. This prevents conflicts by
- 2:59having three independent file trees. On
- 3:02exit, a clean work tree is auto removed.
- 3:04A dot work tree include file at the repo
- 3:06root lists get ignored files to copy
- 3:08into each work tree, which is useful for
- 3:11a environment variable file or a local
- 3:13configuration that you need but don't
- 3:15want to commit into the version control.
- 3:23When it comes to handling long Claude
- 3:24code sessions, scope your work first and
- 3:26then steer. Direct your compaction so
- 3:28the summary keeps what matters. Use the
- 3:30rewind menu to course correct. Set a
- 3:32goal when you can describe done better
- 3:33than you can describe the steps and run
- 3:35parallel work in work trees. Do that and
- 3:37you can trust a long run without
- 3:39babysitting it.
About this transcript
This page contains the full transcript of Steering Claude Code Through Hours-Long Sessions: Plan Mode, Compact, Rewind, Goals by Claude, generated from the public captions YouTube serves with the video. The transcript has 731 words across 110 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.