🎉 Giảm 20% cho đơn hàng đầu tiên!✦🚚 Miễn phí vận chuyển cho đơn trên 500.000₫✦⚡ Flash Sale — Số lượng có hạn!✦🎁 Quà tặng kèm cho đơn từ 1.000.000₫✦🎉 Giảm 20% cho đơn hàng đầu tiên!✦🚚 Miễn phí vận chuyển cho đơn trên 500.000₫✦⚡ Flash Sale — Số lượng có hạn!✦🎁 Quà tặng kèm cho đơn từ 1.000.000₫✦
Anthropic engineer Lydia Hallie: using Claude Code effectively means building the environment, not giving better orders
Quay lại Blog

Anthropic engineer Lydia Hallie: using Claude Code effectively means building the environment, not giving better orders

16 tháng 11, 202617 phút đọcVũ Khôi
English
#English
Vũ Khôi

Vũ Khôi

Tác giả tại Wotech Electronics Blog

Illustration: one orchestrator session directing dozens of parallel Claude Code sessions

Anthropic engineer Lydia Hallie: using Claude Code effectively means building the environment, not giving better orders

Lydia Hallie, an engineer on the Claude Code team at Anthropic, has just shared practical experience for using Claude Code more effectively in a video of about 18 minutes. According to a post by the page Việt Nguyễn AI on 14 November 2026, her most important message is: as AI gets smarter, developers need not only to know how to command AI, but also how to build the environment, set rules, and establish verification mechanisms so AI can work autonomously, safely, and effectively — the core mindset of Harness Engineering. This article presents the video's content from its auto-generated transcript and the original post; some details in the transcript are unclear and are therefore presented only in general terms, and one new model mentioned in the video is not named specifically because the transcript records it inconsistently.

Quick answer: According to the video, Anthropic engineers now run dozens of Claude Code sessions at the same time, each running for hours, verifying their own results along the way, and even having sessions orchestrate other sessions — with developers becoming "managers" of dozens of sessions instead of sitting in the loop at every step. Daily changes at Anthropic rose from about 2,500 (May) to over 30,000 (September), according to the blog post Lydia Hallie cites. To work this way safely, she names five points: CLAUDE.md should keep only instructions Claude cannot see from the code; Auto Mode — the default permission mode since August — decides safe operations itself; Deny Rules and sandboxing set technical constraints instead of merely asking AI to comply via prompts; verification through tests, hooks, and CI/CD lets AI check and fix its own errors; and a multi-agent model with one orchestrator session splitting work across other sessions. In a study she cites, only about 14% of participants caught a clearly dangerous command, while Auto Mode blocked 89% — but about 1 in 10 still got through, so a real guarantee comes only from binding rules in the harness and the environment.

A harness is the layer of programs and rules wrapped around an AI model: permissions, deny rules, sandboxes, hooks, and the runtime environment — the things that decide what AI may do and what is blocked, rather than relying on prompts alone. Auto Mode is Claude Code's permission mode that runs a separate classifier on nearly everything that is not just reading or editing files in the project: it automatically allows commands it knows are safe (such as running tests or installing a dependency) and still blocks commands it is unsure are safe.

How have Claude Code sessions changed?

Earlier this year, according to Lydia Hallie, sessions looked very different: the model of the time (she mentions Opus 4.5) would stop much earlier, run for shorter amounts of time, and developers kept correcting and reminding it through CLAUDE.md with lines like "important" and "never do this!" with exclamation marks. The Auto Mode feature did not exist yet, so humans either approved everything manually or took the riskier approach of skipping permissions — humans were still very much in the loop at almost every step.

As models got better at taking on bigger tasks, sessions changed too. Nowadays, at least at Anthropic, sessions look like this: dozens of sessions running at the same time, running for hours, verifying their own work along the way, and even having sessions orchestrate other sessions. Whereas humans used to be in the loop for almost every step and run one or just a couple of sessions at a time, they have now essentially become managers of dozens of sessions — and get a lot more done. She cites Anthropic's October blog post: from about 2,500 changes a day in May to more than 30,000 a day in September.

But that also means developers have to rethink what they focus on. Earlier best practices were mainly about steering sessions, approving commands, saying no to certain things or restricting what Claude could do, checking output, and starting sessions. Everywhere humans step out of the loop, something else has to take over — and that is either the model, the harness, or the environment it runs in. Two questions follow: how to make sure the code is still high quality when no longer approving every command, and more importantly, how to make sure sessions running for hours without supervision run safely?

How should CLAUDE.md be written for new models?

With today's models — she mentions Opus 5.5 as her daily driver, along with a new model launched that same week that is good at verifying its own output — understanding of user intent and the codebase is much better, so there is no need to steer the model as much mid-session, and no need to approve every command either, since Auto Mode became the default permission mode back in August.

