Evaluating AGENTS.md: are they helpful for coding agents?

2026-02-1612:15232161arxiv.org

A widespread practice in software development is to tailor coding agents to repositories using context files, such as AGENTS.md, by either manually or automatically generating them. Although this…

Skip to main content
View PDF HTML (experimental)
Abstract:A widespread practice in software development is to tailor coding agents to repositories using context files, such as this http URL, by either manually or automatically generating them. Although this practice is strongly encouraged by agent developers, there is currently no rigorous investigation into whether such context files are actually effective for real-world tasks. In this work, we study this question and evaluate coding agents' task completion performance in two complementary settings: established SWE-bench tasks from popular repositories, with LLM-generated context files following agent-developer recommendations, and a novel collection of issues from repositories containing developer-committed context files.
Across multiple coding agents and LLMs, we find that context files tend to reduce task success rates compared to providing no repository context, while also increasing inference cost by over 20%. Behaviorally, both LLM-generated and developer-provided context files encourage broader exploration (e.g., more thorough testing and file traversal), and coding agents tend to respect their instructions. Ultimately, we conclude that unnecessary requirements from context files make tasks harder, and human-written context files should describe only minimal requirements.
From: Thibaud Gloaguen [view email]
[v1] Thu, 12 Feb 2026 14:15:22 UTC (2,264 KB)


Read the original article

