[ { "i": 0, "speaker": "Lydia Hallie", "text": "I had some technical difficulties during my talk this morning, so I ran back home and I'm just going to record it from my computer instead." }, { "i": 1, "speaker": "Lydia Hallie", "text": "So hi everyone, I'm Lydia, I work on the Claude Code team at Anthropic, and the models have gotten really good lately." }, { "i": 2, "speaker": "Lydia Hallie", "text": "So we have Opus 5.5, which is my favorite daily driver, and earlier this week we also launched Fable 5.2." }, { "i": 3, "speaker": "Lydia Hallie", "text": "And these models are extremely good at long-running tasks and understanding your code base, and especially Fable is also really good at verifying its own output." }, { "i": 4, "speaker": "Lydia Hallie", "text": "But as these models get better, the way that we work with them in Claude Code also changes. So earlier this year, I don't know if you remember, but sessions kind of used to look like this." }, { "i": 5, "speaker": "Lydia Hallie", "text": "So we'd use a model like Opus 4.5, which honestly for its time was really good. I really enjoyed working with Opus 4.5, but compared to today, it would just stop a lot earlier, so it would just run for shorter amounts of time." }, { "i": 6, "speaker": "Lydia Hallie", "text": "And we'd also keep correcting it. We'd keep reminding it to do things, add things like important things, and we'd also keep correcting it." }, { "i": 7, "speaker": "Lydia Hallie", "text": "So we'd keep reminding it to do things, add things like important, exclamation mark, all these things through a Claude file. And also features like auto mode didn't exist yet." }, { "i": 8, "speaker": "Lydia Hallie", "text": "So we were either approving everything manually or taking the riskier approach with dangerously skipping missions. So we were still very much in the loop as humans." }, { "i": 9, "speaker": "Lydia Hallie", "text": "But as these models got better at taking on bigger tasks, our sessions also changed. So nowadays, at least at Anthropic, our sessions look more like this." }, { "i": 10, "speaker": "Lydia Hallie", "text": "So we're running dozens of sessions at the same time, running for hours, verifying their own results along the way, and we even have sessions orchestrate other sessions. So whereas we used to be in the loop for almost every step and running one or just a couple dozens of sessions at the same time, running for hours," }, { "i": 11, "speaker": "Lydia Hallie", "text": "verifying their own results along the way, and we even have sessions orchestrate other sessions. So whereas we used to be in the loop for almost every step and running one or just a couple sessions at a time, we've now essentially become managers for dozens of sessions." }, { "i": 12, "speaker": "Lydia Hallie", "text": "We also get a lot more done though. Now you may have seen our blog post in October about how Anthropic went from about 2,500 changes a day in May to more than 30,000 a day in September." }, { "i": 13, "speaker": "Lydia Hallie", "text": "But this also means that we as developers, just have to rethink about what we're focused on instead. So if you think about our best practices from earlier this year, it was mainly about steering sessions, approving commands," }, { "i": 14, "speaker": "Lydia Hallie", "text": "saying no to certain things is restricting what Claude could do, checking the output, and also starting the sessions." }, { "i": 15, "speaker": "Lydia Hallie", "text": "So everywhere that we now step out of that loop, something else has to take over, and this is either the model, the harness, or the environment that it's running in." }, { "i": 16, "speaker": "Lydia Hallie", "text": "So if we are not in a loop to approve every command, and we're running so many sessions at the same time, how can we make sure that the code it's writing is still high quality?" }, { "i": 17, "speaker": "Lydia Hallie", "text": "And most importantly, if these sessions are running for hours without our supervision, how can we make sure that they're running safely? So let's go through that by taking this old session and seeing what we have to change to get to that end result that I showed earlier." }, { "i": 18, "speaker": "Lydia Hallie", "text": "Well, first of all, let's use the actual defaults we start sessions in nowadays. So that's not really something you should think about. So let's update the model here from opus 4.5 to opus 5.5 and change the manual permission to auto mode." }, { "i": 19, "speaker": "Lydia Hallie", "text": "And opus 5.5 is a lot better at understanding your intent and understanding your code base. So we really don't have to steer it as much anymore mid-session. And you also no longer have to approve every command because we started making auto mode the default permission mode back in August." }, { "i": 20, "speaker": "Lydia Hallie", "text": "Now, being better at understanding your intent and your code base also means that we have to rethink the instructions we have in our code base." }, { "i": 21, "speaker": "Lydia Hallie", "text": "So if you followed our best practices from earlier this year, you may still have things like... important, or never do this, exclamation mark, all these things in your CODE.md file. But with today's models, you really don't need that." }, { "i": 22, "speaker": "Lydia Hallie", "text": "And it can actually make the model go off track. So you end up with more tool calls and overall worse results. So nowadays, your CODE.md file should only include the things that Claude cannot see from your code." }, { "i": 23, "speaker": "Lydia Hallie", "text": "So for example, maybe you have a service that's still using some legacy source somewhere, but it's not directly referenced in the code. That's still good to keep in there." }, { "i": 24, "speaker": "Lydia Hallie", "text": "But everything else, like what stack you're on or where to look, you don't have to worry about that." }, { "i": 25, "speaker": "Lydia Hallie", "text": "So if you have a service that's still using some legacy source, like what stack you're on or where to look, you really don't need that anymore." }, { "i": 26, "speaker": "Lydia Hallie", "text": "And we actually have a command for this called Prompt Audit, which makes it really easy to optimize your environment for a specific model." }, { "i": 27, "speaker": "Lydia Hallie", "text": "So if you're on Opus 5.5 here and you run this command, it will automatically check your CODE.md and your skills to see what the new model no longer needs." }, { "i": 28, "speaker": "Lydia Hallie", "text": "Now, auto mode is a permission mode that runs a separate classifier on pretty much everything that isn't just reading or editing files in your project. So it automatically allows commands that it knows are safe." }, { "i": 29, "speaker": "Lydia Hallie", "text": "So if you have a service that's still using some legacy source, like running tests or installing dependencies, but it still blocks commands where it's unsure whether they're safe. And normally that's pretty good. Normally that's kind of what we want." }, { "i": 30, "speaker": "Lydia Hallie", "text": "But for example, here, if we ask it to ship something to staging, we would have just approved the push to our deploy repo. But by default, auto mode only trusts this folder and this repo." }, { "i": 31, "speaker": "Lydia Hallie", "text": "So it would block that command. So we're back in the loop. Now, the defaults should be good in most cases." }, { "i": 32, "speaker": "Lydia Hallie", "text": "But if you still notice that you have to approve a lot of commands, even in auto mode, the first thing to look at is settings here, because you can configure auto mode in your own settings, just in plain English." }, { "i": 33, "speaker": "Lydia Hallie", "text": "And this is what gets sent to the classifier, which then decides whether to reject or allow certain commands. So here we can just write which repos, buckets, domains we trust and what it should always allow or never do." }, { "i": 34, "speaker": "Lydia Hallie", "text": "Okay. So honestly, this was pretty easy by just using today's defaults. We've already gotten rid of most of our in the loop stuff because the model took over the steering and auto mode took over all the approving." }, { "i": 35, "speaker": "Lydia Hallie", "text": "So getting out of the loop is easy. But the harder question now is how do we make sure it's okay that we're not there anymore? So first is keeping it safe and then also verification." }, { "i": 36, "speaker": "Lydia Hallie", "text": "So let's start with keeping it safe because everything so far, so upgrading the model and using auto mode is just working with a model. And in most cases, it does what you tell it to do, but that's not a guarantee." }, { "i": 37, "speaker": "Lydia Hallie", "text": "So in a study we published back in August, we tested auto mode versus real people in the loop. And only about 14% of people caught a clearly dangerous command. Auto mode blocked 89% of them." }, { "i": 38, "speaker": "Lydia Hallie", "text": "So it is a lot better at it than we were, but about one in 10 of those commands still went through. So if you do want the guarantee, you can only enforce that in the harness. And this is where some of our older best practices still matter and that's permission." }, { "i": 39, "speaker": "Lydia Hallie", "text": "So for example, if you have a deny rule for a specific tool call in your project, Cloud Code looks at this rule before the classifier matches a deny rule, the classifier never even sees it." }, { "i": 40, "speaker": "Lydia Hallie", "text": "So having deny rules is still the best way to make sure Claude actually never does something. But then how do you know what needs to be a rule in your project versus what the model can just know because it's gotten" }, { "i": 41, "speaker": "Lydia Hallie", "text": "so good at it? I think it kind of just comes down to if Claude gets this wrong once, can I take it back? So if it writes the wrong code, you can still revert that. So you can still leave that to the model." }, { "i": 42, "speaker": "Lydia Hallie", "text": "But if it throws away or uncommitted changes, or it reads a key that's now in your transcript and you don't want that, that should still be a rule. So for example, let's say that we just never want Claude reading our .env file." }, { "i": 43, "speaker": "Lydia Hallie", "text": "Now by default, Automode is fine with this. So it would have just approved it. So if you want to make sure that Claude can never read this file, you should just add a deny rule." }, { "i": 44, "speaker": "Lydia Hallie", "text": "And then commands like cat cannot open this file either. But it's not always that straightforward because sometimes certain commands can have side effects. So for example, let's say that npm test here, a very normal command." }, { "i": 45, "speaker": "Lydia Hallie", "text": "It's just a test. So Automode runs it. That's fine. But when the script is running, it runs code that you didn't write, like your dependencies." }, { "i": 46, "speaker": "Lydia Hallie", "text": "Or maybe Claude runs a script real quick that it wrote just to quickly check something." }, { "i": 47, "speaker": "Lydia Hallie", "text": "So if one of those scripts is compromised, it could just open that same env file or your SSH keys and send those to a server you've never heard of, right?" }, { "i": 48, "speaker": "Lydia Hallie", "text": "And even if we were still there as humans approving everything, honestly, we would have just clicked allow because there was nothing to say no to. It's just part of the script that in this example case, npm test runs." }, { "i": 49, "speaker": "Lydia Hallie", "text": "And permissions only decide if a tool call runs. But they cannot limit what it can reach once it's running. So we want to make sure that these kinds of scripts can still run because this is just part of how Cloud can check its own work, running tests." }, { "i": 50, "speaker": "Lydia Hallie", "text": "So we cannot just block npm test, but we want to limit its side effects. So really, we just want to limit the environment that it's running in. So if you're running it locally or on your own machine, you can run commands like that" }, { "i": 51, "speaker": "Lydia Hallie", "text": "in a sandbox. So then you have control over which files it can read, which folders it can write to, which hosts it can reach. And the operating system enforces that. Also, this also applies to everything that command then starts, so any child processes." }, { "i": 52, "speaker": "Lydia Hallie", "text": "So on its own, that deny rule got checked by Cloud before the command runs, but all it sees there is npm test. So it doesn't see which files that script ends up up opening. But with the sandbox on, that same rule gets passed on to the operating system." }, { "i": 53, "speaker": "Lydia Hallie", "text": "So now, when that dependency tries to open our source file, the operating system just doesn't let it. And by default, it can still read most of your machine. So you'd want to add another rule for your SSH keys if you care about that." }, { "i": 54, "speaker": "Lydia Hallie", "text": "And it also cannot reach a host that wasn't approved. But the sandbox only covers the shell commands that Cloud runs and whatever those start." }, { "i": 55, "speaker": "Lydia Hallie", "text": "But Cloud's own files, your MCP servers, and all of your hooks still run outside of it. So the rest of your session still runs on your own machine. So you don't have to worry about that." }, { "i": 56, "speaker": "Lydia Hallie", "text": "But if you're on your own machine and everything that's on there. So ideally, you want this whole thing to run somewhere where none of that is even there in the first place. And that is a cloud session." }, { "i": 57, "speaker": "Lydia Hallie", "text": "Because there it gets its own machine with a fresh copy of a repo. And this runs even when we close our laptop, which is definitely something you want for these longer running sessions that run for hours." }, { "i": 58, "speaker": "Lydia Hallie", "text": "So in this case, this automatically gets rid of the end-of-file issue because it's not in Git. And neither are my SSH keys or our GitHub token. But it still needs an API key." }, { "i": 59, "speaker": "Lydia Hallie", "text": "You can add that as a network secret where it will tell you, like, hey, I'm missing an API key mid-session. So it can use it without actually ever sending it to the model." }, { "i": 60, "speaker": "Lydia Hallie", "text": "And by default, also in a cloud session, network access is limited to things like package registries and GitHub. So you have to explicitly add those domains to your environment for Cloud to reach other hosts." }, { "i": 61, "speaker": "Lydia Hallie", "text": "Okay. So with a cloud session, we can run these long running sessions even with our laptop closed. And it keeps us safe because it runs in its own environment. Now, it's still good to remember that this machine is disposable." }, { "i": 62, "speaker": "Lydia Hallie", "text": "But the things that leave it aren't. So a commit is pushed or a message is sent through a connector. So we still run it in auto mode with our deny rules, just commit it into the repo so they come along." }, { "i": 63, "speaker": "Lydia Hallie", "text": "So it could still catch things like a force push or a secret and a commit, all that kind of stuff. And beyond just safety, we also need to make sure we're working on the right thing. So next is verification." }, { "i": 64, "speaker": "Lydia Hallie", "text": "And the nice thing about being in a loop, like, we kind of knew the work was good because we'd already kind of seen every change. We'd proved everything. But now if Cloud works for hours in the background, we don't have that anymore." }, { "i": 65, "speaker": "Lydia Hallie", "text": "And we're not really going to read every file at the end either. So, you know, say that we ask it to move our auth to a new API. Well, Cloud is very good at understanding what we want." }, { "i": 66, "speaker": "Lydia Hallie", "text": "But there are still a lot of small decisions that it has to make. Along the way. So with the exact same problems, you know, one run might move it over, but leave" }, { "i": 67, "speaker": "Lydia Hallie", "text": "the old API in there, or one might move it, but only for new logins and another one might move it, but log everyone out. And these all look pretty reasonable, but it really helps to set up these verification points along the way." }, { "i": 68, "speaker": "Lydia Hallie", "text": "So Code keeps verifying its own results. And those can be anything that comes back as a pass or fail. So tests, a build, a screenshot, whatever you have. So now we just want to make sure that we review." }, { "i": 69, "speaker": "Lydia Hallie", "text": "These verification points. These are a lot shorter to review than if we just had to, you know, review the whole change at the end. So that's pretty reasonable. So if one of these runs would still log everyone out, it doesn't get past that first check." }, { "i": 70, "speaker": "Lydia Hallie", "text": "And then it just has to find another way. And there's a couple ways to set this up. The easiest one is, of course, just in your prompt. So, you know, you say what done looks like and ask it to split that into tasks so they have their own tests." }, { "i": 71, "speaker": "Lydia Hallie", "text": "And I also like to ask it to show the actual output because you weren't there to see it. But again, this is not a guarantee that a model will do it." }, { "i": 72, "speaker": "Lydia Hallie", "text": "So for the ones that have to run, guaranteed runs, I would use hooks, which are just, you know, scripts that Claude Code runs at a specific point. And those give you a lot of control because you decide when they run and what they run and what" }, { "i": 73, "speaker": "Lydia Hallie", "text": "they check. So for example, every time it edits a file, we can run our linter. Every time it wants to mark a task as complete, we can run the tests for what it changed." }, { "i": 74, "speaker": "Lydia Hallie", "text": "So, you know, if it touched our auth code or something, it has to pass the auth tests. And when it wants to finish the whole session, we can just run the entire test suite. And if one of those fails, it goes, oh, that's still broken." }, { "i": 75, "speaker": "Lydia Hallie", "text": "It goes back until it passes. So it fixes it. Now, just one thing. When a test fails, by default, most tools exit with a one exit code." }, { "i": 76, "speaker": "Lydia Hallie", "text": "But with a one, that task by Cloud Code just gets marked as completed anyway. So make sure that your scripts exit with a two exit code because that's what actually sends Cloud back to fix it." }, { "i": 77, "speaker": "Lydia Hallie", "text": "So, okay. Now we have one session that I'm pretty comfortable with leaving alone. So now we can start with a few more of those because they've all got their own machine." }, { "i": 78, "speaker": "Lydia Hallie", "text": "So they're, you know, not all working in the same folder and we don't really have to think about work trees too much ourselves anymore. But then we still start every session ourselves and we review every one of them. And honestly, this is already a pretty good place to be." }, { "i": 79, "speaker": "Lydia Hallie", "text": "We are still fully in control over what gets started. And when we call a task, done. But even there, you know, we're still the ones kicking off every session and we're still in the loop for all of them." }, { "i": 80, "speaker": "Lydia Hallie", "text": "So I think the most important thing to have in place here now is your CI because all of these sessions eventually open a PR and your CI runs the same checks on every one of them, no matter how that session was set up or, you know, what Cloud decided to do along the way." }, { "i": 81, "speaker": "Lydia Hallie", "text": "And if you turn on autofix, we have like CI autofix, Cloud can also see when one of those checks fails and then go back to fix it. So you're not the one spending your review on things that, you know, a check could have already caught." }, { "i": 82, "speaker": "Lydia Hallie", "text": "And for some of them, you can even turn on merge when ready. So then GitHub merges the PR once all of the checks have passed. So you're not in the loop to review." }, { "i": 83, "speaker": "Lydia Hallie", "text": "But again, that's not the default and that really depends on how risky the change is. So for example, on our team, every PR gets reviewed by Claude first. So not by the session that wrote it." }, { "i": 84, "speaker": "Lydia Hallie", "text": "So it comes with a fresh context and also a separate group of agents to just double check. Every bug it finds and then how much we review ourselves just depends on the risk. So smaller changes like docs are copy." }, { "i": 85, "speaker": "Lydia Hallie", "text": "They don't need a person. So once the automated checks are green, we're pretty good to go. Maybe ordinary product changes just need one reviewer and then risky changes might need two." }, { "i": 86, "speaker": "Lydia Hallie", "text": "Now, ultimately, kind of where we see things going and we're already kind of doing more of that." }, { "i": 87, "speaker": "Lydia Hallie", "text": "And then topic is that you're not really starting all of those sessions yourself either because if you're anything like me, I'm terrible at text switching so having to manage so many sessions at the same time doesn't always go well so instead you just have one main session that's your orchestrator and you can already see this in things like Claude code projects which is still in beta but you just tell it what it needs" }, { "i": 88, "speaker": "Lydia Hallie", "text": "to be done and the orchestrator splits it up and then starts other sessions for each task and it keeps track of what comes back so it automatically starts and verifies these threads which are just new sessions so instead of talking to eight sessions you're just talking to one and the main session doesn't write the code itself so there you want a model that's really good at deciding what to do and judging what comes back a model like Claude and if something comes back that isn't actually done it just you know sends it back so until it's actually done and it passes everything and the threads need a model that's good at actually doing the work" }, { "i": 89, "speaker": "Lydia Hallie", "text": "like Opus 5.5 and you can set those separately so you know one model for the main session and then another model for the main session and then another model for the main another one for the threads." }, { "i": 90, "speaker": "Lydia Hallie", "text": "And another benefit is that with this setup, with Claude projects specifically, we don't manage context anymore. That's all done automatically for us. So we no longer have to think about, you know, when to compact or clear all of that stuff." }, { "i": 91, "speaker": "Lydia Hallie", "text": "Okay, so if you look back at those old best practices, they're all still there, but they've just moved. So the model sets it now, auto mode approves your deny rules and the environment restrict what's possible," }, { "i": 92, "speaker": "Lydia Hallie", "text": "and the environment restrict what's possible, your test, your hooks, and your CI checks it. And then ultimately, Claude can just start them as well." }, { "i": 93, "speaker": "Lydia Hallie", "text": "So almost everything we used to do ourselves is now either the model, the harness, or the environment. And we're really just here to start that first one and to just review what comes out." }, { "i": 94, "speaker": "Lydia Hallie", "text": "So if you want to try this in your own setup, I would say just take one thing that's way bigger than you normally give Claude, make sure your CI actually catches the things you care about, and then spend a bit of time just configuring your environment, like its network access," }, { "i": 95, "speaker": "Lydia Hallie", "text": "its secret, and its setup script. And then start in the Claude and see where your sessions get stuck and where you're still in the loop, because that's the next thing to hand over to Claude." }, { "i": 96, "speaker": "Lydia Hallie", "text": "I also highly" } ]