[{"data":1,"prerenderedAt":608},["ShallowReactive",2],{"content-seo":3,"en_topics":6,"en_posts:\u002Fposts\u002Fclaude-code-agents-md-fallback":59},{"\u002F":4,"\u002Fposts":4,"\u002Ftopics":4,"\u002Fposts\u002Fclaude-code-agents-md-fallback":4,"\u002Fposts\u002Fmac-apps-i-use":4,"\u002Fposts\u002Fmacos-keyboard-shortcuts":4,"\u002Fposts\u002Fmacos-terminal-commands":4,"\u002Fposts\u002Ftailwind-advanced-customization":4,"\u002Fposts\u002Ftailwind-spacing":4,"\u002Fposts\u002Ftunneling-ngrok-frp":4,"\u002Fabout":4,"\u002Ftopics\u002Fbuilding":4,"\u002Ftopics\u002Flearning":4,"\u002Ftopics\u002Fliving":5,"\u002Fzh":4,"\u002Fzh\u002Fposts":4,"\u002Fzh\u002Ftopics":4,"\u002Fzh\u002Fposts\u002Fclaude-code-agents-md-fallback":4,"\u002Fzh\u002Fposts\u002Fmac-apps-i-use":4,"\u002Fzh\u002Fposts\u002Fmacos-keyboard-shortcuts":4,"\u002Fzh\u002Fposts\u002Fmacos-terminal-commands":4,"\u002Fzh\u002Fposts\u002Ftailwind-advanced-customization":4,"\u002Fzh\u002Fposts\u002Ftailwind-spacing":4,"\u002Fzh\u002Fabout":4,"\u002Fzh\u002Ftopics\u002Fbuilding":4,"\u002Fzh\u002Ftopics\u002Flearning":4,"\u002Fzh\u002Ftopics\u002Fliving":5},true,false,{"building":7,"learning":28,"living":43},{"id":8,"title":9,"body":10,"description":17,"extension":18,"meta":19,"navigation":4,"order":22,"path":23,"published_at":21,"seo":24,"sitemap":25,"stem":26,"__hash__":27},"en_topics\u002Ftopics\u002Fbuilding.md","Building",{"type":11,"value":12,"toc":13},"minimark",[],{"title":14,"searchDepth":15,"depth":15,"links":16},"",2,[],"Ecommerce, products, AI-assisted work, and whatever I am building.","md",{"icon":20,"created_at":21,"updated_at":21},"i-lucide-hammer","2026-10-16",1,"\u002Ftopics\u002Fbuilding",{"title":9,"description":17},{"loc":23},"topics\u002Fbuilding","D8MrHsIWY95f50YFbUCRizJ45lPzun9zKcHplLIAnIA",{"id":29,"title":30,"body":31,"description":35,"extension":18,"meta":36,"navigation":4,"order":15,"path":38,"published_at":21,"seo":39,"sitemap":40,"stem":41,"__hash__":42},"en_topics\u002Ftopics\u002Flearning.md","Learning",{"type":11,"value":32,"toc":33},[],{"title":14,"searchDepth":15,"depth":15,"links":34},[],"Tech, tools, and things I have picked up along the way.",{"icon":37,"created_at":21,"updated_at":21},"i-lucide-notebook-pen","\u002Ftopics\u002Flearning",{"title":30,"description":35},{"loc":38},"topics\u002Flearning","PBu6pRdEFIIqo-4gGIQK-VtKxkHWiHhbol7tuMjSeH4",{"id":44,"title":45,"body":46,"description":50,"extension":18,"meta":51,"navigation":4,"order":53,"path":54,"published_at":21,"seo":55,"sitemap":56,"stem":57,"__hash__":58},"en_topics\u002Ftopics\u002Fliving.md","Living",{"type":11,"value":47,"toc":48},[],{"title":14,"searchDepth":15,"depth":15,"links":49},[],"Life outside of work.",{"icon":52,"created_at":21,"updated_at":21},"i-lucide-coffee",3,"\u002Ftopics\u002Fliving",{"title":45,"description":50},{"loc":54},"topics\u002Fliving","vawkwx5dEl7RjKhEeDFooT8j47erYZjWTAYpdFihJn8",{"page":60,"surround":602},{"id":61,"title":62,"body":63,"category":590,"created_at":591,"description":592,"excerpt":593,"extension":18,"guid":593,"icon":594,"image":593,"meta":595,"navigation":4,"path":596,"published_at":591,"seo":597,"sitemap":598,"stem":599,"topics":600,"updated_at":591,"__hash__":601},"en_posts\u002Fposts\u002Fclaude-code-agents-md-fallback.md","When Claude Code Actually Reads AGENTS.md: Why I Still Can't Delete CLAUDE.md",{"type":11,"value":64,"toc":582},[65,88,91,96,110,202,205,231,234,238,320,332,336,362,368,372,394,398,410,419,423,564,578],[66,67,68,69,73,74,77,78,80,81,83,84,87],"p",{},"Since 2.1.277, Claude Code reads ",[70,71,72],"code",{},"AGENTS.md"," directly when there is no ",[70,75,76],{},"CLAUDE.md",". My projects serve both Codex and Claude Code, so every directory keeps a pair of entry files: ",[70,79,72],{}," is the single source of truth, and ",[70,82,76],{}," holds one line, ",[70,85,86],{},"@AGENTS.md",". The obvious question: can that one line go?",[66,89,90],{},"No. Here is the test.",[92,93,95],"h2",{"id":94},"setup","Setup",[66,97,98,99,101,102,105,106,109],{},"In a temporary directory with no ",[70,100,76],{}," anywhere above it, I built four layouts. Each file carries a unique marker token such as ",[70,103,104],{},"MARKER_A_AGENTS",". I then started a non-interactive session in each directory with ",[70,107,108],{},"claude -p --debug"," and checked which markers made it into context.",[111,112,113,129],"table",{},[114,115,116],"thead",{},[117,118,119,123,126],"tr",{},[120,121,122],"th",{},"Case",[120,124,125],{},"Layout",[120,127,128],{},"Question",[130,131,132,146,166,183],"tbody",{},[117,133,134,138,143],{},[135,136,137],"td",{},"A",[135,139,140,142],{},[70,141,72],{}," only",[135,144,145],{},"Does the fallback fire?",[117,147,148,151,160],{},[135,149,150],{},"B",[135,152,153,154,156,157,159],{},"Parent has ",[70,155,76],{},"; child has only ",[70,158,72],{},"; start in child",[135,161,162,163,165],{},"What happens if I delete a subproject's ",[70,164,76],{},"?",[117,167,168,171,180],{},[135,169,170],{},"C",[135,172,173,175,176,179],{},[70,174,72],{}," only, with one ",[70,177,178],{},"@"," import inside cwd and one outside",[135,181,182],{},"How are imports handled on the fallback path?",[117,184,185,188,199],{},[135,186,187],{},"D",[135,189,153,190,192,193,195,196,198],{},[70,191,76],{},"; child has one-line ",[70,194,76],{}," plus ",[70,197,72],{}," with an outside import",[135,200,201],{},"Control: the current setup",[66,203,204],{},"I did not rely on the model's answer. Two harder sources of evidence:",[206,207,208,224],"ul",{},[209,210,211,212,215,216,219,220,223],"li",{},"the ",[70,213,214],{},"--debug"," log from the built-in ",[70,217,218],{},"cc-plugin-agents-md"," plugin, which writes ",[70,221,222],{},"no CLAUDE.md found; AGENTS.md loaded: \u003Cpath>"," when it loads one;",[209,225,226,227,230],{},"the session transcript (",[70,228,229],{},"projects\u002F\u003Ccwd>\u002F\u003Csession>.jsonl","), which contains the instruction files actually injected. Count the markers.",[66,232,233],{},"The CLI's OAuth token happened to be expired, so the model never answered. That turned out to be useful: the instruction files were assembled and written to the transcript before the first API call. Loading does not depend on the model.",[92,235,237],{"id":236},"results","Results",[111,239,240,252],{},[114,241,242],{},[117,243,244,246,249],{},[120,245,122],{},[120,247,248],{},"Markers loaded",[120,250,251],{},"Conclusion",[130,253,254,268,289,305],{},[117,255,256,258,262],{},[135,257,137],{},[135,259,260],{},[70,261,104],{},[135,263,264,265],{},"Fallback works; the log shows ",[70,266,267],{},"AGENTS.md loaded",[117,269,270,272,278],{},[135,271,150],{},[135,273,274,275],{},"only the parent's ",[70,276,277],{},"MARKER_B_PARENT_CLAUDE",[135,279,280,281,283,284,288],{},"The child's ",[70,282,72],{}," is ",[285,286,287],"strong",{},"skipped entirely","; the log has no ancestor scan at all",[117,290,291,293,302],{},[135,292,170],{},[135,294,295,298,299],{},[70,296,297],{},"MARKER_C_AGENTS",", ",[70,300,301],{},"MARKER_C_IMPORT_INSIDE",[135,303,304],{},"The inside import expands; the outside import is dropped silently",[117,306,307,309,317],{},[135,308,187],{},[135,310,311,298,314],{},[70,312,313],{},"MARKER_D_PARENT_CLAUDE",[70,315,316],{},"MARKER_D_CHILD_AGENTS",[135,318,319],{},"The paired entry works; the outside import is likewise not loaded",[66,321,322,323,325,326,328,329,331],{},"Case B is exactly what deleting a subproject's ",[70,324,76],{}," produces. If any ancestor still has a ",[70,327,76],{},", Claude Code treats the whole tree as a Claude project and never looks for ",[70,330,72],{},". The subproject's identity, status line and stack imports vanish together, with no warning.",[92,333,335],{"id":334},"mechanism","Mechanism",[66,337,338,339,298,341,344,345,348,349,352,353,355,356,358,359,361],{},"The binary shows the order of checks. The plugin first scans the ancestor chain for ",[70,340,76],{},[70,342,343],{},".claude\u002FCLAUDE.md"," or ",[70,346,347],{},"CLAUDE.local.md",". If any exists it sets ",[70,350,351],{},"isClaudeProject"," and skips the ",[70,354,72],{}," lookup. Only with a clean ancestor chain does it look for ",[70,357,72],{}," and expand its ",[70,360,178],{}," imports.",[66,363,364,365,367],{},"That is why case B's log has no ",[70,366,72],{}," ancestor scan: the first check short-circuits.",[92,369,371],{"id":370},"one-thing-the-test-did-not-separate","One thing the test did not separate",[66,373,374,375,378,379,382,383,386,387,390,391,393],{},"The outside imports in C and D both failed to load. I also tried writing ",[70,376,377],{},"hasClaudeMdExternalIncludesApproved: true"," into ",[70,380,381],{},"projects[\u003Ccwd>]"," in ",[70,384,385],{},"~\u002F.claude.json"," and re-running. Same result. So under non-interactive ",[70,388,389],{},"claude -p",", both paths treat imports outside cwd the same way: not loaded. The documented approval prompt for imports reached via ",[70,392,76],{}," is interactive behavior, and this test did not cover it.",[92,395,397],{"id":396},"what-it-means-for-me","What it means for me",[66,399,400,401,403,404,406,407,409],{},"My workspace is a container repository with a ",[70,402,76],{}," at its root and dozens of subprojects, each its own Git repository. Every one of them matches case B. Delete any subproject's one-line ",[70,405,76],{}," and its ",[70,408,72],{}," becomes invisible to Claude Code.",[66,411,412,413,415,416,418],{},"The 11-byte ",[70,414,86],{}," line stays. The fallback saves nothing and silently drops rules in two situations: the whole file when an ancestor has ",[70,417,76],{},", and outside imports when none does.",[92,420,422],{"id":421},"reproduce","Reproduce",[424,425,429],"pre",{"className":426,"code":427,"language":428,"meta":14,"style":14},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mkdir -p \u002Ftmp\u002Ffb\u002FB\u002Fchild\nprintf 'MARKER_B_PARENT_CLAUDE present.\\n' > \u002Ftmp\u002Ffb\u002FB\u002FCLAUDE.md\nprintf 'MARKER_B_CHILD_AGENTS present.\\n' > \u002Ftmp\u002Ffb\u002FB\u002Fchild\u002FAGENTS.md\ncd \u002Ftmp\u002Ffb\u002FB\u002Fchild && claude -p --debug 'reply NONE' >\u002Fdev\u002Fnull 2>&1\ngrep -c MARKER_B_CHILD_AGENTS \"$(ls -t ~\u002F.claude\u002Fprojects\u002F*fb-B-child\u002F*.jsonl | head -1)\"\n","bash",[70,430,431,446,468,484,519],{"__ignoreMap":14},[432,433,435,439,443],"span",{"class":434,"line":22},"line",[432,436,438],{"class":437},"sBMFI","mkdir",[432,440,442],{"class":441},"sfazB"," -p",[432,444,445],{"class":441}," \u002Ftmp\u002Ffb\u002FB\u002Fchild\n",[432,447,448,452,456,459,462,465],{"class":434,"line":15},[432,449,451],{"class":450},"s2Zo4","printf",[432,453,455],{"class":454},"sMK4o"," '",[432,457,458],{"class":441},"MARKER_B_PARENT_CLAUDE present.\\n",[432,460,461],{"class":454},"'",[432,463,464],{"class":454}," >",[432,466,467],{"class":441}," \u002Ftmp\u002Ffb\u002FB\u002FCLAUDE.md\n",[432,469,470,472,474,477,479,481],{"class":434,"line":53},[432,471,451],{"class":450},[432,473,455],{"class":454},[432,475,476],{"class":441},"MARKER_B_CHILD_AGENTS present.\\n",[432,478,461],{"class":454},[432,480,464],{"class":454},[432,482,483],{"class":441}," \u002Ftmp\u002Ffb\u002FB\u002Fchild\u002FAGENTS.md\n",[432,485,487,490,493,496,499,501,504,506,509,511,513,516],{"class":434,"line":486},4,[432,488,489],{"class":450},"cd",[432,491,492],{"class":441}," \u002Ftmp\u002Ffb\u002FB\u002Fchild",[432,494,495],{"class":454}," &&",[432,497,498],{"class":437}," claude",[432,500,442],{"class":441},[432,502,503],{"class":441}," --debug",[432,505,455],{"class":454},[432,507,508],{"class":441},"reply NONE",[432,510,461],{"class":454},[432,512,464],{"class":454},[432,514,515],{"class":441},"\u002Fdev\u002Fnull",[432,517,518],{"class":454}," 2>&1\n",[432,520,522,525,528,531,534,537,540,544,547,549,552,555,558,561],{"class":434,"line":521},5,[432,523,524],{"class":437},"grep",[432,526,527],{"class":441}," -c",[432,529,530],{"class":441}," MARKER_B_CHILD_AGENTS",[432,532,533],{"class":454}," \"$(",[432,535,536],{"class":437},"ls",[432,538,539],{"class":441}," -t ~\u002F.claude\u002Fprojects\u002F",[432,541,543],{"class":542},"sTEyZ","*",[432,545,546],{"class":441},"fb-B-child\u002F",[432,548,543],{"class":542},[432,550,551],{"class":441},".jsonl ",[432,553,554],{"class":454},"|",[432,556,557],{"class":437}," head",[432,559,560],{"class":441}," -1",[432,562,563],{"class":454},")\"\n",[66,565,566,569,570,573,574,577],{},[70,567,568],{},"0"," is case B. Replace ",[70,571,572],{},"~\u002F.claude"," with your ",[70,575,576],{},"CLAUDE_CONFIG_DIR"," if you set one. Baseline: Claude Code 2.1.304, tested 2026-10-21.",[579,580,581],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":14,"searchDepth":15,"depth":15,"links":583},[584,585,586,587,588,589],{"id":94,"depth":15,"text":95},{"id":236,"depth":15,"text":237},{"id":334,"depth":15,"text":335},{"id":370,"depth":15,"text":371},{"id":396,"depth":15,"text":397},{"id":421,"depth":15,"text":422},"building","2026-10-21","Tested with claude -p --debug on Claude Code 2.1.304: when any ancestor directory has a CLAUDE.md, a subproject's AGENTS.md is skipped entirely, and @ imports outside cwd are not loaded in non-interactive mode.",null,"i-lucide-file-search",{},"\u002Fposts\u002Fclaude-code-agents-md-fallback",{"title":62,"description":592},{"loc":596},"posts\u002Fclaude-code-agents-md-fallback",[590],"SkQ6JSz9L0F9vIXuoxFWd20woaJMboBLTVLowf0rKbI",[593,603],{"title":604,"path":605,"stem":606,"description":607,"children":-1},"Software I Use on Mac","\u002Fposts\u002Fmac-apps-i-use","posts\u002Fmac-apps-i-use","A running list of the software I use on my Mac, updated over time",1792977434391]