Comments

  • By deaux 2026-02-178:217 reply

    I read the study. I think it does the opposite of what the authors suggest - it's actually vouching for good AGENTS.md files.

    > Surprisingly, we observe that developer-provided files only marginally improve performance compared to omitting them entirely (an increase of 4% on average), while LLM- generated context files have a small negative effect on agent performance (a decrease of 3% on average).

    This "surprisingly", and the framing seems misplaced.

    For the developer-made ones: 4% improvement is massive! 4% improvement from a simple markdown file means it's a must-have.

    > while LLM- generated context files have a small negative effect on agent performance (a decrease of 3% on average)

    This should really be "while the prompts used to generate AGENTS files in our dataset..". It's a proxy for prompts, who knows if the ones generated through a better prompt show improvement.

    The biggest usecase for AGENTS.md files is domain knowledge that the model is not aware of and cannot instantly infer from the project. That is gained slowly over time from seeing the agents struggle due to this deficiency. Exactly the kind of thing very common in closed-source, yet incredibly rare in public Github projects that have an AGENTS.md file - the huge majority of which are recent small vibecoded projects centered around LLMs. If 4% gains are seen on the latter kind of project, which will have a very mixed quality of AGENTS files in the first place, then for bigger projects with high-quality .md's they're invaluable when working with agents.

    • By nielstron 2026-02-179:554 reply

      Hey thanks for your review, a paper author here.

      Regarding the 4% improvement for human written AGENTS.md: this would be huge indeed if it were a _consistent_ improvement. However, for example on Sonnet 4.5, performance _drops_ by over 2%. Qwen3 benefits most and GPT-5.2 improves by 1-2%.

      The LLM-generated prompts follow the coding agent recommendations. We also show an ablation over different prompt types, and none have consistently better performance.

      But ultimately I agree with your post. In fact we do recommend writing good AGENTS.md, manually and targetedly. This is emphasized for example at the end of our abstract and conclusion.

      • By vidarh 2026-02-1710:152 reply

        Without measuring quality of output, this seems irrelevant to me.

        My use of CLAUDE.md is to get Claude to avoid making stupid mistakes that will require subsequent refactoring or cleanup passes.

        Performance is not a consideration.

        If anything, beyond CLAUDE.md I add agent harnesses that often increase the time and tokens used many times over, because my time is more expensive than the agents.

        • By _joel 2026-02-1711:26

          CLAUDE.md isn't a silver bullet either, I've had it lose context a couple of questions deep. I do like GSD[1] though, it's been a great addition to the stack. I also use multiple, different LLMs as a judge for PRs, which captures a load of issues too.

          [1] https://github.com/gsd-build/get-shit-done

        • By yorwba 2026-02-1712:481 reply

          In this context, "performance" means "does it do what we want it to do" not "does it do it quickly". Quality of output is what they're measuring, speed is not a consideration.

          • By vidarh 2026-02-1721:551 reply

            The point is that whether it does what you tell it in a single iteration is less important then whether it avoids stupid mistakes. Any serious use will put it in a harness.

            • By yorwba 2026-02-1811:361 reply

              My point is that you misread the comment you replied to. (By the way, on page 2 of the paper: "we evaluate each LLM only within its corresponding harness.")

              • By vidarh 2026-02-1819:011 reply

                > My point is that you misread the comment you replied to.

                I'm not the person you replied to.

                > (By the way, on page 2 of the paper: "we evaluate each LLM only within its corresponding harness.")

                That has zero relevance to my comment or to the type of harnesses I talked about in the comment you replied to, nor in my comment up-thread.

                • By yorwba 2026-02-1821:23

                  The only people I have replied to in this thread were vidarh, vidarh, and now vidarh again. I thought you were all the same person?

      • By sdenton4 2026-02-1713:101 reply

        You're measuring binary outcomes, so you can use a beta distribution to understand the distribution of possible success rates given your observations, and thereby provide a confidence interval on the observed success rates. This week help us see whether that 4% success rate is statistically significant, or if it is likely to be noise.

        • By bee_rider 2026-02-1713:521 reply

          I’ve only ever gotten, like, slight wording suggestions from reviewers. I wish they would write things like this instead—it is possibly meaningful and eminently do-able (doesn’t even require new data!).

          • By sdenton4 2026-02-1717:37

            Taking a slightly closer look at the paper, you've got K repositories and create a set of test cases within each repository, totaling 130-ish tests. There may be some 'repository-level' effects - ie, tasks may be easier in some repo's than others.

            Modeling the overall success rate then requires some hierarchical modeling. You can consider each repository as a weighted coin, and each test within a repository as flip of that particular coin. You want to estimate the overall probability of getting heads, when choosing a coin at random and then flipping it.

            Here's some Gemini hints on how to proceed with getting the confidence interval using hierarchical bayes: https://gemini.google.com/corp/app/e9de6a12becc57f6

            (Still no need for further data!)

      • By regularfry 2026-02-1713:521 reply

        > Regarding the 4% improvement for human written AGENTS.md: this would be huge indeed if it were a _consistent_ improvement. However, for example on Sonnet 4.5, performance _drops_ by over 2%. Qwen3 benefits most and GPT-5.2 improves by 1-2%.

        Ok so that's interesting in itself. Apologies if you go into this in the paper, not had time to read it yet, but does this tell us something about the models themselves? Is there a benchmark lurking here? It feels like this is revealing something about the training, but I'm not sure exactly what.

        • By nielstron 2026-02-1717:26

          It could... but as pointed out by other the significance is unclear and per-model results have even less samples than the benchmark average. So: maybe :)

      • By deaux 2026-02-1714:501 reply

        Thank you for turning up here and replying!

        > The LLM-generated prompts follow the coding agent recommendations. We also show an ablation over different prompt types, and none have consistently better performance.

        I think the coding agent recommended LLM-generated AGENTS.md files are almost without exception really bad. Because the AGENTS.md, to perform well, needs to point out the _non_-obvious. Every single LLM-generated AGENTS.md I've seen - including by certain vendors who at one point in time out-of-the-box included automatic AGENTS.md generation - wrote about the obvious things! The literal opposite of what you want. Indeed a complete and utter waste of tokens that does nothing but induce context rot.

        I believe this is because creating a good one consumes a massive amount of resources and some engineering for any non-trivial codebase. You'd need multiple full-context iterations, and a large number of thinking tokens.

        On top of that, and I've said this elsewhere, most of the best stuff to put in AGENTS.md is things that can't be inferred from the repo. Things like "Is this intentional?", "Why is this the case?" and so on. Obviously, the LLM nor a new-to-the-project human could know this or add them to the file. And the gains from this are also hard to capture by your performance metric, because they're not really about the solving of issues, they're often about direction, or about the how rather than the what.

        As for the extra tokens, the right AGENTS.md can save lots of tokens, but it requires thinking hard about them. Which system/business logic would take the agent 5 different file reads to properly understand, but can we summarize in 3 sentences?

        • By nielstron 2026-02-1717:271 reply

          Yes that's a great summary and I agree broadly.

          Note with different prompt types I refer to different types of meta-prompts to generate the AGENTS.md. All of these are quite useless. Some additional experiments not in the paper showed that other automated approaches are also useless ("memory" creating methods, broadly speaking).

          • By c0rleyma 2026-02-1721:43

            I will read the paper, but I am curious if the methods promoted by eng/researchers at openai for models like codex 5.2/5.3 work? ie, is having a separate agent look at recent agent sessions and deduce problems the agents ran into and update agents.md (or more likely, the indexed docs referenced in an agents.md) actually helpful? A priori that seems like the main kind of meta prompting/harness you might expect to work more robustly.

    • By SerCe 2026-02-1711:59

      In Theory There Is No Difference Between Theory and Practice, While In Practice There Is.

      In large projects, having a specific AGENTS.md makes the difference between the agent spending half of its context window searching for the right commands, navigating the repo, understanding what is what, etc., and being extremely useful. The larger the repository, the more things it needs to be aware of and the more important the AGENTS.md is. At least that's what I have observed in practice.

    • By giancarlostoro 2026-02-1712:361 reply

      > The biggest usecase for AGENTS.md files is domain knowledge that the model is not aware of and cannot instantly infer from the project. That is gained slowly over time from seeing the agents struggle due to this deficiency.

      This. I have Claude write about the codebase because I get tired of it grepping files constantly. I rather it just know “these files are for x, these files have y methods” and I even have it breakdown larger files so it fits the entire context window several times over.

      Funnily enough this makes it easier for humans to parse.

      • By belval 2026-02-1712:513 reply

        My pet peeve with AI is that it tends to work better in codebase where humans do well and for the same reason.

        Large orchestration package without any tests that relies on a bunch of microservices to work? Claude Code will be as confused as our SDEs.

        This in turns lead to broader effort to refactor our antiquated packages in the name of "making it compatible with AI" which actually means compatible with humans.

        • By giancarlostoro 2026-02-1716:56

          In my opinion it’s not just compatible with AI its code that now fits in your head. Lots of famous “we can rewrite it later” remarks throughout my career… Well the AI can rewrite it, and now you can understand it.

          Always make it write out a plan, write out unit tests that match the codebase as-is, and if adjusted are only changed in how they call the code in the future, giving you confidence that the rewrite didn't break core logic.

        • By dsjoerg 2026-02-2516:58

          AI is teaching some people that best practices actually matter.

        • By anamexis 2026-02-1715:51

          Why is that a pet peeve, though? Seems like a win/win.

    • By bootsmann 2026-02-178:405 reply

      This reads a lot like bargaining stage. If agentic AI makes me a 10 times more productive developer, surely a 4% improvement is barely worth the token cost.

      • By koiueo 2026-02-178:54

        > If agentic AI makes me a 10 times more productive

        I'm not sure what you are suggesting exactly, but wanted to highlight this humongous "if".

      • By staticassertion 2026-02-179:40

        If something makes you 10x as effective and then you improve that thing by 4%...

      • By zero_k 2026-02-179:44

        It's not only about the token cost! It's also my TIME cost! Much-much more expensive than tokens, it turns out ;)

      • By croes 2026-02-179:321 reply

        10x is that quantity or quality?

    • By wolfejam 2026-02-2516:03

      Well said. And it's potentially a 7% swing when you think about it — +4% with good human-written context vs. -3% with LLM-generated noise. That's a significant delta from just the quality of the information.

      The real value is exactly what you described: the tribal knowledge, the "we tried X and it broke because Y", the constraints that live in someone's head and nowhere in the code. LLM-generated files miss this because the LLM is just restating what it can already see. Of course that doesn't help.

    • By zero_k 2026-02-179:431 reply

      Honestly, the more research papers I read, the more I am suspicious. This "surprisingly" and other hyperbole is just to make reviewers think the authors actually did something interesting/exciting. But the more "surprises" there are in a paper, the more I am suspicious of it. Often such hyperbole ought to be at best ignored, at worst the exact opposite needs to be examined.

      It seems like the best students/people eventually end up doing CS research in their spare time while working as engineers. This is not the case for many other disciplines, where you need e.g. a lab to do research. But in CS, you can just do it from your basement, all you need is a laptop.

      • By MITSardine 2026-02-1712:32

        Well, you still need time (and permission from your employer)! Research is usually a more than full time job on its own.

    • By pgt 2026-02-1711:11

      4% is yuuuge. In hard projects, 1% is the difference between getting it right with an elegant design or going completely off the rails.

  • By pamelafox 2026-02-176:253 reply

    This is why I only add information to AGENTS.md when the agent has failed at a task. Then, once I've added the information, I revert the desired changes, re-run the task, and see if the output has improved. That way, I can have more confidence that AGENTS.md has actually improved coding agent success, at least with the given model and agent harness.

    I do not do this for all repos, but I do it for the repos where I know that other developers will attempt very similar tasks, and I want them to be successful.

    • By viraptor 2026-02-177:262 reply

      You can also save time/tokens if you see that every request starts looking for the same information. You can front-load it.

      • By sebazzz 2026-02-177:401 reply

        Also take the randomness out of it. Sometimes the agent executing tests one way, sometimes the other way.

        • By Maxion 2026-02-1712:21

          I've found https://github.com/casey/just to be very very useful. Allows to bind common commands simple smaller commands that can be easily referenced. Good for humans too.

      • By NicoJuicy 2026-02-178:27

        Don't forget to update it regularly then

    • By imiric 2026-02-177:042 reply

      That's a sensible approach, but it still won't give you 100% confidence. These tools produce different output even when given the same context and prompt. You can't really be certain that the output difference is due to isolating any single variable.

      • By pamelafox 2026-02-177:38

        So true! I've also setup automated evaluations using the GitHub Copilot SDK so that I can re-run the same prompt and measure results. I only use that when I want even more confidence, and typically when I want to more precisely compare models. I do find that the results have been fairly similar across runs for the same model/prompt/settings, even though we cannot set seed for most models/agents.

      • By ChrisGreenHeur 2026-02-178:43

        same with people, no matter what info you give a person you cant be sure they will follow it the same every time

    • By averrous 2026-02-176:47

      Agree. I also found out that rule discovery approach like this perform better. It is like teaching a student, they probably have already performed well on some task, if we feed in another extra rule that they already well verse at, it can hinder their creativity.

  • By avhception 2026-02-177:099 reply

    When an agent just plows ahead with a wrong interpretation or understanding of something, I like to ask them why they didn't stop to ask for clarification. Just a few days ago, while refactoring minor stuff, I had an agent replace all sqlite-related code in that codebase with MariaDB-based code. Asked why that happened, the answer was that there was a confusion about MariaDB vs. sqlite because the code in question is dealing with, among other things, MariaDB Docker containers. So the word MariaDB pops up a few times in code and comments.

    I then asked if there is anything I could do to prevent misinterpretations from producing wild results like this. So I got the advice to put an instruction in AGENTS.md that would urge agents to ask for clarification before proceeding. But I didn't add it. Out of the 25 lines of my AGENTS.md, many are already variations of that. The first three:

    - Do not try to fill gaps in your knowledge with overzealous assumptions.

    - When in doubt: Slow down, double-check context, and only touch what was explicitly asked for.

    - If a task seems to require extra changes, pause and ask before proceeding.

    If these are not enough to prevent stuff like that, I don't know what could.

    • By Sevii 2026-02-177:163 reply

      Are agents actually capable of answering why they did things? An LLM can review the previous context, add your question about why it did something, and then use next token prediction to generate an answer. But is that answer actually why the agent did what it did?

      • By gas9S9zw3P9c 2026-02-177:252 reply

        It depends. If you have an LLM that uses reasoning the explanation for why decisions are made can often be found in the reasoning token output. So if the agent later has access to that context it could see why a decision was made.

        • By Kubuxu 2026-02-178:141 reply

          Reasoning, in majority of cases, is pruned at each conversation turn.

          • By DonHopkins 2026-02-179:491 reply

            The cursor-mirror skill and cursor_mirror.py script lets you search through and inschpekt all of your chat histories, all of the thinking bubbles and prompts, all of the context assembly, all of the tool and mcp calls and parameters, and analyze what it did, even after cursor has summarized and pruned and "forgotten" it -- it's all still there in the chat log and sqlite databases.

            cursor-mirror skill and reverse engineered cursor schemas:

            https://github.com/SimHacker/moollm/tree/main/skills/cursor-...

            cursor_mirror.py:

            https://github.com/SimHacker/moollm/blob/main/skills/cursor-...

              The German Toilet of AI
            
              "The structure of the toilet reflects how a culture examines itself." — Slavoj Zizek
            
              German toilets have a shelf. You can inspect what you've produced before flushing. French toilets rush everything away immediately. American toilets sit ambivalently between.
            
              cursor-mirror is the German toilet of AI.
            
              Most AI systems are French toilets — thoughts disappear instantly, no inspection possible. cursor-mirror provides hermeneutic self-examination: the ability to interpret and understand your own outputs.
            
              What context was assembled?
              What reasoning happened in thinking blocks?
              What tools were called and why?
              What files were read, written, modified?
            
              This matters for:
            
              Debugging — Why did it do that?
              Learning — What patterns work?
              Trust — Is this skill behaving as declared?
              Optimization — What's eating my tokens?
            
              See: Skill Ecosystem for how cursor-mirror enables skill curation.
            
            ----

            https://news.ycombinator.com/item?id=23452607

            According to Slavoj Žižek, Germans love Hermeneutic stool diagnostics:

            https://www.youtube.com/watch?v=rzXPyCY7jbs

            >Žižek on toilets. Slavoj Žižek during an architecture congress in Pamplona, Spain.

            >The German toilets, the old kind -- now they are disappearing, but you still find them. It's the opposite. The hole is in front, so that when you produce excrement, they are displayed in the back, they don't disappear in water. This is the German ritual, you know? Use it every morning. Sniff, inspect your shits for traces of illness. It's high Hermeneutic. I think the original meaning of Hermeneutic may be this.

            https://en.wikipedia.org/wiki/Hermeneutics

            >Hermeneutics (/ˌhɜːrməˈnjuːtɪks/)[1] is the theory and methodology of interpretation, especially the interpretation of biblical texts, wisdom literature, and philosophical texts. Hermeneutics is more than interpretive principles or methods we resort to when immediate comprehension fails. Rather, hermeneutics is the art of understanding and of making oneself understood.

            ----

            Here's an example cursor-mirror analysis of an experiment with 23 runs with four agents playing several turns of Fluxx per run (1 run = 1 completion call), 1045+ events, 731 tool calls, 24 files created, 32 images generated, 24 custom Fluxx cards created:

            Cursor Mirror Analysis: Amsterdam Fluxx Championship -- Deep comprehensive scan of the entire FAFO tournament development:

            amsterdam-flux CURSOR-MIRROR-ANALYSIS.md:

            https://github.com/SimHacker/moollm/blob/main/skills/experim...

            amsterdam-flux simulation runs:

            https://github.com/SimHacker/moollm/tree/main/skills/experim...

            • By mkesper 2026-02-1711:521 reply

              Just an update re German toilets: No toilet set up in the last 30 years (I know of) uses a shelf anymore. This reduces water usage by about 50% per flush.

              • By DonHopkins 2026-02-1712:26

                But then what do you have to talk about all day??!

        • By kgeist 2026-02-1713:391 reply

          LLMs often already "know" the answer starting from the first output token and then emulate "reasoning" so that it appeared as if it came to the conclusion through logic. There's a bunch of papers on this topic. At least it used to be the case a few months ago, not sure about the current SOTA models.

          • By nrds 2026-02-1718:26

            Wait, that's not right, let me think through this more carefully...

      • By bananapub 2026-02-1710:44

        of course not, but it can often give a plausible answer, and it's possible that answer will actually happen to be correct - not because it did any - or is capable of any - introspection, but because it's token outputs in response to the question might semi-coincidentally be a token input that changes the future outputs in the same way.

      • By Onavo 2026-02-1710:10

        Well, the entire field of explainable AI has mostly thrown in the towel..

    • By bandrami 2026-02-177:191 reply

      Isn't that question a category error? The "why" the agent did that is that it was the token that best matched the probability distribution of the context and the most recent output (modulo a bit of randomness). The response to that question will, again, be the tokens that best match the probability distribution of the context (now including the "why?" question and the previous failed attempt).

      • By tibbar 2026-02-177:231 reply

        if the agent can review its reasoning traces, which i think is often true in this era of 1M token context, then it may be able to provide a meaningful answer to the question.

        • By bandrami 2026-02-177:394 reply

          Wait, no, that's the category error I'm talking about. Any answer other than "that was the most likely next token given the context" is untrue. It is not describing what actually happened.

          • By tibbar 2026-02-178:021 reply

            I think this statement is on the same level as "a human cannot explain why they gave the answer they gave because they cannot actually introspect the chemical reactions in their brain." That is true, but a human often has an internal train of thought that preceded their ultimate answer, and it is interesting to know what that train of thought was.

            In the same way, it is often quite instructive to know what the reasoning trace was that preceded an LLM's answer, without having to worry about what, mechanically, the LLM "understood" about the tokens, if this is even a meaningful question.

            • By bandrami 2026-02-178:091 reply

              But it's not a reasoning trace. Models could produce one if they were designed to (an actual stack of the calls and the states of the tensors with each call, probably with a helpful lookup table for the tokens) but they specifically haven't been made to do that.

              • By rocqua 2026-02-178:131 reply

                When you put an LLM in reasoning mode, it will approximately have a conversation with itself. This mimics an inner monologue.

                That conversation is held in text, not in any internal representation. That text is called the reasoning trace. You can then analyse that trace.

                • By bandrami 2026-02-178:152 reply

                  Unless things have changed drastically in the last 4 months (the last time I looked at it) those traces are not stored but reconstructed when asked. Which is still the same problem.

                  • By ehsanu1 2026-02-178:51

                    They aren't necessarily "stored" but they are part of the response content. They are referred to as reasoning or thinking blocks. The big 3 model makers all have this in their APIs, typically in an encrypted form.

                    Reconstruction of reasoning from scratch can happen in some legacy APIs like the OpenAI chat completions API, which doesn't support passing reasoning blocks around. They specifically recommend folks to use their newer esponses API to improve both accuracy and latency (reusing existing reasoning).

                  • By tibbar 2026-02-178:431 reply

                    For a typical coding agent, there are intermediate tool call outputs and LLM commentary produced while it works on a task and passed to the LLM as context for follow up requests. (Hence the term agent: it is an LLM call in a loop.) You can easily see this with e.g. Claude Code, as it keeps track of how much space is left in the context and requires "context compaction" after the context gradually fills up over the course of a session.

                    In this regard, the reasoning trace of an agent is trivially accessible to clients, unlike the reasoning trace of an individual LLM API call; it's a higher level of abstraction. Indeed, I implemented an agent just the other day which took advantage of this. The OP that you originally replied to was discussing an agentic coding process, not an individual LLM API call.

                    • By bandrami 2026-02-1710:051 reply

                      Well, right, I see those reasoning stages in reasoning models with Ollama and if you ask it what its reasoning was after the fact what it says is different than what it said at the time.

                      • By tibbar 2026-02-1720:10

                        I can't speak to your specific set up, but it sounds like you're halfway there if you can access the previous traces? All anyone can ask for is "show me the traces that led up to this point"; the "why did you do this" is a notational convenience for querying that data. If your set up isn't summarizing those traces correctly, then that sounds like a specific bug in the context or model quality, but the point is that the traces exist and are queryable in the first place, however you choose to do that.

                        (I am still primarily talking about agent traces, like the original OP, not internal reasoning blocks for a particular LLM call, though - which may or may not be available in context afterwards.)

                        In particular, asking "why" isn't a category error here, although there's only a meaningful answer if the model has access to the previous traces in its context, which is sometimes true and sometimes not.

          • By dash2 2026-02-177:451 reply

            There can be higher- and lower-level descriptions of the same phenomenon. when the kettle boils, it’s because the water molecules were heated by the electric element, but it’s also because I wanted a cup of tea.

            • By ChrisGreenHeur 2026-02-178:471 reply

              the llm has no wants

              • By mikkupikku 2026-02-1714:41

                If the reason the LLM retroactively invents for it's previous mistakes is still useful for getting the LLM to not make that kind of mistake again, then the distinction you're driving at doesn't matter.

          • By rafaelmn 2026-02-178:231 reply

            > Any answer other than "that was the most likely next token given the context" is untrue.

            "Because the matrix math resulted in the set of tokens that produced the output". "Because the machine code driving the hosting devices produced the output you saw". "Because the combination of silicon traces and charges on the chips at that exact moment resulted in the output". "Because my neurons fired in a particular order/combination".

            I don't see how your statement is any more useful. If an LLM has access to reasoning traces it can realistically waddle down the CoT and figure out where it took a wrong turn.

            Just like a human does with memories in context - does't mean that's the full story - your decision making is very subconscious and nonverbal - you might not be aware of it, but any reasoning you give to explain why you did something is bound to be an incomplete story, created by your brain to explain what happened based on what it knows - but there's hidden state it doesn't have access to. And yet we ask that question constantly.

            • By ChrisGreenHeur 2026-02-178:46

              well, do you want something useful or something true?

              the word why is used to get something true.

          • By rocqua 2026-02-178:10

            If you want to be pedantic about it you could phrase it as follows.

            When the LLM was in reasoning mode, in the reasoning context it often expressed statement X. Given that, and the relevance of statement X to the taken action. It seems likely that the presence of statement X in the context contributed to this action. Besides, the presence of statement X in the reasoning likely means that given the previous context embeddings of X are close to the context.

            Hence we think that the action was taken due to statement X.

            And that output could have come from an LLM introspecting it's own reasoning.

            I don't think that phrasing things so pedanticaly is worth the extra precision though. Especially not for the statement that inspecting the reasoning logs of sn LLM can help give insight on why an LLM acted a certain way.

    • By tomashubelbauer 2026-02-178:142 reply

      Just this morning I have run across an even narrower case of how AGENTS.md (in this case with GPT-5.3 Codex) can be completely ignored even if filled with explicit instructions.

      I have a line there that says Codex should never use Node APIs where Bun APIs exist for the same thing. Routinely, Claude Code and now Codex would ignore this.

      I just replaced that rule with a TypeScript-compiler-powered AST based deterministic rule. Now the agent can attempt to commit code with banned Node API usage and the pre-commit script will fail, so it is forced to get it right.

      I've found myself migrating more and more of my AGENTS.md instructions to compiler-based checks like these - where possible. I feel as though this shouldn't be needed if the models were good, but it seems to be and I guess the deterministic nature of these checks is better than relying on the LLM's questionable respect of the rules.

      • By iamflimflam1 2026-02-179:38

        Not that much different from humans.

        We have pre-commit hooks to prevent people doing the wrong thing. We have all sorts of guardrails to help people.

        And the “modern” approach when someone does something wrong is not to blame the person, but to ask “how did the system allow this mistake? What guardrails are missing?”

      • By MITSardine 2026-02-1712:35

        I wonder if some of these could be embedded in the write tool calls?

    • By geraneum 2026-02-177:27

      > So I got the advice to put an instruction in AGENTS.md that would urge agents to ask for clarification before proceeding.

      You may want to ask the next LLM versions the same question after they feed this paper through training.

    • By sensanaty 2026-02-1712:434 reply

      I really hate that the anthropomorphizing of these systems has successfully taken hold in people's brains. Asking it why it did something is completely useless because you aren't interrogating a person with a memory or a rationale, you’re querying a statistical model that is spitting out a justification for a past state it no longer occupies.

      Even the "thinking" blocks in newer models are an illusion. There is no functional difference between the text in a thought block and the final answer. To the model, they are just more tokens in a linear sequence. It isn't "thinking" before it speaks, the "thought" is the speech.

      Treating those thoughts as internal reflection of some kind is a category error. There is no "privileged" layer of reasoning happening in the silicon that then gets translated into the thought block. It’s a specialized output where the model is forced to show its work because that process of feeding its own generated strings back into its context window statistically increases the probability of a correct result. The chatbot providers just package this in a neat little window to make the model's "thinking" part of the gimmick.

      I also wouldn't be surprised if asking it stuff like this was actually counter productive, but for this I'm going off vibes. The logic being that by asking that, you're poisoning the context, similar to how if you try generate an image by saying "It should not have a crocodile in the image", it will put a crocodile into the image. By asking it why it did something wrong, it'll treat that as the ground truth and all future generation will have that snippet in it, nudging the output in such a way that the wrong thing itself will influence it to keep doing the wrong thing more and more.

      • By Bolwin 2026-02-1716:50

        You're entirely correct in that it's a different model with every message, every token. There's no past memory for it to reference.

        That said it can still be useful because you have a some weird behavior and 199k tokens of context, with no idea where the info is that's nudging it to do the weird thing.

        In this case you can think of it less as "why did you do this?" And more "what references to doing this exist in this pile of files and instructions?"

      • By bavell 2026-02-1713:441 reply

        Agreed. I wish more people understood the difference between tokens, embeddings, and latent space encodings. The actual "thinking" if you can call it that, happens in latent space. But many (even here on HN) believe the thinking tokens are the thoughts themselves. Silly meatbags!

        • By Majromax 2026-02-1714:34

          Thinking happens in latent space, but the thinking trace is then the projection of that thinking onto tokens. Since autoregressive generation involves sampling a specific token and continuing the process, that sampling step is lossy.

          However, it is a genuine question whether the literal meanings of thinking blocks are important over their less-observable latent meanings. The ultimate latent state attributable to the last-generated thinking token is some combination of the actual token (literal meaning) and recurrent thinking thus far. The latter does have some value; a 2024 paper (https://arxiv.org/abs/2404.15758) noted that simply adding dots to the output allowed some models to perform more latent computation resulting in higher-skill answers. However, since this is not a routine practice today I suspect that genuine "thinking" steps have higher value.

          Ultimately, your thesis can be tested. Take the output of a reasoning model inclusive of thinking tokens, then re-generate answers with:

          1. Different but semantically similar thinking steps (i.e. synonyms, summarization). That will test whether the model is encoding detailed information inside token latent space.

          2. Meaningless thinking steps (dots or word salad), testing whether the model is performing detailed but latent computation, effectively ignoring the semantic context of

          3. A semantically meaningful distraction (e.g. a thinking trace from a different question)

          Look for where performance drops off the most. If between 0 (control) and 1, then the thinking step is really just a trace of some latent magic spell, so it's not meaningful. If between 1 and 2, then thinking traces serve a role approximately like a human's verbalized train of thought. If between 2 and 3 then the role is mixed, leading back to the 'magic spell' theory but without the 'verbal' component being important.

      • By Majromax 2026-02-1714:08

        > I really hate that the anthropomorphizing of these systems has successfully taken hold in people's brains. Asking it why it did something is completely useless because you aren't interrogating a person with a memory or a rationale, you’re querying a statistical model that is spitting out a justification for a past state it no longer occupies.

        "Thinking meat! You're asking me to believe in thinking meat!"

        While next-token prediction based on matrix math is certainly a literal, mechanistic truth, it is not a useful framing in the same sense that "synapses fire causing people to do things" is not a useful framing for human behaviour.

        The "theory of mind" for LLMs sounds a bit silly, but taken in moderation it's also a genuine scientific framework in the sense of the scientific method. It allows one to form hypothesis, run experiments that can potentially disprove the hypothesis, and ultimately make skillful counterfactual predictions.

        > By asking it why it did something wrong, it'll treat that as the ground truth and all future generation will have that snippet in it, nudging the output in such a way that the wrong thing itself will influence it to keep doing the wrong thing more and more.

        In my limited experience, this is not the right use of introspection. Instead, the idea is to interrogate the model's chain of reasoning to understand the origins of a mistake (the 'theory of mind'), then adjust agents.md / documentation so that the mistake is avoided for future sessions, which start from an otherwise blank slate.

        I do agree, however, that the 'theory of mind' is very close to the more blatantly incorrect kind of misapprehension about LLMs, that since they sound humanlike they have long-term memory like humans. This is why LLM apologies are a useless sycophancy trap.

      • By seanmcdirmid 2026-02-1716:441 reply

        > Asking it why it did something is completely useless because you aren't interrogating a person with a memory or a rationale, you’re querying a statistical model that is spitting out a justification for a past state it no longer occupies.

        Asking it why it did something isn’t useless, it just isn’t fullproof. If you really think it’s useless, you are way too heavily into binary thinking to be using AI.

        Perfect is the enemy of useful in this case.

        • By sensanaty 2026-02-1720:101 reply

          I genuinely fail to see the usefulness, though, it seems counterproductive to me to do this kinda stuff. In my experience I just throw out the whole chat/session as soon as I notice it's starting to repeat mistakes/start doing stupid shit consistently, the few times I've tried interrogating it I could immediately tell all it was doing is, for lack of a better word, being a sycophant and aping my words back at me.

          • By seanmcdirmid 2026-02-180:15

            It hasn’t failed to be useful to me yet, even if it isn’t complete info about what went wrong. Better if you can ask it a specific question about what it did (why do you do X?). Sometimes it made a mistake and you can ask it how you can word instructions better to not make the mistake (useful in prompt engineering), sometimes I made an actual mistake and gave it conflicting instructions, sometimes it’s still something that can be fixed. Eventually it stops making mistakes because you’ve tested it enough and made your prompts robust. I guess your mileage will vary, but my experience is that it’s a conversation to get a good prompt, not a single one shot ask (which is why I save my prompts and reuse them).

    • By lebuin 2026-02-178:082 reply

      It seems like LLMs in general still have a very hard time with the concepts of "doubt" and "uncertainty". In the early days this was very visible in the form of hallucinations, but it feels like they fixed that mostly by having better internal fact-checking. The underlying problem of treating assumptions as truth is still there, just hidden better.

      • By hnbad 2026-02-178:29

        LLMs are basically improv theater. If the agent starts out with a wildly wrong assumption it will try to stick to it and adapt it rather than starting over. It can only do "yes and", never "actually nevermind, let me try something else".

        I once had an agent come up with what seemed like a pointlessly convoluted solution as it tried to fit its initial approach (likely sourced from framework documentation overemphasizing the importance of doing it "the <framework> way" when possible) to a problem for which it to me didn't really seem like a good fit. It kept reassuring me that this was the way to go and my concerns were invalid.

        When I described the solution and the original problem to another agent running the same model, it would instantly dismiss it and point out the same concerns I had raised - and it would insist on those being deal breakers the same way the other agent had dimissed them as invalid.

        In the past I've often found LLMs to be extremely opinionated while also flipping their positions on a dime once met with any doubt or resistance. It feels like I'm now seeing the opposite: the LLM just running with whatever it picked up first from the initial prompt and then being extremely stubborn and insisting on rationalizing its choice no matter how much time it wastes trying to make it work. It's sometimes better to start a conversation over than to try and steer it in the right direction at that point.

      • By avhception 2026-02-178:25

        Doubt and uncertainty is left for us humans.

    • By mustaphah 2026-02-1712:39

      This is like trying to fix hallucination by telling LLM not to hallucinate.

    • By delaminator 2026-02-1712:51

      so many times have ended up here :

      "You're absolutely correct. I should have checked my skills before doing that. I'll make sure I do it in the future."

HackerNews