Better understanding of intent and codebase also means rethinking the instructions in the codebase. Following earlier best practices, CLAUDE.md may still contain lines like "important" or "never do this!" — but with today's models, those really are not needed and can actually make the model go off track, leading to more tool calls and worse overall results. Nowadays, CLAUDE.md should only include the things Claude cannot see from the code — for example, a service still using some legacy source that is not directly referenced in the code is still worth keeping; everything else, like what stack is in use or where to look, really is not needed anymore. She mentions a built-in audit command that makes it easy to optimize the environment for a specific model: it automatically checks CLAUDE.md and skills to see what the new model no longer needs.

How does Auto Mode work?

Auto Mode runs a separate classifier on pretty much everything that is not just reading or editing files in the project. It automatically allows commands it knows are safe — like running tests or installing a dependency — but still blocks commands where it is unsure whether they are safe.

The default should be good in most cases, but sometimes intervention is needed: for example, when asked to ship something to staging, a human would previously have just approved the push to the deploy repo, but by default Auto Mode only trusts the current folder and repo, so it would block that command — and the human is back in the loop. If many commands still need approval even in Auto Mode, the first thing to look at is settings: Auto Mode can be configured in plain English — writing which repos, buckets, and domains are trusted and what should always be allowed or never done — and that text is sent to the classifier, which then decides whether to reject or allow each command.

She stresses: just by using today's defaults — upgrading the model and using Auto Mode — most of the in-the-loop work is already gone, because the model took over the steering and Auto Mode took over the approving. Getting out of the loop is easy; the harder question is how to make sure it is okay that we are no longer there. That is two parts: keeping it safe, then verification.

How to keep things safe when no longer in the loop?

First, everything so far — upgrading the model and using Auto Mode — is just working with a model, and in most cases it does what it is told, but that is not a guarantee. In a study Anthropic published in August, her team tested Auto Mode versus real people in the loop: only about 14% of people caught a clearly dangerous command, while Auto Mode blocked 89% of them. Much better than humans — but about one in ten of those commands still went through. If a guarantee is wanted, it can only be enforced in the harness.

That is where some older best practices still matter: permissions. For example, with a deny rule for a specific tool call in the project, Claude Code looks at this rule before the Auto Mode classifier even sees it — in fact, if a tool call matches a deny rule, the classifier never even sees it. Deny rules remain the best way to make sure Claude never actually does something.

How to know what needs to be a rule in the project versus what the model can just know? Her rule of thumb: if Claude gets it wrong, can it be taken back? If it writes the wrong code, that can still be reverted — that can be left to the model. But if it throws away uncommitted changes, or reads a key that should stay unread, that should still be a rule. For example: never wanting Claude to read the .env file — by default Auto Mode is fine with that, so to make sure Claude can never read the file, add a deny rule, after which commands like cat cannot open the file either.

But it is not always that straightforward, because some commands can have side effects: for example, npm test looks like a very normal command and Auto Mode runs it fine — but when the script runs, it runs code that was not written by the developer, like dependencies, or a script Claude just wrote quickly to check something. If one of those scripts is compromised, it could open that same .env file or SSH keys and send them to an unknown server. And even if humans were still approving everything, they would have just clicked allow, because there is nothing to say no to — it is just part of the script npm test runs. Permissions only decide whether a tool call runs, but cannot limit what it can reach once running.

So the environment the command runs in must be limited. When running locally on one's own machine, such commands can run in a sandbox: controlling which files a command can read, which folders it can write to, and which hosts it can reach — enforced by the operating system, applying to every child process the command then starts. A deny rule alone is checked by Claude before the command runs and only sees "npm test", not which files the script ends up opening; but with the sandbox on, that same rule is passed to the operating system, so when the dependency tries to open the .env file, the operating system simply does not allow it. By default the sandbox can still read most of the machine, so another rule is needed for SSH keys if that matters; and it cannot reach a host that was not approved.

The sandbox only covers the shell commands Claude runs and whatever those start; Claude's own files, MCP servers, and all hooks still run outside it. Ideally the whole session runs somewhere where none of that is even present in the first place — that is a cloud session: each session gets its own machine with a fresh copy of the repo, running even when the laptop is closed — something definitely wanted for longer sessions running for hours. In that case, the .env file issue goes away automatically because it is not in Git, and neither are SSH keys or the GitHub token. If an API key is still needed, it can be added as a network secret for the session to use without ever sending it to the model; and by default, in a cloud session, network access is limited to things like package registries and GitHub — other domains must be explicitly added to the environment for Claude to reach them.

She adds a reminder: the machine in a cloud session is disposable, but the things that leave it are not — a pushed commit, a message sent through a connector — so her team still runs it in Auto Mode with deny rules, committed into the repo so they travel with the session, to catch things like a force push or a secret in a commit.

How is verification set up?

