Ch.2: Claude Code Fixed My Bug Without Opening an Editor
Outline
- 0:00 Introduction
- 0:15 One Sentence, Four Actions
- 1:23 Installation: Pick Your Path
- 2:32 Just a Cursor
- 3:25 The 30-Second Bug Fix Walkthrough
- 4:34 The Sudo of AI: Permission Prompts
- 4:52 Trust Levels (Ch. 3 Preview)
- 5:20 The Checkpoint System
- 6:03 Three Ways to Rewind
- 8:30 Pick Up Where You Left Off
- 9:56 From Writer to Editor
- 11:06 Next: The Permission Model
Transcript
0:00 Picture this. You can fix a bug in your code base in exactly 30 seconds without ever opening your editor. Right, which sounds completely absurd. It totally does. Right. But you literally type just one sentence into your terminal and green tests come out the other side. Just like that. Yeah. Welcome to the Deep Dive, everyone. We are continuing our 19-part series on Claude code for any software engineer. And today's mission is unpacking chapter two, which is your first session. Right, because we're finally moving past the theory now.
0:28 Exactly. We covered the agentic tools theory and the mental model shifts last time. Today, we're stepping directly into what it actually feels like to use a terminal native agent step by step. But before we jump in, we do need a crucial disclaimer for you listening. Today is Sunday, March 29th, 2026. Yeah, and Claude code ships weekly updates. It moves fast. Incredibly fast. So some specific interface details or command flags we mentioned today, they might have evolved by the time you're hearing this.
0:56 But the core workflows and philosophies, those are going to remain deeply relevant. For sure. So to get to that magical 30-second bug fix, we first need to look at how this tool embeds itself into your existing daily environment, right? From zero to prompt. Yeah, the setup, which surprisingly is virtually frictionless. It takes under two minutes. I mean, that's what they claim, but it really is that fast. It really is. You use a native installer script. So that's Claude.ainstall.sh via bash for Mac and Linux, or the PowerShell equivalent if you're on Windows.
1:31 And I want to point out a specific detail here, because as engineers, we love our package managers, Oh, yeah, absolutely. We want to use Homebrew on Mac or WinGet on Windows. Yeah. But the native installer is heavily recommended here. Yeah, and there's a very good reason for that. The native script sets up a daemon that auto-updates silently in the background. Which is huge. Right, because if you use Homebrew or WinGet, you're stuck doing manual updates, and with weekly ships, you're going to fall behind instantly.
1:56 Also, side note, if you remember the old NPM installation method? Oh, yeah, the global NPM installs. Yeah, that's been totally deprecated by Anthropic. They want you on the native binaries. So, okay, you install it, you authenticate in your browser, and then you just type Claude and press enter. And honestly? Why? It feels radically different from other modern AI tools. How so? Well, there's no splash screen, there's no tutorial wizard popping up, no bloated sidebar crammed into your IDE. It is literally just a blinking terminal cursor.
2:29 It's just you in the shell. Exactly. It's like opening a blank terminal window, but instead of needing exact bash syntax, you just use plain English. It's deceptively simple. But I gotta ask, doesn't that blank screen feel a bit, I don't know, intimidating if you don't actually know what to ask it? I mean, sure, the blank canvas syndrome is real, but that simplicity is entirely the point. Really? Yeah. The power of this tool isn't in some flashy UI. The power is the fact that this simple text prompt is directly, physically wired into your file system, your shell, and your project.
3:01 Oh, right. Because a normal chatbot has no hands. Exactly. You type in intent, and this agent actually has the hands to execute it. Okay. Let's walk through that exact scenario from the source material. The 30-second fix. So picture this. You have a Python project. You're running your suite. And a test in test_utils.py is failing. Standard Tuesday afternoon. Right. So instead of hunting it down, you just type, fix the failing test in test_utils.py. That's it. And that kicks off the action loop the agent takes over.
3:33 First, it reads the test file. Using its internal tools. Yeah. It reads the file. It spots the failing assertion. Then, and this is the cool part, it reads the imported source file to find the actual logic. It traces the imports itself. It does. It realizes, oh, this function is returning a list, but the test expects a tuple. So it proposes a diff to fix it. And then why? Then it automatically runs Python dash and PyTest test_utils.py. And this loop just continues until the tests are green. Wow. Okay. But there is a catch here, isn't there? Because when I first tried this, it wasn't just magic running in the background.
4:05 It stops you constantly. Ah, yes. The permission prompts. Right. Before every single one of those steps you just mentioned, Claude Code stops and asks for permission. Can I read this file? Yes. Can I edit this code? Yes. Can I run PyTest? Yes. It's a lot of friction. It is deliberate friction, though. And that makes sense once you shift your mindset. I was thinking about this, and it's exactly like the sudo prompt in Unix. That is a perfect analogy. Because you're dealing with an entity that can execute arbitrary shell commands.
4:36 It can delete files. It can rewrite your git history. It has root access to your project, basically. Exactly. So just like sudo, you get to decide exactly how much trust to grant it. You can approve an action once, or you can use approve session to let it run wild for that specific task, or you can just deny it entirely. And that explicit approval process builds trust over time. You're acting as the supervisor. But that leads perfectly to the next big question. What happens when it completely breaks your code?
5:03 Exactly. Because it will happen. You approve a diff, it looks fine, and suddenly your app won't compile. Which is terrifying if it's editing multiple files at once. Right. But there's a massive safety net built right in. The checkpoint system. Okay, tell me about the checkpoints. Do I need to set up a config file for this? No configuration required at all. Every single time Claude Code edits a file through its internal tools, it silently and automatically creates a checkpoint. Oh, wow. Yeah, it takes a snapshot of the file state just before making the change.
5:35 So how do you actually access that? Like, if a fix goes sideways and my terminal is just spewing errors. You just press the escape key twice in quick succession, double tap escape. Just tap, tap, and it stops. Yep. It opens the rewind menu, which drops down right in your terminal. It shows a complete timeline of your current session. That's super clean. And from there, you get three distinct restore options to roll back the clock. Okay, walk me through the options. Option one is the nuclear one.
6:02 You restore both the code and the conversation. It's basically as if the last few minutes never even happened. Code will reset. I like that. What's option two? Option two restores the conversation only. So it keeps the new code. Maybe the agent wrote something brilliant but then got confused in the chat, but it rewinds the agent's memory. So you wipe its context window, but keep the files on your hard drive. Exactly. Clear its head, keep the progress, and option three is the exact opposite. Okay, restoring the code only.
6:32 Right. You revert the files back to how they were before the break, but you keep the conversation history intact. Wait, why would I want to keep the memory of a failed attempt? Because the agent remembers what it just tried. It knows that specific approach failed, so it won't try it again. It learns from the mistake. Oh, that is wild. So it's essentially a micro-Git safety net inside a single session. That's exactly what it is. Because as engineers, you know, we already trust Git version control to let us experiment fearlessly.
7:02 We make weird branches all the time. But with this, you don't have to commit every tiny granular tweak because Claude code is keeping track of it for you. Yeah, and it keeps those checkpoints for up to 30 days, actually. That's fantastic. But there's a limit to this, right? It can't track everything. I am so glad you brought that up because this is a crucial caveat that trips people up. This micro-Git system, it only tracks direct edits made by the agent's internal tools. Meaning what exactly? Meaning if Claude code runs a shell command that modifies files as a side effect, like running an install script or an NPM update, Oh, you're right.
7:38 those changes are absolutely not tracked by the checkpoint system. So if it runs a shell script that drops my database or deletes a folder, double tapping escape isn't going to save me. Nope. You are on your own. You'd better hope you committed to actual Git before you hit approve. Got it. So the sudo rule applies heavily to shell commands. Yes. Always read what shell command it wants to run. Good to know. Okay. So we've got checkpoints. We've got approvals. Let's talk about the reality of an actual workday.
8:06 Interruptions. Exactly. You're deep in the middle of a debugging session. You've got all this context built up with the agent, but then you need to close your terminal where you got to grab a coffee or your laptop dies. Right. The context switch. Yeah. How do you get back? Do you lose all that session history when the terminal closes? Not at all. The continuity is honestly one of the best parts. You just pop your terminal back open and type Claude continue or just Claude dash c for short. It just boosts it back up.
8:32 It reloads your most recent conversation with full history, all the tool results, all the context completely intact. That is seamless. It is. And a cool little trick, you can even append a new prompt right after the flag. So Claude dash c, actually, let's look at the database now. It just picks right up and pivots. Nice. What if I'm juggling multiple tasks? Like I have a front-end bug on one branch, but a back-end ticket on another. They've got you covered there too. There's a resume flag. Every session has a unique identifier, so you can just list them and pick the specific session you want to jump back into.
9:06 So between the sudo-like permissions, the Git-like checkpoints, and the session continuity, it really feels like the tool is designed to work with a developer's natural rhythm. It's not forcing a new proprietary IDE paradigm on you. It just lives where you already work. Exactly. It respects your workflow. Okay. Looking at the big picture here, what are the key takeaways for you listening? We've gone from a single English sentence at a blank prompt to a fully executed test -verified bug fix. Safely managed through silent checkpoints.
9:41 Right. And through deliberate permission friction, which fundamentally shifts your mental energy, doesn't it? It's a massive shift. Instead of getting bogged down in syntax hunting or running PyTest manually 50 times, your job elevates. You become an editor. Exactly. You're stating the intent, you're reviewing proposed diffs, and you are managing the trust boundary. And that trust boundary is something we're going to expand on heavily in the next deep dive. Oh, definitely. Chapter 3 is all about managing that trust.
10:08 We'll be covering the six-termission modes and how to set up allow and deny rules. Which is going to be super important for enterprise code bases. Oh, absolutely. And later on, we'll get into Claude.md project configs, context window management, and my personal favorite sub-agents. We're not teaching that today, obviously, but just know there's a lot of depth coming. So much depth. But before we wrap up, I want to leave you with a final thought. Something to just mull over while you're writing your next bash script.
10:33 Okay. Lay it on me. If our daily engineering work shifts entirely from writing the actual lines of code to simply reviewing and approving an agent's proposed diffs, how is that going to fundamentally change the way we learn, internalize, and map out the architecture of our own code bases over the next few years? Wow. Yeah. If you're not writing it, do you truly understand how all the pieces connect? Exactly. Are we going to lose that mental map? It's something to think about. Definitely. All right. That's it for today's session.
11:08 Thanks for joining us, and we'll catch you on the next Deep Dive.