The critical missing section in AI agent operating files (CLAUDE.md or AGENTS.md) is the 'stop rules' section, which explicitly tells the AI when to cease operations. Without stop rules, AI agents tend to overwork by calling unnecessary tools, reading irrelevant files, and producing excessive output. Effective stop rules specify concrete conditions such as 'stop after one search,' 'stop when you have three valid options,' or 'stop if the answer is in the file I already gave you.' This section prevents the 'comprehensive trap' where smart models with vague stop conditions produce lengthy, irrelevant reports instead of concise answers.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Your CLAUDE.md Is Missing One SectionAdded:
Have you ever thought about that your AI may be doing too much, calling tools you didn't ask for, reading files you didn't point it at, searching when it already had the answer? Hear me out. [music] This space is moving really, really fast. I'm sure you know it already. The prompt you wrote last year worked, but same prompt that you're using today probably garbage. You didn't change anything, but [music] what exactly changed? The model changed. There's a section missing from your prompt right now, and almost nobody writes it correctly. I used to be inside the AI info business. [music] I watched prompt courses get sold for $2,000 promising people a 200K jobs. [music] The course was outdated in 6 months. The job barely existed. Everything moved so fast. That made me really, really sick. All those money down [music] the drain for what exactly? And that's why I'm just exposing here what's really important today. [music] So, when I tell you operating rules are the real I'm telling you what I wish someone told me back then. Okay, so what actually changed? As you already know, everyone keeps saying prompts are dead, [music] prompts are dying, blah, blah, blah.
They're not exactly dead. They just got promoted. Let's think of it like this. I want you to imagine that you hire the smartest intern in the world, like a real PhD-level genius. [music] It works, but it's day one and they don't know how your company runs yet. You have two options here. You could tell him, "Just go handle customer service." and walk away, or you could hand them an onboarding document, SOP document that tells them the scripts, the policies, when to escalate, etc., and what done looks like. Same intern and two very different outputs. What that means basically is the old prompt was the first version, "Go handle customer service." It's a sentence. It's a [music] wish, basically, right? The new prompt is the onboarding document, and the onboarding doc has a name, actually two names, depending on which model you're using. OpenAI calls theirs agents.md, and Anthropic calls their cloud.md. I'm sure you heard of it, but stay with me for now. In plain English, they are just plain text files with a fancy ending that the AI reads [music] every time you talk to it. It's same idea, just different file name, MD file.
Both are markdown files that you commit to your codebase and your AI reads them every single session. Whether you're running Codex, which is OpenAI's coding agent, Claude code, Anthropic's version, or any of the agents that are in between, antigravity, or whatever. So, your prompt is now a file, not a sentence, a file. agents.md is the new prompt, claude.md is the new prompt. The whole game moved from chat box into your [music] repo, and I think most people didn't get the memo on this one. What that means is that stuff you write inside these file is what I keep calling [music] operating rules. It's the same thing. The file is just where they live.
This is the part that broke the prompt course business [music] overnight because you can't sell a $2,000 course on writing one file that's mostly just free to copy. I mean, some people gatekeep, but that's [music] not my intention today. I'm going to give it away for completely free, the exact operating rules that I'm using. [music] Okay, let me show you the two files I actually use, both running my own work right now. This is my claude.md. This is my agents.md, >> [music] >> the one Codex reads. Notice both are in XML tags, not sentences, not bullet points, tags. There's a reason why.
Anthropic specifically recommends XML tags in their official prompting documents, and the reason it works is that the AI reads in chunks, not in flow. So, the tag tells it exactly what each chunk is for. So, user_profile is who I am, and communication_protocol [music] is how I want it to talk. Each chunk has its own job, >> [music] >> and because Opus 4.7 reads instructions more literally now, the cleaner the boundaries, the more predictable [music] the output. Sentences let the model guess where one instruction ends and another begins. Tags, however, do not.
Does that make sense? That's why this format works for both MD files. Now, why don't we go inside each one? [music] claude.md has five blocks here, who I am, how I want it to talk, how I want it to think, first principle, transfer learning, and how I want responses structured, and my core philosophy.
That's about it. Notice what's not in there, though. No tool rules, no stop rules, nothing about verification or recovery, either. Because Claude and chat is mostly thinking with me, not doing work [music] for me. The boundary is my next message, though. I don't need an execution contract. Now, let's scroll down the agents.md here. Same five blocks at the top, but there is a whole new section called execution {underscore} contract. What that means, it consists of 12 sub-rules covering when to persist, when to stop, how to check its own work, how to recover when a tool call fails, how to handle missing contexts, whether to ask me or make a guess. This is the execution contract opening I guidance keeps talking about right now. Code acts, does [music] things. It calls tools and edit files.
So, it needs rules for the work, not just rules for the talk. That is the real split. Both files share the personality, the agents.md as the work manual on top. The catch here is if you only write a Claude.md and then [music] go use Code Act, you get an agent with no rules of engagement. That's quite obvious, right? It's different platform.
So, it works hard, but you can't really predict where it stops. If you only write an agents.md and then talk to Claude in chat, you get a robot with no personality. It's wrong scope, wrong outcome, wrong platform. So, this is very beginner-friendly uh explanation.
You got to know about that. Now, both files I just showed you are missing the same thing here. Well, my Claude.md is missing it entirely, and my agents.md has it scattered across four different blocks instead of one clean [music] section. The same thing I told you about at the start, the section almost nobody writes it correctly. And it is the section that fixes the overworking problem from the hook that I mentioned, which is [music] stop rules. That's the section. Stop rules are exactly what they sound like. They tell the AI when to stop. Stop searching, stop calling tools, stop reading files, stop asking follow-up questions, stop trying to be helpful past the point it was already useful. So, I'm assuming most of you have felt this. You give Claude or Kodak a simple task and it ends up calling 14 different tools, reading files you didn't really mention, burning through your budget, and coming back with [music] a nine-page report when you really just wanted three bullet points, really simple answers, right? So, that is not the model being dumb. That is you forgetting to tell it when done [music] is done, what done looks like. Same intern logic, right? You wouldn't onboard a new hire and never tell them when their shift ends. But, that's exactly what you're doing it to your AI.
What that means in plain English, stop rule look like this. Stop after one search. Stop when you have three valid options. Stop if the answer is in the file I already gave you. Don't ask clarifying questions. Make your best guess and move on. That's it. That's the missing section and almost nobody writes it because it feels [music] weird to tell a smart, very, very smart system to stop being thorough and rigorous about it, right? But, thorough could mean what's killing [music] you.
Now, let me show you what this actually looks like. Same task, same model, two different prompts. First, the old prompt, the way most people write it.
You're an expert engineer. Review this repo thoroughly. Think step-by-step.
Identify all issues. Be comprehensive.
Watch what happens here. It's reading every file, including the one in node modules here. It's calling search. It's pulling in tests. Still going. We're at 30 seconds. Still going. 45 seconds.
Now, it's giving me a four-page report covering things I didn't really ask for.
Half of which aren't actual problems.
[music] Bad, bad, bad. That is the be comprehensive trap. Smart models with vague stop [music] condition is a no, no, no. Now, the same task with operating rules. Review the repo. Focus only on files I changed the last week.
Output top three issues, one sentence each, plus the file path. Stop after three. Do not read tests. Do not read config files. Make your best guess if a file is ambiguous. Don't [music] ask me.
Okay, let's have a look at this. It posted the three issues, three file paths, done in 12 seconds. Same models.
I'm using same brain, just different operating rules. One cost me four minutes and a page of noise [music] and the other cost me 12 seconds and shipped exactly what I asked for. Can you see the difference here? This is the whole video and one comparison. [music] The model isn't exactly the bottom neck here. Your operating layer is and this exact pattern is what AI agencies charge couple thousand dollars to set up. It's the same six pieces with a logo on top.
The file is free, the [music] thinking is the work. Okay, so I have a couple of things that you can take home with you.
First, if you're using Cloud Code or Codex, you should have a cloud.md or agent.md in your repo. The prompt is a file now. If you don't have one, that's where you start today. Second, my take on this is you don't need a prompt engineering course anymore. You need to write one file and then iterate on it.
That's [music] it. Meanwhile, learn to speak your mind. Learn how to ask better questions. Third, and this one is gold.
Anthropic actually published their own system prompts like the one they use to make Claude behave the way it does in the apps. [music] Simon Willison maintains a comparison. Why don't you go read it? You can literally copy how Anthropic instruct Claude. This is masterclass operating writing rule on the internet that nobody probably know [music] exists don't know exists. If you want my two files, the agent.md and the cloud.md [music] I actually use in my life and business, I'm giving them away free. Link in the description. It includes [music] the stop rules, templates and a one-pager on the document order trick that bumps Claude's accuracy up to 30%. Why don't you just sign up for my newsletter and it's yours. It's free. Anyway, that's it for today and if you want to see more, why don't you comment down below on what you want to see next. For the next video, I don't know yet what I'm going to cover but you tell me because that's how our channel runs. You ask, [music] I build, we all learn. See you in the next video.
Related Videos
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
5 Mind Blowing Omni Uses Cases
PaulJLipsky
1K views•2026-06-02
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29











