‹ BackHN Continuity

Thread

Claude Code reads AGENTS.md only when telemetry is on [fixed]

486 points · 284 comments · pszypowicz

  1. mpoteat · · focus · HN ↗
    Sorry folks, this is a rollout artifact, we needed a way to turn this off remotely via feature flags if it broke something, and with telemetry off you don't get those. It's already been fixed as part of v2.1.281 releasing today.

    The mod is source available here: <a href="https:&#x2F;&#x2F;github.com&#x2F;anthropics&#x2F;claude-code&#x2F;tree&#x2F;main&#x2F;mods&#x2F;agents-md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;anthropics&#x2F;claude-code&#x2F;tree&#x2F;main&#x2F;mods&#x2F;age...

    Apologies again folks, this was a fully human error on my part - I should&#x27;ve found a better way to launch with a kill-switch.

    1. mpoteat · · focus · HN ↗
      The AGENTS.md support was implemented via our new extensibility system for CC, called Mods, which is launching soon-ish. A mod is a plugin with a new type of hook, which we call a function hook.

      If folks play around with it, I would love feedback on the relevant issue: <a href="https:&#x2F;&#x2F;github.com&#x2F;anthropics&#x2F;claude-code&#x2F;issues&#x2F;91870" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;anthropics&#x2F;claude-code&#x2F;issues&#x2F;91870

      Mods allow quite a bit more customizability and control. I really believe in the idea.

      1. amluto · · focus · HN ↗
        I skimmed a couple pages of the docs at:

        <a href="https:&#x2F;&#x2F;github.com&#x2F;user-attachments&#x2F;files&#x2F;31802150&#x2F;EXTERNAL.Function.Hooks.Core.Architecture.pdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;user-attachments&#x2F;files&#x2F;31802150&#x2F;EXTERNAL....

        Might I gently suggest that you have a model at least as capable as Opus 5.5 translate that from Claudish to English? Or, even better, have an actual human work on the docs a bit? As it stands, they are fairly egregious, and they seem to devote at least as much space to little AI-generated quips that convey no meaning than to actually explaining what’s going on.

        Also, maybe a human should decide whether these are “function” hooks or “module” hooks. All of this marketing calls them “function” hooks, but the json config seems entirely unaware of this.

        (Has anyone else noticed that half the sentences in Claudish aren’t merely weird: they are noun phrases and not sentences at all? I’m pretty sure that any decent pre-LLM NLP-based grammar checker would correctly flag half the sentences in Claudish. Also, whatever variant of Claude wrote this thing can’t even capitalize around semicolons consistently with itself, let alone consistently with how English has been written for at least a century.)

        edit: Fixed the link. Thanks, kaszanka.

        1. kaszanka · · focus · HN ↗
          If the direct link isn&#x27;t working for anyone else (looks like it&#x27;s some AWS pre-signed one maybe tied to IP): <a href="https:&#x2F;&#x2F;github.com&#x2F;user-attachments&#x2F;files&#x2F;31802150&#x2F;EXTERNAL.Function.Hooks.Core.Architecture.pdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;user-attachments&#x2F;files&#x2F;31802150&#x2F;EXTERNAL....
        2. dogleash · · focus · HN ↗
          &gt; they are noun phrases and not sentences at all? I’m pretty sure that any decent pre-LLM NLP-based grammar checker would correctly flag half the sentences in Claudish. Also, whatever variant of Claude wrote this thing can’t even capitalize around semicolons consistently with itself, let alone consistently with how English has been written for at least a century.

          Probably just a case of a company hoping their scale can change the societal standard faster than they can be bothered to match the standard.

          You&#x27;ll talk like 2023 unsupervised TikTok generators and you&#x27;ll be happy.

        3. mpoteat · · focus · HN ↗
          Ouch! Much of this verbiage was dictated by me personally; I just have a fairly distinct register some might consider inscrutable. My English teachers in grade school always said the same :)

          Rest assured I&#x27;ll inject a bit less soul into the official docs once Mods are launched; re your feedback on the JSON key, what would you recommend?

          1. amluto · · focus · HN ↗
            Your comment here is written in perfectly fine English :)

            Maybe &quot;function_hook_modules&quot; for the JSON key?

            Does this finally fix the limitation that there is no supportable way to replace the implementation of a native tool in Claude Code? codex-rs has an (undocumented but likely supportable if kind of awkward) mechanism, and I’m part way through a project that needs this. I was going to release it with a recommendation not to use Claude Code, but it’s at least plausible that this will change my mind. (I’m not sure yet — the $ mechanism might be too restrictive. It’s a start at least.)

            1. amluto · · focus · HN ↗
              Having given the JSON more than two seconds of thought, I have a very different suggestion:

                  {
                   &quot;function_hooks&quot;: {
                    &quot;version&quot;: 1,
                    &quot;source_file&quot;: &quot;.&#x2F;whatever.ts&quot;,
                    &quot;language&quot;: &quot;TypeScript&quot;,
                    &quot;hash&quot;: &quot;sha256:abcd...&quot;
                   }
                  }
              
              Don&#x27;t trust my formatting -- I typed this in the comment box and I have not run it through a prettifier or anything.

              The point here is that there&#x27;s a world adjacent to but not actually contained within Claude Code in which not everything blindly trusts everything else, and maybe it&#x27;s time to start remembering some lessons from the 90&#x27;s on. For example:

              - Don&#x27;t sniff content types and preferably don&#x27;t infer them from filenames either.

              - Don&#x27;t trust your subresource to arrive intact. Pin those hashes and verify them!

              - Leave some room for extensibility.

              - Maybe don&#x27;t require everyone to mix their code with the security policy that controls edits to that code? I realize that anyone cursed with GitHub Actions is forced to violate this rule in the most outrageous ways imaginable, but that doesn&#x27;t mean that Claude Code needs to follow suit forever. Once there&#x27;s subresource integrity, the actual subresource can be put somewhere else where it belongs better. If there&#x27;s &quot;source_file&quot;, in the future there can be &quot;source_url&quot; and such without trying to infer it from the formatting of the string.

              (I&#x27;ve involved absolutely no AI in the preparation of this comment. I make plenty of use of AI, but I like my brain to stay exercised, and I like to think that I remain MUCH better at this kind of thing than even the best current models.)

              1. hluska · · focus · HN ↗
                For someone so pedantic, your writing is remarkably poor.
          2. xena · · focus · HN ↗
            Contact me at the email address in my HN account and we can arrange for a human with a soul and feelings to write the docs from scratch assuming you have a price in mind that values the nature of my talent and experience.
            1. mpoteat · · focus · HN ↗
              Wow, you&#x27;re Xe Iaso! I&#x27;ve reached out.
          3. massagedpelican · · focus · HN ↗
            Out of curiosity, I ran the PDF through pangram and it seemed to flag nearly the entire thing as AI. I recognize these aren&#x27;t perfect detectors, but they can give signals if nothing else. Perhaps it needs more soul injected!

            <a href="https:&#x2F;&#x2F;www.pangram.com&#x2F;history&#x2F;93f9ec71-f7b3-4680-86b1-ff129549cb16?ucc=VlhV1svqmKk" rel="nofollow">https:&#x2F;&#x2F;www.pangram.com&#x2F;history&#x2F;93f9ec71-f7b3-4680-86b1-ff12...

            1. KurtMueller · · focus · HN ↗
              Perhaps these &quot;ai detectors&quot; are snake oil
              1. sebmellen · · focus · HN ↗
                There’s definitely a snake oil component, but Pangram is unbelievably accurate. Creepily so in my opinion
                1. computomatic · · focus · HN ↗
                  How do you evaluate that?
                  1. sebmellen · · focus · HN ↗
                    Well, I&#x27;ve tried to get around it for our corporate SEO blogging strategy, and I&#x27;ve found that it&#x27;s just not possible to do it (even with really crazy techniques where you have different models combined to produce the output, or you change your prompting style massively). The minute I take the same article that the LLM gave me and I rewrite it in my own voice (meaning just take the information and topics, but rewrite it from scratch), the post works immediately and passes as 100% human on Pangram.

                    The only thing that gets around that is StealthGPT, but it mangles your intent in the output so badly that it&#x27;s easier to just write the thing yourself.

            2. karagenit · · focus · HN ↗
              Yeah, this doc is really interesting. It has some absolutely claude-fried lines like:

              &gt; A hook is Koa-style middleware: it reifies an endomorphic continuation

              &gt; Five forms, each on tool.call;

              But on the other hand uses distinctly human phrases like “one may” and “etc.&#x2F;e.g.” that I rarely see LLMs use. Not sure what to think.

              1. echoangle · · focus · HN ↗
                Maybe Claude is RLHFd primarily on texts by mpoteat and that’s why it talks this way
                1. thinkingemote · · focus · HN ↗
                  I know it&#x27;s a joke but if you look at many of the key AI researchers papers (written pre-LLM mass adoption) you can see some similarities with how LLMs structure their output.

                  I&#x27;d love to do some stylometry on this...

              2. bmitc · · focus · HN ↗
                I have found that Opus 5 and Fable love bringing up category theory at the drop of a hat.
          4. arbot360 · · focus · HN ↗
            Not beating the allegations on &quot;Claude doesn&#x27;t speak human because Anthropic employees don&#x27;t speak human.&quot;
          5. SupLockDef · · focus · HN ↗
            I am going to be called on that one, but I have to call on your bullshit here. You didn&#x27;t write this.
          6. crooked-v · · focus · HN ↗
            It&#x27;s a register that would be great for some tabletop games or pop science writing, but in this context it could really use a technical editor to aggressively remove phrasing like &quot;keeping the fold neatly uniform&quot; and &quot;affordance surface&quot;, as well as change things like &quot;hooks live in a hooks.json file, today of four extant types&quot; into plain technical language (&quot;there are four types of hook that can be defined in hooks.json&quot;).
          7. ipsi · · focus · HN ↗
            &gt; Ouch! Much of this verbiage was dictated by me personally; I just have a fairly distinct register some might consider inscrutable.

            I do notice that the more Claude-generated stuff I read, the more it creeps into my daily usage, and I suspect I don&#x27;t read nearly as much of it as an Anthropic Employee would, so I could believe that. Though &quot;much of&quot; isn&#x27;t the same as &quot;written with zero AI generation&#x2F;rephrasing&#x2F;etc.&quot;

            Anyway, that aside, something I would like to see is an example of something that&#x27;s possible with this system that isn&#x27;t, or isn&#x27;t easily, possible with existing Claude hooks. Right now it reads like &quot;Here&#x27;s a cool thing! Here&#x27;s how it works! And here&#x27;s this other similar system we have! Here&#x27;s how that works!&quot; But there&#x27;s no summary of the differences, why I&#x27;d use this over regular hooks, and so on. Or at least not that I saw on quick skim, and I&#x27;d be looking for that to be mentioned as early as possible, so I know if the rest is worth reading.

          8. ApatheticCosmos · · focus · HN ↗
            What if we have it all backwards? What if Claude-speak, as some like to call it, is actually caused by this one dude dictating the documentation?
            1. datadrivenangel · · focus · HN ↗
              her writing style isn&#x27;t normally this claudish though!
            2. nextaccountic · · focus · HN ↗
              Well regardless of the origins of Claude-speak, I&#x27;m sure millions of humans are picking up some of its idioms, and at least some fraction of it will enter standard English in some decades
          9. hluska · · focus · HN ↗
            Your writing is fine, documentation is hard and nobody is perfect at launch. I can all but guarantee I have more editing experience than the commenter and trust me, you’re fine.
          10. iam-TJ · · focus · HN ↗
            I think the various recent articles about agent output using ASD-STE100 Simplified Technical English are quite pertinent here. For example:

            &quot;Agent Skill to Force Docs in ASD-STE100 Simplified Technical English&quot;

            <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49114639">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49114639

        4. JDups · · focus · HN ↗
          Writing documentation is one of the most often mentioned uses of LLMs. I suppose if Anthropic wouldn&#x27;t be doing it it would put into question why anyone else would.
        5. hluska · · focus · HN ↗
          I’m curious… would you talk to them like this in person? The only ‘egregious’ thing I read here was your reaction. Maybe you could consider acting more human?
        6. yearolinuxdsktp · · focus · HN ↗
          Here&#x27;s a palatable, clear version:

          <a href="https:&#x2F;&#x2F;pdfhost.io&#x2F;v&#x2F;2CVhPGy9Kw_CLEAR_Function_Hooks_Core_Architecture" rel="nofollow">https:&#x2F;&#x2F;pdfhost.io&#x2F;v&#x2F;2CVhPGy9Kw_CLEAR_Function_Hooks_Core_Ar...

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.