Cursor, Droid, Claude: Why Your Agent Forgets Rules
Your AI agent follows instructions for a while, then just does its own thing. Whether you're using Cursor, Droid, Claude Code, Codex, or GPT-5.1 - I've been there with all of them. In this video, I show you my actual AGENTS.md files, the exact prompt I use to generate them, and why this structure lets me run sessions that are millions of tokens long without the agent going off the rails. The secret is just-in-time context indexing. Instead of one massive file drowning the context window, the agent pulls what it needs when it needs it. Works with Cursor rules, CLAUDE.md files, and any agent that reads markdown instructions. GET THE TOOLS - My generate-AGENTS.md Prompt: https://rfer.me/agentsmd - My generate-CLAUDE.md Prompt: https://rfer.me/claudemd - Try Droid (40M Free Tokens): https://rfer.me/rayfactory - Join our Discord (FREE MONTH w/ code COOKWITHME): https://rfer.me/discord Timestamps 00:00 Why AI agents ignore your instructions 00:38 Example: Cursor fails to rename a file correctly 01:53 Introducing the AGENTS.md file structure 02:34 Explaining the hierarchical repo structure 03:26 How just-in-time context indexing works 03:47 The prompt that generates AGENTS.md files 04:00 The five core principles for the agent to follow 05:03 How to run the generation prompt on your codebase 06:33 Comparing AGENTS.md with CLAUDE.md 07:07 Why multi-million token sessions don't fail 08:05 Three key takeaways to improve your AI agent CONNECT WITH RAY X (Twitter): https://x.com/RayFernando1337 - 1-1 AI Shipping Mentorship (December): https://startmy.ai #Cursor #ClaudeCode #Droid #GPT5 #Codex #Opus45 #AIcoding #CursorRules #FactoryAI #SoftwareEngineering #AgenticWorkflow