Beyond safety, there is also the need to make sure Claude is actually working on the right thing. When in the loop, humans kind of knew the work was good because they had already seen every change and approved everything; but when Claude works for hours in the background, that is gone — and nobody is going to read every file at the end either.

For example, asking to move a feature to a new API: Claude is very good at understanding what is wanted, but there are still many small decisions it has to make along the way. With the exact same prompt, one run might move it over but leave the old API in place, another might move it but only for new logins, and another might move it but log everyone out — all looking pretty reasonable. So it really helps to set up verification points along the way so Claude keeps verifying its own results — anything that comes back as pass or fail: tests, a build, a screenshot, whatever is available. Then only the verification points need reviewing — much shorter than reviewing the whole change at the end. If one run would still log everyone out, it does not pass the first check and has to find another way.

The easiest way to set this up is in the prompt itself: state what "done" looks like and ask for it to be split into tasks with their own tests, and ask to see the actual output because nobody was there to watch. But prompting is not a guarantee the model will do it; for the ones that must run guaranteed, she recommends hooks — scripts Claude Code runs at a specific point, giving a lot of control because the developer decides when they run, what they run, and what they check. For example: every time a file is edited, run the linter; every time a task is marked complete, run the tests for what changed; and when the whole session wants to finish, run the entire test suite. If one of those fails, Claude goes back until it passes. One important note: when a test fails, by default most tools exit with code 1, but with that code the task in Claude Code just gets marked as completed anyway; make sure scripts exit with code 2, because that is what actually sends Claude back to fix it.

At a higher level, the most important thing to have in place is CI: all sessions open a pull request, and CI runs the same checks on every one of them, no matter how the session was set up or what Claude decided along the way. With CI Auto Fix turned on, Claude can also see when one of those checks fails and go back to fix it, so humans do not spend review time on things a check could already have caught. For some changes, merge-when-ready can be turned on so GitHub merges a PR once all checks pass — but that is not the default and depends on how risky the change is. On her team, for example, every PR gets reviewed by Claude first — not by the session that wrote it — with fresh context and a separate group of agents just double-checking every bug it finds; how much humans review themselves depends on risk: smaller changes like docs or copy need no person; ordinary product changes need just one reviewer; risky changes might need two.

What is the orchestrator model?

Ultimately, where things are heading — and Anthropic is already doing more of it — is that humans are not really starting all those sessions themselves either. Instead, there is just one main session acting as the orchestrator: the user only says what needs to be done, the orchestrator splits it up, starts other sessions for each task, and keeps track of what comes back, automatically starting and verifying these "threads" — which are just new sessions. Instead of talking to eight sessions, the user talks to just one. The main session does not write the code itself, so it needs a model good at deciding what to do and judging what comes back; the threads need a model good at actually doing the work — and the two can be set separately. Another benefit of this setup, specifically with Claude Code Projects (still in beta), is that context management is done automatically — no more thinking about when to compact or clear.

Looking back at the old best practices, they are all still there but have just moved: the model steers now, Auto Mode approves, denials and the environment restrict what is possible, tests, hooks, and CI check everything, and ultimately Claude can start sessions as well. Almost everything humans used to do themselves is now either the model, the harness, or the environment — humans are just there to start the first one and review what comes out.

Her advice for trying this in one's own setup: take one thing much bigger than normally given to Claude, make sure CI actually catches the things that matter, spend a bit of time configuring the environment (network access, secrets, setup script), then start in the cloud and see where sessions get stuck and where humans are still in the loop — because that is the next thing to hand over to Claude.

Frequently asked questions

1. Who is Lydia Hallie? An engineer on the Claude Code team at Anthropic, sharing experience for using Claude Code effectively in a video of about 18 minutes.

2. What is the video's most important message? As AI gets smarter, developers need not only to command AI but also to build the environment, set rules, and establish verification mechanisms so AI works autonomously, safely, and effectively — the core mindset of Harness Engineering.

3. What should CLAUDE.md contain? According to the video, only instructions Claude cannot see from the code; drop shouting lines like "important" or "never do this!" because new models do not need them and can be led off track.

4. How does a deny rule differ from Auto Mode? Auto Mode uses a classifier to allow/block commands, but about 1 in 10 dangerous commands still got through in the cited study; a deny rule is checked before the classifier and is the best way to guarantee Claude never does something.

5. How is verification set up? Through pass/fail verification points (tests, builds, screenshots), hooks that run guaranteed at specific points (scripts exiting with code 2 to send Claude back to fix), and CI running the same checks on every pull request, with CI Auto Fix and merge-when-ready depending on risk.

This article was rewritten from a video (reel) by the page Việt Nguyễn AI on 14 November 2026, recording a talk by Lydia Hallie, an engineer on the Claude Code team at Anthropic. The content follows the video's auto-generated transcript and the original post; some details in the transcript are unclear and are therefore presented only in general terms. The figures follow the video and the post and have not been independently verified.