1
00:00:00,000 --> 00:00:05,599
Okay, but we're not going to go back to Snarky Claude. We're going to go to normal old boring

2
00:00:05,599 --> 00:00:09,600
stuffy Claude. You can feel free to keep going with Snarky Claude if that's what you wish.

3
00:00:10,560 --> 00:00:15,039
Okay, and now we're just going to do some proper stuff so I can show you within this

4
00:00:15,039 --> 00:00:20,239
particular session how we can rewind. So what should we start with? Please summarize the project.

5
00:00:23,680 --> 00:00:28,479
And then I will go ahead and ask a bunch of stuff. I'll ask it to do a code review again

6
00:00:29,120 --> 00:00:32,319
and to draw an architecture diagram and I will see you back in a minute. Actually,

7
00:00:32,319 --> 00:00:34,240
I'm going to do it while you watch because I'm going to show another

8
00:00:34,880 --> 00:00:42,159
shortcut key. Okay, so I'm going to say please do a code review and write results

9
00:00:44,799 --> 00:00:55,040
to review.md in the docs directory. And we'll leave that running. And while we do it,

10
00:00:55,040 --> 00:01:02,400
I'm going to press ctrl-o which is the way to see the detail. Look at that. And ctrl-e is to show

11
00:01:02,400 --> 00:01:08,639
all and e again to collapse. So we can see everything that's going on in this thinking

12
00:01:08,639 --> 00:01:14,239
trace here. And this is if you want all the gory detail of what's happening in the

13
00:01:18,319 --> 00:01:22,160
agent's mind as it's thinking this through. You can also see the ctrl-b is a way that you

14
00:01:22,160 --> 00:01:26,800
could have this go off and run in the background while you keep going with more commands. But here

15
00:01:26,800 --> 00:01:32,800
we go. We can see it doing its thing, exploring the code base. You can see the model on the bottom

16
00:01:32,800 --> 00:01:39,760
right. Okay. And I'm now going to leave this running while you should do it too and watch

17
00:01:39,760 --> 00:01:44,239
that trace. Use this as a way of getting a little bit of insight into how the model runs and I will

18
00:01:44,239 --> 00:01:48,879
see you back in a second. Okay. And it's made all of those changes and it's showing it up here in

19
00:01:48,879 --> 00:01:54,800
the screen. And I'm going to say yes, allow all edits during the session. Pressing number two.

20
00:01:54,800 --> 00:02:00,559
So that's been accepted and that has happened. And it's now just writing some more. But again,

21
00:02:00,559 --> 00:02:05,680
I want to show you if I press ctrl-o, I can go through this and you'll see tons and tons of

22
00:02:05,680 --> 00:02:12,639
information here about everything that it worked on. And come back down here again to the bottom

23
00:02:12,639 --> 00:02:20,720
and ctrl-o to sort of release that. So yeah, that has done its thing and written a long

24
00:02:20,720 --> 00:02:24,080
code review. And I do believe, I think I saw when I was looking through the transcript,

25
00:02:24,080 --> 00:02:30,320
that it's made the same mistake again. Yeah, the exposed API key. I suppose it's the same,

26
00:02:30,320 --> 00:02:35,600
it's using the same sub-agent that's making the same mistake. So once more, it has failed with

27
00:02:35,600 --> 00:02:39,440
that. Let's just try, since we're going to do some checkpointing, let's just try saying,

28
00:02:39,440 --> 00:02:46,800
are you sure that the API key is exposed? Let's not tell it that it's in gitignore. Let's see if

29
00:02:46,800 --> 00:02:55,759
it can work that one out for itself. Give it a moment to think about that. And yeah, then I will

30
00:02:56,960 --> 00:03:02,800
see you back. And we'll then try looking back, doing the rewind, going back through the

31
00:03:02,800 --> 00:03:09,199
checkpointing. Okay, and just based on that simple challenge, it did indeed spot that it was wrong,

32
00:03:09,199 --> 00:03:14,559
that there wasn't a key exposed. It corrects itself and updated all of the files. And again,

33
00:03:14,559 --> 00:03:19,600
you get this output here, ctrl-o, and you get to see all of its thinking and what it's doing

