Claude Code Auto Mode, Code Mode, and Stop Hooks: 5 New Rules
Prefer to watch? Watch on YouTube · Subscribe for new builds · Read the transcript
In this video I go through what shipped in Claude Code this month, how the new Code Mode works, and five new rules I built from a talk by Lydia Hallie on Anthropic's Claude Code team. It's for anyone who uses Claude Code and still clicks Allow on every prompt, writes a CLAUDE.md full of capital letters, or starts every session by hand. I tested most of it myself, and I end with how the same rules run my own daily video pipeline.
What I cover in this video
- 0:46 What shipped in Claude Code this month, including Fable 5.2 as the default Fable model
- 3:05 How to turn on Code Mode, its limits, and my broken links test
- 4:36 Rule 1: stop shouting at the model in your CLAUDE.md
- 6:09 Rule 2: stop clicking Allow and use auto mode
- 7:40 Rule 3: deny rules and the sandbox for the things you can't undo
- 9:58 Rule 4: pass or fail checks, Stop hook exit codes, and /goal
- 11:29 Rule 5: stop starting sessions with Claude Code Projects
- 13:00 How my 4:00 a.m. video job follows the same rules, and where it doesn't
What shipped in Claude Code this month
Claude Code put out over 20 releases in about a month, and the November 16 release alone lists 233 bug fixes. The changelog has all of it. These are the ones I call out:
- Fable 5.2 became the default Fable model on November 9, with a million tokens of context at $8 in and $40 out per million. That's a 20% lower API price than Fable 5.1, and Anthropic says output is up to 30% faster. Anthropic still says to start with Opus 5.5, and it's still my daily driver.
- Code Mode landed on November 12 as an experimental opt-in, and on the 16th it started working with agent teams.
- Safety changes: sandboxed commands now go through the normal permission prompts by default, and there's a setting that makes Claude's write and edit tools refuse anything outside your working folders.
/statusnow lists broken skill and agent files and hook matchers that never match. I set up two broken hook matchers and it caught both.- Fast mode on Opus 4.8 goes away November 30, so move to Opus 5.5.
How Code Mode works and what my test showed
Normally Claude asks for one tool call, Claude Code runs it, and the whole result goes back into Claude's context. In Code Mode, Claude writes a piece of JavaScript that makes the tool calls. That code can run commands in parallel, feed one result into the next call, and hand back only the part Claude needs to read.
You need version 2.1.323 or newer. Start Claude with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 and pick yes on the confirm screen. Press Ctrl+O to read the code it writes.
It's experimental, off by default, and may change or be removed in any release. It's interactive terminal only, and it's ignored in project settings, so a repo you clone can't switch it on. One thing to know about auto mode: the safety check reads each piece of JavaScript once, before it runs, so it can't see values the code works out as it runs. Your deny rules and hooks still check every tool call inside it.
I gave it the docs' own prompt on 10 markdown files with three broken links. With Code Mode on, the first piece of code failed, Claude rewrote it, and the new code made 30 tool calls and found all three links in about 10 seconds. With Code Mode off, Claude wrote a small Python checker and found the same three links in the same 10 seconds. The speed numbers on X are creators' own tests, and my test was too small to show a difference. I'd save Code Mode for changes that repeat across a lot of files, big searches you need to filter, or a bunch of commands at once.
The five new rules
These come from Lydia Hallie's talk, Rethinking Claude Code Best Practices. If you're new to the tool, my Claude Code page has the basics.
Rule 1: Stop shouting at the model
Capital letters and triple exclamation marks in your CLAUDE.md are leftovers from older models. In Lydia's words, "with today's models, you really don't need that and it can actually make the model go off track." Her test: could Claude figure this out from the files? If it can, cut it. Run /doctor prompt-audit to check your file. On my toy CLAUDE.md it returned eight findings in 31 seconds, and it only proposes edits. If a rule can't bend, make it a hook or a deny rule instead.
Rule 2: Stop clicking Allow
Auto mode uses a separate classifier to check pretty much everything that isn't reading or editing files in your project. In Anthropic's test with 1,053 paid testers, people caught about 14% of dangerous commands and auto mode blocked 89%. About 1 in 10 still got through, and Anthropic says it does not eliminate risk. By default, auto mode only trusts your working folder and the current repo, so write what else you trust in plain English in your user settings. To see the roughly 70 built-in ask first rules, run:
claude auto-mode defaults
Rule 3: Put rules on the things you can't undo
Lydia's test is one question: if Claude gets this wrong once, can I take it back? Wrong code you can revert. Losing uncommitted work or reading a key into your transcript should be a deny rule, because deny rules are checked before auto mode. For shell commands, deny rules match the command text, so back them with the sandbox. In my test, a fake dependency read a fake key from my home folder with no sandbox. With the sandbox on and that folder on its deny list, the operating system refused the read. The sandbox is off by default, and it can still read most of your machine, SSH keys included, until you deny them.
Rule 4: Make done mean done
Every task gets a check that comes back pass or fail, like tests, a build, or a screenshot. For checks that have to run, use hooks. On a Stop hook, exit 1 is only a warning and Claude finishes anyway. Exit 2 sends it back to work. In my test, exit 2 got the failing test fixed, but Claude changed a file I told it not to touch, so write the hook for what you actually want. There's also /goal, where a fresh small model checks your condition after every turn.
Rule 5: Stop starting sessions
Claude Code Projects is one ongoing conversation where Claude coordinates the work and starts a thread for each task. It's in public beta on Pro, Max, and Ultra, and it isn't in the terminal. Lydia's pick is Fable coordinating and Opus 5.5 doing the work. A project uses your limits faster, so on Pro expect to hit your limit sooner.
How I use the same rules in my business
None of this is only for code. Every morning at 4:00 a.m., a Claude Code job on my Mac builds the day's video. It never uploads or posts. I do that. Before any voice gets made, a fresh fact check agent, not the one that wrote the script, checks every number and claim. Every X API call goes through one guard script that refuses after a thousand posts read a day, because spending money is something I can't take back.
When I ran the five rules against my own setup, I came up short. I don't have a single deny rule or Stop hook, and there's no sandbox. What I'd add is a deny rule on reading .env, a Stop hook that exits 2 if the script gate fails, and the sandbox for the render steps. If you're building your own AI agents, run the same audit on yours.
Key takeaways
- Code Mode is experimental and matched normal mode in my small test. Use it for repeated changes across many files, big searches, or many commands at once.
- Your CLAUDE.md should only hold what Claude can't see from the code.
/doctor prompt-auditwill propose the cuts. - Auto mode beat people at catching dangerous commands in Anthropic's test, but about 1 in 10 still got through, so put deny rules and the sandbox on anything you can't undo.
- On a Stop hook, exit 2 sends Claude back to work. Exit 1 is only a warning.
- Claude Code Projects starts the sessions for you, and it uses your limits faster.
FAQ
What is Code Mode in Claude Code?
Code Mode is an experimental feature where Claude writes JavaScript that makes its tool calls, so it can run commands in parallel and hand back only the part it needs to read. It needs version 2.1.323 or newer, is off by default, and works in the interactive terminal only. In my test it found the same broken links in about the same time as normal mode.
Is Claude Code auto mode safe?
In Anthropic's test with 1,053 paid testers, people caught about 14% of dangerous commands and auto mode blocked 89%, but about 1 in 10 still got through. Anthropic says it does not eliminate risk, so I back it up with deny rules and the sandbox for anything I can't undo.
What exit code makes a Claude Code Stop hook send Claude back to work?
Exit 2. On a Stop hook, exit 1 is only a warning and Claude finishes anyway, which matters because most test tools fail with exit code 1.
Who can use Claude Code Projects?
Claude Code Projects is in public beta on Pro, Max, and Ultra and is rolling out gradually. It isn't on Team or Enterprise yet, it isn't in the terminal, and it uses your limits faster.
Chapters
- 0:002,500 to 30,000 code changes a day
- 0:36What shipped in Claude Code this month
- 2:11Night Crew Studio
- 2:36Code Mode explained
- 4:49Rule 1: Stop shouting at the model
- 6:21Rule 2: Stop clicking Allow
- 7:52Rule 3: The things you can't undo
- 9:40Rule 4: Make done mean done
- 11:24Rule 5: Stop starting sessions
- 12:43How to use this to grow your business
Transcript
Read the full transcript
0:00In May, Anthropic merged about 2500 code changes a day. By September, over 30,000 a day. Your Claude.md is probably holding Claude back. There's a new mode where Claude writes code to use its own tools. And you're still doing jobs Claude now does for you. But the new features are the small part. The bigger change is what you stop doing. So, in this video, what shipped, code mode, five new rules, and the business side. I tested most of it, and Claude Code builds my daily video at 4:00 a.m. Let's jump right into it. So, Claude Code put out over 20 releases in about a month, and the November 16th one alone lists 233 bug fixes, which is insane. November
0:469th, Fable 5.2 2 became the default Fable model in Claude Code with a million tokens of context at $8 in and 40 out per million. That's a 20% lower API price than Fable 5.1. And Anthropic says output is up to 30% faster than 5.1. But Anthropic still says start with Opus 5.5, their strongest daily driver. And it's still mine. November 12th, Code Mode landed as an experimental opt-in. And on the 16th, it started working with agent teams. Then a pile of safety changes like sandboxed commands going through the normal permission prompts by default and a setting that makes Claude's write and edit tools refuse anything outside your working folders. In VS Code and the desktop app, a big
1:32conversation left idle now gets summarized. And on November 17th, slash status started listing broken skill and agent files and hook matchers that never match. I set up two broken hook matchers and it caught both. Fast mode on Opus 4.8 goes away November 30th. So move to Opus 5.5. And on the Anthropic side, they donated agent skills to the Agentic AI Foundation. More than 70 agent platforms have built it in. And Anthropic filed to go public, which is all I'll say about that. But code mode is the one people on X keep posting speed numbers about. So I ran it myself, and the speed wasn't the story. Night Crew Studio makes a short in under half an hour [music] and now it makes the long ones too. 6 minutes widescreen in
2:18chapters. It researches, fact checks, writes and voices the whole film then builds it one chapter at a time while you do something else. Same app, same Mac, your own Claude plan. Long form comes with the Max plan, the paid shipping school membership. Nightcrew studio. Join at nightcrew.studio. [music] So, how does Claude normally use its tools? It asks for one tool call. Claude code runs it. The whole result goes back into Claude's context and then it picks the next one. So in code mode, Claude writes a piece of JavaScript that makes the tool calls and Claude code runs that code in your session. That code can run commands in parallel, feed one result into the next call, and hand back only the part Claude needs to read. You need version 2.1.323
3:05or newer. My Mac was on 2.1.312, so I put the newest version in a separate folder. Then you start Claude with CLA UDE code experimental code mode equals 1 and pick yes, turn on code mode on the confirm screen. To read the code, press control O. And in my run, opening a code row took a mouse click. Okay, so this is the sneaky part. In auto mode, the safety check reads each piece of JavaScript once before it runs, so it can't see values the code works out as it runs. Your deny rules and hooks still check every tool call inside, so keep those for anything you have to control. It's also experimental, off by default, and it may change or be removed in any release. It's interactive terminal only
3:51on a subscription or console account with the 5.5 models or Fable 5.2, too, and it's ignored in project settings, so a repo you clone can't switch it on. So, I gave it the doc's own prompt on 10 markdown files with three broken links. With code mode on, Claude's first piece of code failed. It rewrote it, and that code made 30 tool calls to find all three links in about 10 seconds. With code mode off, it wrote a little Python checker and ran it in one command. Same three links, same 10 seconds. So, it batched the work on its own. One creator on X says their workflow got 3.1 times faster, and another says changing one word burned 14% of their 5-hour limit without it. That's on their tests, and
4:36mine was too small to show a difference. So, I'd save code mode for changes that repeat across a lot of files, big searches you need to filter, or a bunch of commands at once. And the first rule is about the file you probably wrote first. Rule number one, stop shouting at the model. You know the lines important in capital letters. Never do this. Three exclamation marks. Lydia Halley on the Claude Code team at Anthropic covered this in her AI engineer talk. In her words, with today's models, you really don't need that and it can actually make the model go off track. So her test is simple. Could Claude figure this out from the files? If it can, cut it. Your claude.mmd should only hold what Claude can't see from the code, like a legacy
5:22service that's still live, but nothing points to it. And there's a command for this /drprompt audit. So, I tried it on a toyclaw.md written the old way with one real gotcha in it. In 31 seconds, it came back with eight findings. It caught the missing file in lint script, said the shouting adds no information and flagged no exceptions with three exclamation marks because that makes a literal reader write tests for a typoix, which is fair. It kept the gotcha, but it also kept my folder tree and text stack as environment context. So the tool and the talk don't fully agree there. And it only proposes edits, so nothing changes until you say so. So then I checked my own. Mycloud.md is 25 lines with zero importance and it still
6:09fails part of the test. It says nothing gets built in this folder, which stopped being true months ago. Come on now. And if a rule can't bend, the docs say make it a hook or a deny rule instead. Rule number two, stop clicking allow. Auto mode is a permission mode where a separate classifier checks pretty much everything that isn't just reading or editing files in your project. It's been the starting mode for interactive terminal and VS Code sessions since August, while runs started by a script with nobody at the keyboard still start in manual. So why trust a classifier over yourself? On August 7th, Anthropic posted a test with 1,053 paid professional testers. Partway through each session, one permission prompt got
6:54swapped for a clearly dangerous command, and nothing dangerous actually ran. People caught about 14%. Auto mode blocked 89% and about 1 in 10 still got through. People also got worse as the session went on from about 17% early to about five after 50 prompts which honestly after 50 prompts I'm clicking allow with my eyes closed too. That's Anthropic's own test and they say it does not eliminate risk. By default, auto mode only trusts your working folder and this repo. So ask it to ship to your test site and it can block the push. The fix is to write what you trust in plain English in your user settings since a repo's own settings can't hand itself trust. Slasha auto mode setup will draft it for you and that one isn't
7:40new. And if you run claude auto mode defaults, you can see about 70 built-in ask first rules in plain English. But remember that 1 in 10. That's why rule three exists. Rule number three, the things you can't undo. Lydia's test is one question. If Claude gets this wrong once, can I take it back? Wrong code, you revert. So, leave that to the model. Throwing away your uncommitted work or reading a key into your transcript, that should be a rule. In her words, if a tool call matches a deny rule, the classifier never even sees it. So, I put a fakeenv in a toy repo with a deny rule on reading it. The rule refused the read. And when I said just run cat on it, Claude refused to go around the
8:25block. But for shell commands, deny rules match the command text. So Claude can run a denied command in a form the rule doesn't match. That's what the sandbox is for. Like Lydia says, permissions only decide if a tool call runs, but they cannot limit what it can reach once it's running. NPM test sounds harmless, but it runs code you didn't write. So I made a fake dependency that reads a fake key from my home folder. With no sandbox, the key got read. With the sandbox on and that folder on its deny list, the operating system refused the read. This is the part I'd screenshot. By default, the sandbox can still read most of your machine. SSH keys included until you deny them. And Claude's file tools, add-on tools you connect, and hooks run outside it. It's
9:12off by default, and it's Mac OS, Linux, and WSL 2 only. So the next level is a cloud session, a disposable computer with a fresh copy of your repo where yourv and SSH keys aren't even there. But in Lydia's words, this machine is disposable, but the things that leave it aren't. A pushed commit still leaves. So commit your deny rules into the repo. So that covers the scary stuff, but does it know when it's actually done? Rule number four, make done mean done. Lydia's example is moving your login to a new API. Same prompt and one run leaves the old API in. One only moves new login and one logs everyone out. So every task gets a check that comes back
9:58pass or fail like tests, a build or a screenshot. And ask Claude to show the actual output because like she said, you weren't there to see it. A prompt isn't a guarantee though. So for checks that have to run, you use hooks, little scripts, Claude code runs at a set point, like when Claude says it's done. Most test tools fail with exit code one. And on a stop hook, exit one is just a warning. Claude finishes anyway. Exit 2 sends it back. So I tested both on a toy shopping cart with one failing test and a prompt that said, "Add a readme and don't change any other file." With exit one, the hook said, "Stop hook failed." And the turn ended anyway with the test still failing. With exit 2, it got sent back, made a oneline fix in the cart,
10:43price times quantity, and stopped with the tests passing, but it changed a file I told it not to touch. A hook that blocks done wins over what you typed. So write the hook for what you actually want. So then there's /goal. After every turn, a fresh small model checks your condition. Mine was all tests pass and the lint is clean. Three fixes later, goal achieved. 12 seconds, one turn. That checker only reads the transcript, though. And on Lydia's team at Anthropic, every pull request, that's a proposed code change, gets reviewed by Claude first, not by the session that wrote it, which leaves the job you probably still do the most, starting sessions. Rule number five, stop starting sessions. Like Lydia said, if
11:29you're anything like me, I'm terrible at context switching. I feel that one. So the answer is Clawed Code Projects. It launched in September and it's in public beta on Pro, Max, and Ultra, rolling out gradually, not on Team or Enterprise yet, and not in the terminal. A project is one ongoing conversation where Claude coordinates the work. You tell it what needs doing, and it starts a thread for each task. Each one its own session. In her words, instead of talking to eight sessions, you're just talking to one. A new project runs Opus everywhere, but you can set the coordinator and thread models separately. Lydia's pick is Fable Coordinating and Opus 5.5 doing the work. Now, the usage. A project uses your limits faster, and on Pro, you
12:15should expect to hit your limit sooner. An idle thread even wakes back up and spends again when the automatic checks on your code fail. So, that's all five. The model steers, auto mode approves, deny rules and the environment restrict. Tests, hooks, and automatic checks catch the misses and clog starts the sessions. Or like Lydia said, almost everything we used to do ourselves is now either the model, the harness, or the environment. And none of that is only for code. So how do you use this to grow a business? The same five rules work for reports, client deliverables, and content. Your claw.md holds business decisions like what you charge and what on brand means. And your can't undo list is money, messages to customers, posting and
13:00deleting. So every morning at 4:00 a.m., a claude code job on my Mac builds the day's video on its own. It never uploads or posts. I do that. Before any voice gets made, a fresh fact check agent, not the one that wrote the script, checks every number and claim. That's Lydia's fresh reviewer rule for videos. My last GitHub repo script failed that gate three times. The fixes went in and the video still got finished. One build runs at a time, and each one logs its cost, minutes, and turns. Spending money on the X API is something I can't take back. So, every X call goes through one guard script that refuses after a thousand posts read a day. Think of it as a deny style wall written in code instead of a prompt. Now, flip it around. I ran her five rules against my
13:47own setup. I don't have a single deny rule or stop hook. The night jobs run from a script with a fixed allow list in accept edits mode, not auto mode. There's no sandbox and the cloud code my night jobs use is too old for code mode. So, what I'd add is a deny rule on reading.env, a stop hook that exits two if the script gate says fail, and the sandbox for the render steps. So, here's your one task challenge, the same way Lydia ended her talk. Take one thing way bigger than you'd normally give Claude. Give it a check that would catch it failing and see where it still waits on you. So, which of the five are you still doing by hand? Comment down below. I want to know. And if this saved you a few clicks on allow, give it a like. Have a blessed day.
Ready to start building with AI?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week and weekly-updated courses.
Join Shipping SkoolKeep reading
Claude Code Tips: 30 Shortcuts, Slash Commands, and Automations
I cover 30 Claude Code tips: shortcuts like Shift+Tab, Esc and Ctrl+G, commands like /effort, /compact and /context, plus skills, MCP, subagents, hooks, /goal, /code-review, claude -p, /loop and /schedule so Claude can run whole jobs on its own.
Claude Code Best Practices: 7 Levels to Double Your Results
To get more out of Claude Code, stop being the loop yourself. Give it memory with a short CLAUDE.md, eyes with the Chrome DevTools MCP, a check it can loop on with /goal, guardrails with hooks, and clean context. Once all that is in place, run parallel agents in worktrees.
Claude Code Auto Mode Explained: Safer Than Skipping Permissions
Claude Code auto mode uses an AI safety layer to check every action. Safe ones, like writing files or running tests, go through automatically, and risky ones get blocked. It's the middle ground between clicking Allow on everything and running dangerously-skip-permissions.
