Okay, but we're not going to go back to Snarky Claude. We're going to go to normal old boring
stuffy Claude. You can feel free to keep going with Snarky Claude if that's what you wish.
Okay, and now we're just going to do some proper stuff so I can show you within this
particular session how we can rewind. So what should we start with? Please summarize the project.
And then I will go ahead and ask a bunch of stuff. I'll ask it to do a code review again
and to draw an architecture diagram and I will see you back in a minute. Actually,
I'm going to do it while you watch because I'm going to show another
shortcut key. Okay, so I'm going to say please do a code review and write results
to review.md in the docs directory. And we'll leave that running. And while we do it,
I'm going to press ctrl-o which is the way to see the detail. Look at that. And ctrl-e is to show
all and e again to collapse. So we can see everything that's going on in this thinking
trace here. And this is if you want all the gory detail of what's happening in the
agent's mind as it's thinking this through. You can also see the ctrl-b is a way that you
could have this go off and run in the background while you keep going with more commands. But here
we go. We can see it doing its thing, exploring the code base. You can see the model on the bottom
right. Okay. And I'm now going to leave this running while you should do it too and watch
that trace. Use this as a way of getting a little bit of insight into how the model runs and I will
see you back in a second. Okay. And it's made all of those changes and it's showing it up here in
the screen. And I'm going to say yes, allow all edits during the session. Pressing number two.
So that's been accepted and that has happened. And it's now just writing some more. But again,
I want to show you if I press ctrl-o, I can go through this and you'll see tons and tons of
information here about everything that it worked on. And come back down here again to the bottom
and ctrl-o to sort of release that. So yeah, that has done its thing and written a long
code review. And I do believe, I think I saw when I was looking through the transcript,
that it's made the same mistake again. Yeah, the exposed API key. I suppose it's the same,
it's using the same sub-agent that's making the same mistake. So once more, it has failed with
that. Let's just try, since we're going to do some checkpointing, let's just try saying,
are you sure that the API key is exposed? Let's not tell it that it's in gitignore. Let's see if
it can work that one out for itself. Give it a moment to think about that. And yeah, then I will
see you back. And we'll then try looking back, doing the rewind, going back through the
checkpointing. Okay, and just based on that simple challenge, it did indeed spot that it was wrong,
that there wasn't a key exposed. It corrects itself and updated all of the files. And again,
you get this output here, ctrl-o, and you get to see all of its thinking and what it's doing
and how it's making its changes. So ctrl-o is worth doing if you want to really dig into the
detail there. Okay, at this point, we're now going to just look at the checkpoints to see
how that works. So first of all, if we look at the review, we can see that the review does not have
the critical issue of the .env file, the wrong critical issue. Let's now try and see if we can
rewind one step to before I gave it that hint. So I'm going to do slash rewind, and you just type
rewind and press enter. And now you can see, as we go down, it's similar to the sessions resuming.
You can see how we can go back to these different sections of, and I'm pressing, the current is
where the arrow is set right now. If I press the up button, we go up to, are you sure that the API
key is exposed? And that would take us back to before I sent that. And then before that is,
please do a code review. And before that is, please summarize the project. So let's press there.
And now we can choose, do we want to restore both the conversation, the chat we were having to that
point, but also the code as well, because it will track back, it will undo that change to markdown,
or just the conversation, or just the code, or nevermind, forget it. Let's do both. Let's go
back in time, back we've got. And now you can see that it's put my message on the prompt there.
But if I come back here to review.md, we can see that there is now again, that high security key,
the code has been reverted. So both the context of conversation with the model, and also it's
the code, the state of the code has been reverted back to that checkpoint. So that hopefully has
given you some clarity on the difference between checkpoints and rewinding the checkpoint in the
current, in the session that you're in versus saving a whole session and resuming Claude from
a previous session, which is a sort of bigger deal and doesn't involve changing the code.
It's just about going back to that state of the context. Those are the two concepts that we've
worked through. And next up, we're going to have some fun. So look, I mentioned earlier when we were,
we were doing shift tab, and we were saying automatically accept edits. I sort of coyly
called that YOLO, and it's not YOLO at all. It's just about saying that we'll automatically approve
diffs rather than stopping at each, each one of the diffs. YOLO is a bigger deal, as you know,
from the times we've done it before. And you can do YOLO with Claude code, and it's where YOLO began,
I think, is what caused the whole movement. And that's what we're going to do next. We're going
to do YOLO, and then we're going to do YOLO on steroids. And that will then, that will be the,
the, the, the end of our, of our living dangerously for today. Okay, but before we do that, we're going
to just check everything in. We're going to do a git add dot. I think we've only just got a couple
of changes to files. I also, I deleted the code review, so there's nothing like that in there.
Git commit minus M before YOLO, before YOLO, before YOLO. There we go. Done. All right.
Clear the screen. It's time for me to show you the trick of the day.