34
00:03:19,600 --> 00:03:24,160
and how it's making its changes. So ctrl-o is worth doing if you want to really dig into the

35
00:03:24,160 --> 00:03:28,240
detail there. Okay, at this point, we're now going to just look at the checkpoints to see

36
00:03:28,240 --> 00:03:33,839
how that works. So first of all, if we look at the review, we can see that the review does not have

37
00:03:33,839 --> 00:03:39,759
the critical issue of the .env file, the wrong critical issue. Let's now try and see if we can

38
00:03:39,759 --> 00:03:47,759
rewind one step to before I gave it that hint. So I'm going to do slash rewind, and you just type

39
00:03:47,759 --> 00:03:54,800
rewind and press enter. And now you can see, as we go down, it's similar to the sessions resuming.

40
00:03:55,360 --> 00:04:01,360
You can see how we can go back to these different sections of, and I'm pressing, the current is

41
00:04:01,360 --> 00:04:07,039
where the arrow is set right now. If I press the up button, we go up to, are you sure that the API

42
00:04:07,039 --> 00:04:13,360
key is exposed? And that would take us back to before I sent that. And then before that is,

43
00:04:13,360 --> 00:04:17,200
please do a code review. And before that is, please summarize the project. So let's press there.

44
00:04:18,000 --> 00:04:24,239
And now we can choose, do we want to restore both the conversation, the chat we were having to that

45
00:04:24,239 --> 00:04:30,480
point, but also the code as well, because it will track back, it will undo that change to markdown,

46
00:04:30,480 --> 00:04:35,920
or just the conversation, or just the code, or nevermind, forget it. Let's do both. Let's go

47
00:04:35,920 --> 00:04:41,359
back in time, back we've got. And now you can see that it's put my message on the prompt there.

48
00:04:41,359 --> 00:04:48,640
But if I come back here to review.md, we can see that there is now again, that high security key,

49
00:04:48,640 --> 00:04:55,119
the code has been reverted. So both the context of conversation with the model, and also it's

50
00:04:55,119 --> 00:05:00,959
the code, the state of the code has been reverted back to that checkpoint. So that hopefully has

51
00:05:00,959 --> 00:05:06,480
given you some clarity on the difference between checkpoints and rewinding the checkpoint in the

52
00:05:06,480 --> 00:05:12,799
current, in the session that you're in versus saving a whole session and resuming Claude from

53
00:05:12,799 --> 00:05:17,760
a previous session, which is a sort of bigger deal and doesn't involve changing the code.

54
00:05:17,760 --> 00:05:22,720
It's just about going back to that state of the context. Those are the two concepts that we've

55
00:05:22,720 --> 00:05:28,399
worked through. And next up, we're going to have some fun. So look, I mentioned earlier when we were,

56
00:05:28,399 --> 00:05:33,359
we were doing shift tab, and we were saying automatically accept edits. I sort of coyly

57
00:05:33,359 --> 00:05:39,040
called that YOLO, and it's not YOLO at all. It's just about saying that we'll automatically approve

58
00:05:39,040 --> 00:05:44,959
diffs rather than stopping at each, each one of the diffs. YOLO is a bigger deal, as you know,

59
00:05:44,959 --> 00:05:50,640
from the times we've done it before. And you can do YOLO with Claude code, and it's where YOLO began,

60
00:05:50,640 --> 00:05:56,320
I think, is what caused the whole movement. And that's what we're going to do next. We're going

61
00:05:56,320 --> 00:06:02,079
to do YOLO, and then we're going to do YOLO on steroids. And that will then, that will be the,

62
00:06:02,079 --> 00:06:07,760
the, the, the end of our, of our living dangerously for today. Okay, but before we do that, we're going

63
00:06:07,760 --> 00:06:12,480
to just check everything in. We're going to do a git add dot. I think we've only just got a couple

64
00:06:12,480 --> 00:06:16,880
of changes to files. I also, I deleted the code review, so there's nothing like that in there.

65
00:06:16,880 --> 00:06:26,480
Git commit minus M before YOLO, before YOLO, before YOLO. There we go. Done. All right.

66
00:06:27,200 --> 00:06:32,000
Clear the screen. It's time for me to show you the trick of the day.