‹ 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. 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.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.