TL;DR
Governance of AI coding is migrating wholesale from the prompt layer to the execution layer — “the rule lives in CLAUDE.md” is no longer a guardrail; an executable policy is. Anthropic cut Claude Code’s system prompt from 2,686 words down to 514 (-80%), and has made auto mode the default for Pro, Max and Team since August 14. Meanwhile Anthropic’s own documentation states plainly that CLAUDE.md and auto memory are context, not enforced configuration, and that the only way to block a behavior unconditionally is a PreToolUse hook. Competitors have gone further: Gemini CLI’s policy engine evaluates allow / deny / ask_user on every tool call, and a denied tool can be made completely invisible to the model. The move enterprises should make is to map “how important is this rule” directly onto “where does this rule execute”: hard constraints go into hooks, policy engines, sandboxes and approvals; output formats go into validators; only soft preferences stay in the prompt.
1. After an 80% prompt trim, behavior regressed
Product coach Paweł Huryn measured the change directly in his newsletter: Anthropic removed 80% of Claude Code’s system prompt, and his measured figures were 2,686 words down to 514. His complaint was not about token savings but about two behavioral regressions:
| Regression | Symptom | Rule Huryn wrote back by hand |
|---|---|---|
| Unnecessary permission pauses | Cheap, reversible work kept stopping to ask | Act. Don't Ask |
| Acting beyond the scope of the question | ”How could we improve this?” got executed as a task | A Question Is a Question |
Both fixes are soft constraints written back into custom instructions. Huryn’s causal reading is that the model was trained to “work without you,” so “it stopped working with you” — his interpretation, not an Anthropic-confirmed explanation.
The timing matters. Since August 14, Anthropic has made auto mode the default for new sessions on Pro, Max and Team. The vendor’s own numbers explain the bet: in a controlled study of 1,053 paid testers, the auto mode classifier blocked 89% of dangerous actions while humans blocked only 13.6% — and users approve 97% of Claude Code permission prompts. The decay in human vigilance is sharper: human blocking started around 17% and fell to roughly 5% after 50+ prior prompts, while the classifier stayed flat. Third-party Trajectory Labs ran 720 simulated attacks against Fable 5, Opus 5 and Sonnet 5 running auto mode and got 0 successes; by comparison, OpenAI’s GPT-5.6 Sol had a 5.83% attack success rate under Codex’s Auto-review mode and 19.03% under Full Access. After three consecutive blocks, or twenty across a session, Claude Code falls back to manual approval.
The conclusion is blunt: a rule in the prompt is something the model reads and tries. A rule in the execution layer is something the model cannot get past.
2. The vendor admits it: context is not enforcement
Anthropic’s official memory documentation says CLAUDE.md is delivered as a user message after the system prompt, that Claude reads it and tries to follow it, but that there is no guarantee of strict compliance, especially for vague or conflicting instructions; when two instructions contradict, Claude may pick one arbitrarily — and will not tell you which. For unconditional blocking, the documentation points directly at a PreToolUse hook: it runs before the tool call, exit code 2 blocks the call, and stderr is fed back to the model; any other exit code besides 0 and 2 lets the action proceed on most events, which means a guard script that crashes fails open and therefore needs its own test.
File size has official numbers too:
- Target under 200 lines per CLAUDE.md — an attention budget, not a hard cap.
- A root CLAUDE.md loads whole at launch, up to 4 MiB, and a larger file is skipped entirely rather than trimmed.
- On-demand files are cut per the context window: 40,000 characters at a 200K window; 200,000 characters at a 1M window on Claude Opus 4.6 and Sonnet 4.6; 150,000 characters at a 1M window on later models. The limit has applied since v2.1.309.
@importdoes not reduce context (imported files load with the file that imports them), recursion caps at four hops. Only a path-scoped rule actually saves context.
The meaning of that set of numbers: the prompt layer’s ceiling is both low and soft — 200 lines is advice, 4 MiB is a cliff where the file is discarded outright, and contradictory rules cancel each other out.
3. Competitors already put the boundary in code
Gemini CLI’s policy engine is currently the most complete execution-layer implementation. Rules live in [[rule]] blocks inside ~/.gemini/policies/*.toml; each rule ends in decision = allow / deny / ask_user, carries a priority of 0–999, and sits on a tier base of Default 1 / Extension 2 / Workspace 3 / User 4 / Admin 5, with final priority = tier base + in-file priority ÷ 1000 — so Admin always outranks User. Three mechanisms matter:
- A deny rule can make a tool disappear. A deny without
argsPatternremoves the tool entirely from what the model can see. ask_useris treated asdenyin headless mode. In CI, nobody is there to click.- Four approval modes — default / auto_edit / plan / yolo — of which yolo is flag-only, while
planis a read-only mode enabled by default, with sandbox backends covering docker / podman / sandbox-exec / runsc.
Codex takes the other road: it separates instruction files from sandbox and approval policy entirely. Anthropic’s own model-selection guidance reflects the same division of labor: use Opus 5.5 for daily development, and bring Fable 5.2 in as Advisor or Orchestrator for hard problems. On FrontierCode 2.0, Fable 5.2 at high scores 45.3% at $6.72 per task, xhigh reaches 49.1% at $14.19, while max drops back to 45.6% at $44.70; Opus 5.5 at max scores 45.5% at $12.82. On SWE-bench Pro, Opus run at low and re-run at high after a failure reaches about 97% pass at roughly $0.17 per task, versus 95.3% and about $0.29 for running everything at high. Reasoning budget and model tier buy execution-layer capability — never execution-layer constraint.
4. Context dilutes constraints
Liu et al.’s Lost in the Middle (TACL 2024) supplies a hard constraint: information buried in the middle of a long context is used with significantly lower reliability, while material at the beginning and end is used far more consistently. That is fatal to the “put all 500 lines of standards into CLAUDE.md” approach: the later a rule sits, the more likely it is ignored; the more central it sits, the more it is diluted.
5. China has put the policy into a patent
On November 29, reports surfaced that Zhongdianke Wang’an (中电科网络安全科技股份有限公司) filed patent CN123177787A, “Software Development Method, Device, Equipment and Medium Based on Enterprise-Grade AI Coding Technology,” with a publication date of November 27, 2026, a filing date of September 11, 2026, application number CN202611412970.1, inventor Yuan Zhong, agent Beijing Jijia Intellectual Property, classification G06F8/20, G06F8/10, G06F8/30, G06F8/36, G06F16/903. The abstract’s pipeline converges with the Western vendors:
- Requirement spec → retrieval conditions → reference code from a preset code repository plus positive and negative comparison samples from a preset example library;
- Project-level spec files + reference code + positive/negative samples assembled into a target context;
- A development agent generates initial code, runs it, and on failure repairs it from error logs until it runs successfully;
- A “policy-as-code mechanism” performs multi-dimensional validation of the code to be delivered, and only validated code ships.
The simultaneous appearance of “target context” and “policy as code” means domestic vendors are moving governance to the execution layer too. For scale: Zhongdianke Wang’an was founded April 23, 1998, listed on the Shenzhen Stock Exchange on August 11, 2008, and is registered and headquartered in Sichuan Province; Q3 2026 revenue was RMB 646 million, ranking 31st among 62 comparable listed companies, while the sector leader Inspur reported RMB 129.329 billion in the same period.
6. The toolchain is tightening the execution layer too
- Qwen Code v0.29.0 (Nov 28, 10:00 UTC): local
/verify-prnow requires an explicit choice of host or VM before it will run untrusted PR code. v0.29.1 (Nov 29, 17:43 UTC) added microVM golden rootfs, offline golden guest images, real Apple VZ/vfkit vsock transport, and automatic/verify-prruns on every push to a PR whose author has write permission (#18581, #18649, #18633, #18639). - Stitch skills (Nov 28, 19:39 UTC): a PR was stopped from merging by default because Puppeteer’s
frame.evaluate()is not bound by the same-origin policy. The substance of the debate is that CDP-levelframe.evaluate()can bypass browser same-origin rules — same-origin iframes allow direct DOM traversal, while for cross-origin iframescontentDocumentreturns null; a comparable Midscene PR handles cross-origin iframes through the Frame API (CDP) recursively to a maximum depth of 5, cutting E2E time from 84 seconds to 50 seconds. More capability, fuzzier boundaries — the execution layer has to close the gap explicitly. - Claude-BugHunter (Nov 28, 22:47 UTC): three fail-open scope checks were fixed, where an attacker could bypass an
admin.example.comdeny rule with an encoded variant such asadm%69n.example.com. The common shape of these bugs: a guard that errors defaults to permitting rather than denying. - OpenClaw v2026.11.11 (Nov 29): 100 PRs, 34 direct commits and 40 contributors, fixing script-approval misidentification of the target script under zsh
-O/+Oflags, plus SQLite databases above 1 GiB and interrupted in-place updates.
7. Human review bandwidth is the new bottleneck
Donald Knuth stopped reviewing new error reports as of November 25, posting a Moratorium page on his Stanford site. The reason is not that reports became wrong — it is volume. LLMs let readers submit reports faster than he can read them: “the amount of available time is now less than zero.” Random sampling indicated that the vast majority of recent reports are repeats of issues others already submitted. The reward remains 0x$1.00 ($2.56), but the list of books currently accepting errata is empty. The page reached the Hacker News front page twice on November 28, with 516 and 436 points. Werner Vogels predicted on November 24 that by 2027 adversarial testing will enter every stage of software development, with organizations running their own agents attacking their own software hundreds to thousands of times before release.
Once generation gets cheap, the scarce resource is no longer spotting the problem — it is the step where a human signs off.
8. The efficiency-versus-quality trade-off gets quantified
- Max Woolf used Claude Opus 5.5 and Fable 5.2 to tune his over-optimized Rust code; his search tool ByteSeek reached roughly 4x speedup while pulling the grouping quality of the 12x version back to a comparable level — the speedup ledger has to include quality.
- Google Antigravity v1.5.17: a custom assistant consumed roughly 4x more of the 5-hour and weekly quotas at equivalent usage; on November 28 the Magpie plugin reverted to default assistant standard rates.
- Scale proves execution-layer orchestration works: Karpathy let Claude Code (desktop, Opus 5.5, medium reasoning with ultracode) run for roughly 7 hours and produce about 45,000 lines of code, reconciling 31 US official data sources (Census, BEA, BLS, EIA, NOAA, USGS, FEMA, CDC and others) onto a 25-kilometer hexagonal grid, delivered as an interactive map with 19 data lenses, 524 metropolitan areas and 3,100+ counties; all 176 unit tests in the repository pass, the first full build pulls about 500 MB of raw data, and the project is MIT-licensed. He also flags two limits: Claude skipped Alaska, Hawaii and the territories, and half his weekly quota was spent. Separately, a developer ran up to 10 Claude Code sessions in parallel in independent git worktrees and shipped a browser-playable 3D multiplayer roguelike in 10 weeks.
9. What enterprises should change: five moves
- Build an importance-to-execution-location map. Grade every rule by importance and enforcement level: hard constraints into hooks, policy engines, sandboxes and approvals; output formats into validators run in CI rather than trusted to the model; only soft preferences stay in the prompt.
- Keep rule files short, verifiable and non-contradictory. Hold each CLAUDE.md under 200 lines; write each rule as a checkable fact — “2-space indentation,” not “keep the code tidy”; never let two rules conflict, because the model may pick either one at random.
- Give every hard constraint a failure-path test for the case where the model does not comply. A PreToolUse guard must be tested on the exit-code-2 blocking branch and on the guard’s own crash behavior — a guard that fails open is not a guard.
- Layer your context; do not rely on memory. Keep only a small number of always-on entries, load the rest through path-scoped rules, and do not pretend
@importsaves context — it does not, and recursion caps at four hops. - Your moat is your own regression set. 30–50 real business tasks, re-run on every model change, version bump and policy change — that gets closer to fact than any instruction file.
FAQ (Straight Answers)
1. If I word a CLAUDE.md rule more forcefully, can it serve as a guardrail? No. Anthropic’s documentation describes CLAUDE.md as context rather than enforced configuration — advice, not law. The model reads it and tries to follow it, but there is no guarantee of strict compliance. For unconditional blocking, the documented answer is a PreToolUse hook.
2. What happens when two rules contradict each other? The model may pick one arbitrarily, and will not tell you which one it chose. The docs state that specific instructions beat vague ones, but two specific and mutually exclusive rules have no stable tiebreak. Rule files need a conflict review.
3. How long can a CLAUDE.md actually be? Three numbers get conflated. 200 lines is the official target — about attention, not a hard cap. 4 MiB is the ceiling for a root file that loads whole at launch; above it the file is skipped entirely, not trimmed. 40,000 / 150,000 / 200,000 characters are the truncation lines for on-demand files, set by context window (200K, 1M on later models, and 1M on Opus 4.6 and Sonnet 4.6 respectively), in force since v2.1.309.
4. Does splitting files with @import save context?
No. Imported files load together with the file that imports them, the total is unchanged, and recursion is capped at four hops. The only mechanism that genuinely reduces context is a path-scoped rule, which loads only when Claude touches matching files.
5. What is different about a deny rule in Gemini CLI compared with other tools’ denies?
A deny can make a tool vanish. A deny without argsPattern removes the tool entirely from the model’s visible set — the model does not even know it exists. And in headless mode ask_user is treated as deny, so CI environments must state rules explicitly rather than expect a runtime prompt.
6. Is Claude Code’s auto mode safer than human review? In Anthropic’s own experiments, yes: among 1,053 paid testers the classifier blocked 89% of harmful actions versus 13.6% for humans, and 720 simulated attacks by Trajectory Labs produced zero successes against Fable 5, Opus 5 and Sonnet 5. The cost is that approval moves from humans to a classifier — risk shifts from “a thousand distracted humans” to “one gatekeeper who may be breached”, which still requires your own sandbox and policy engine underneath.
7. How far has China gotten on this? Zhongdianke Wang’an’s CN123177787A (published November 27, 2026) already writes a “policy-as-code mechanism” into the patent abstract and explicitly assembles project-level spec files + reference code + positive/negative comparison samples into a target context. The direction has converged with the Western vendors.
8. Does Knuth’s moratorium mean AI is finding more genuine bugs? No. Knuth’s own words are that reports are too many and overwhelmingly repetitive, that his “available time is less than zero,” and that he insists on verifying every item himself. The bottleneck moved from finding problems to filtering them and signing off on conclusions.
9. If an agent can run 7 hours and produce 45,000 lines, is human oversight obsolete? Karpathy’s run supplies the boundaries: 31 data sources, a 25-kilometer grid, 19 lenses, 176 tests passing, about 500 MB of raw data, MIT-licensed — but Claude skipped Alaska, Hawaii and the territories, and half the weekly quota was gone. More fundamentally: when an agent writes both the implementation and its tests, errors inside the implementation can be frozen into its own tests unless coverage and acceptance criteria are defined independently, outside the agent.
10. What should an enterprise do first? Build the importance-to-execution-location map: go through existing rules and mark each one “must execute 100% of the time” or “best effort.” Every “must execute” rule moves today into a hook, policy engine or validator. Moving the five hardest rules beats rewriting 500 lines of spec.
Key Terminology
- Context vs. Enforced Configuration: Anthropic’s own characterization of CLAUDE.md and auto memory — context the model reads and tries to follow without guaranteed compliance, as opposed to program-level enforcement. Telling these two apart is where every governance action begins.
- PreToolUse Hook: a shell hook that fires before a tool call executes, receiving the call details as JSON; exit code 2 blocks the call and returns stderr to the model, while other non-0/2 exit codes permit the action on most events — so guard scripts must be tested.
- Auto Mode: Anthropic’s default mode replacing per-action confirmation with a classifier that evaluates each tool call along three axes — reversibility, destructiveness and scope; it falls back to manual approval after three consecutive blocks or twenty across a session.
- Policy Engine (allow / deny / ask_user): Gemini CLI’s rule engine, with rules in
~/.gemini/policies/*.toml, priority 0–999 layered over five tier bases; a deny can make a tool entirely invisible to the model, and headlessask_userequals deny. - Policy-as-Code: governance expressed as executable, auditable, revertible code assets rather than prose for humans to read. Zhongdianke Wang’an’s CN123177787A uses it to validate code to be delivered along multiple dimensions.
- Lost in the Middle: the TACL 2024 finding that information in the middle of a long context is used with markedly lower reliability — the direct refutation of “put all your standards in one big file.”
- Path-scoped Rule: a rule file carrying a
pathsfrontmatter field that loads only when Claude touches matching files — the only mechanism that genuinely reduces always-on context. - Regression Set: an enterprise’s own 30–50 real business tasks, used to verify that behavior has not drifted across model changes, version bumps and policy changes.
References
Official documentation and primary sources
- Anthropic Claude Code memory docs (CLAUDE.md as context, 200-line target, 4 MiB ceiling, conflicting-rule behavior): https://docs.anthropic.com/en/docs/claude-code/memory
- Anthropic Claude Code hooks guide (PreToolUse, exit-code-2 blocking semantics): https://docs.anthropic.com/en/docs/claude-code/hooks
- Anthropic, “Auto mode is now the default in Claude Code for Pro, Max, and Team plans” (Aug 14 default, three classifier axes, 3/20 fallback): https://www.anthropic.com/news/claude-code-auto-mode
- Gemini CLI policy engine reference (allow/deny/ask_user, priority, tool removal): https://geminicli.com/docs/reference/policy-engine
- OpenAI Codex docs (instruction files separated from sandbox and approval): https://developers.openai.com/codex/
- Qwen Code v0.29.0 / v0.29.1 release notes (
/verify-pr, microVM, automatic verification): https://github.com/QwenLM/qwen-code/releases - OpenClaw v2026.11.11 release notes (script-approval flag fix): https://github.com/openclaw/openclaw/releases
Research
- Liu et al., “Lost in the Middle: How Language Models Use Long Contexts,” TACL 2024: https://aclanthology.org/2024.tacl-1.9/
- Anthropic, “Which Claude model should you build with?” (FrontierCode 2.0 / SWE-bench Pro costs and tiers): https://claude.dev/blog/which-claude-model-should-you-build-with/
Patents and industry reporting
- Sina Finance / CNIPA: Zhongdianke Wang’an patent CN123177787A published 2026-11-27: https://finance.sina.com.cn/stock/aigc/zl/2026-11-29/doc-inkakinh6757303.shtml
- The New Stack via Pivot News: Karpathy’s 7-hour, 45,000-line map over 31 data sources: https://pivotnews.ai/build/karpathy-reports-claude-code-built-a-45-000-line-map-app
- Builder Within: Huryn’s measurement of the 2,686 → 514 word prompt cut and his two hand-written rules: https://builderwithin.com/articles/claude-opus-5-system-prompt-cut-huryn
- Knuth, “Moratorium” (error reports paused from Nov 25, 2026): https://www-cs-faculty.stanford.edu/~knuth/moratorium.html
- DigiNews: Max Woolf on Opus 5.5 and Fable 5.2 tuning Rust, ByteSeek at 4x speedup: http://diginews.johandenoyer.fr/article.php?id=53000
Chinese-language coverage
- Sina Finance (patent filings and listed-company financials): https://finance.sina.com.cn/
- Machine Heart / jiqizhixin (AI coding toolchain and governance practice): https://www.jiqizhixin.com/
- QbitAI (model versions and measured cost): https://www.qbitai.com/