Coding

Claude Code’s new rules: a lean CLAUDE.md, auto mode and hard limits

Anthropic now advises a short CLAUDE.md, auto mode instead of approving every command, and deny rules, sandbox and hooks for anything that must never happen.

Oliver · FoxAI World3 min read
18
Oliver the owl stands beside a laptop and an illuminated Claude sign.Claude Code, new rules

Conceptual cover created with AI.

Many people still run Claude Code the way they did a year ago: a long CLAUDE.md full of capitalised warnings, and a click on “approve” for every single command. Anthropic’s current best-practices page for Claude Code now recommends a different setup. The short version: less text for the model, more hard limits in the tool itself.

What changed in the advice for CLAUDE.md?

CLAUDE.md is the instruction file Claude Code reads at the start of a session. The new rule of thumb is to write down only what Claude cannot find by reading the repository. Coding style that is already visible in the code, or the language a project uses, does not need a line. The memory guide recommends staying under 200 lines, and most of the work after /init is removing lines.

Emphasis is also out of fashion. According to the page, adding IMPORTANT to a line Claude keeps ignoring probably won’t fix it: either the file has grown so long that the line gets lost, or the line is a rule that must never have exceptions, and then it belongs in a hook. A new check helps with clean-up: /doctor prompt-audit flags instructions written for older models, lines pointing at files that no longer exist, and instructions that contradict each other.

Oliver sits behind a Claude Code laptop beside a checklist and illustrated safety symbols.
AI-generated conceptual illustration.

Why is auto mode now the default?

Auto mode lets a separate classifier, a second model that judges each action, decide whether a command can run without asking you. New terminal and VS Code sessions now start in this mode. Since 14 August 2026, it has been the default for new sessions on the Pro, Max and Team plans.

The reason is approval fatigue. According to Help Net Security, Anthropic planted a dangerous command in sessions run by 1,053 paid professional testers. Humans caught it 13.6 percent of the time; auto mode caught 89 percent. Anthropic also says developers approve 97 percent of permission prompts.

Where is auto mode not enough?

The classifier is still AI judgement, so it can be wrong. If Claude is blocked three times in a row or 20 times in one session, it falls back to manual approvals. Anthropic recommends reviewing high-risk changes yourself, for example to production systems or critical infrastructure.

For things that must never happen, the page separates two kinds of control. Your prompt, CLAUDE.md and the auto mode classifier are non-deterministic: Claude, or a model, decides. Hooks, deny rules, the sandbox in strict mode and managed settings are deterministic: Claude Code enforces them every time, whatever the model decided. A deny rule blocks a specific action; the sandbox fences off what commands can reach.

How do you stop Claude from finishing with broken tests?

A hook is a small script Claude Code runs at fixed moments. The page’s example is a Stop hook that runs the type checker when Claude wants to finish. If the check fails, the hook ends with exit 2, and Claude Code hands the error output back to Claude as the reason it cannot finish yet. Claude then keeps working until the check passes. Small detail. Big difference. There is a safety valve: if the hook blocks eight stops in a row without a tool call in between, Claude Code overrides the next block.

Our assessment

The facts here are Anthropic’s own documentation and Anthropic’s study as reported by Help Net Security; there is no independent test of the 89 percent figure yet. Still, the direction is sensible. A line in a text file is a request, while a deny rule or a hook is a check you can verify. If something cannot be undone, such as deleting unsaved work, reading secrets or sending a message, it should be a hard rule rather than a hope. Keeping your own approvals for risky steps remains a reasonable choice.

Ask AI about this article

Opens in a new tab with the question filled in.

Sources and research

Written by FoxAI World. The cover and illustrations are AI-generated conceptual artwork.

Your favourites

This list stays in this browser on your device. No account is needed, and other visitors cannot see it.

Use a story’s bookmark button to add your first favourite.