Papers
Topics
Authors
Recent
Search
2000 character limit reached

On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents

Published 28 Jan 2026 in cs.SE, cs.AI, cs.ET, and cs.HC | (2601.20404v1)

Abstract: AI coding agents such as Codex and Claude Code are increasingly used to autonomously contribute to software repositories. However, little is known about how repository-level configuration artifacts affect operational efficiency of the agents. In this paper, we study the impact of AGENTS..md files on the runtime and token consumption of AI coding agents operating on GitHub pull requests. We analyze 10 repositories and 124 pull requests, executing agents under two conditions: with and without an AGENTS..md file. We measure wall-clock execution time and token usage during agent execution. Our results show that the presence of AGENTS..md is associated with a lower median runtime (Δ28.64Δ28.64%) and reduced output token consumption (Δ16.58Δ16.58%), while maintaining a comparable task completion behavior. Based on these results, we discuss immediate implications for the configuration and deployment of AI coding agents in practice, and outline a broader research agenda on the role of repository-level instructions in shaping the behavior, efficiency, and integration of AI coding agents in software development workflows.

Summary

  • The paper finds that AGENTS.md files reduce runtime by 28.64% and token usage by 16.58% during pull request operations.
  • The study employs empirical analysis over 124 pull requests from 10 repositories to compare performance with and without AGENTS.md files.
  • The results imply that repository-level configuration files can significantly lower computational costs and speed up task completion.

On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents

The paper "On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents" (2601.20404) investigates the role of AGENTS.md files in enhancing the operational efficiency of AI coding agents. These files are repository-level instruction artifacts that provide crucial contextual information to AI agents operating on software development tasks.

Introduction

Autonomous AI coding agents, such as Codex and Claude Code, have transformed the landscape of software development by autonomously managing tasks that include code generation, testing, and review. The behavioral efficiency of these agents not only hinges on their intrinsic capabilities but also on the contextual information provided by repositories, specifically through configuration artifacts like AGENTS.md files. This study empirically evaluates the impact of the AGENTS.md file presence on AI coding agents' runtime and token consumption during GitHub pull request operations.

Methodology

The authors conducted an empirical study involving 10 repositories and 124 pull requests. The research analyzed the operational efficiency of AI coding agents under two conditions: with and without AGENTS.md files. The primary performance metrics analyzed were wall-clock time-to-completion and token usage. This assessment aimed to discern how repository-level guidance affects the resource consumption of coding agents.

Results

The findings reveal that the presence of AGENTS.md files significantly enhances the efficiency of AI coding agents. Agents operating with AGENTS.md files exhibited a median runtime reduction of 28.64% and a 16.58% decrease in output token consumption.

Figure 1

Figure 1: Wall-clock time-to-completion distributions for agent runs with and without AGENTS.md.

These results underscore the pivotal role AGENTS.md files play in optimizing agent performance by lowering computational costs and speeding up task completion times.

Discussion

The paper's findings have substantial implications for the deployment and configuration of AI coding agents. By incorporating AGENTS.md files, repositories can substantially reduce task execution costs while maintaining task completion effectiveness. Furthermore, these results provide a foundation for future exploration into other dimensions of agent behavior, such as the correctness and maintainability of agent outputs in the presence of repository-specific configuration files.

Conclusion

The study contributes vital insights into the efficiency optimization of AI coding agents via repository-level instruction artifacts. It establishes AGENTS.md files as key players in enhancing agent efficiency and performance. The implications for software development workflows are far-reaching, suggesting that strategic enhancements in repository configuration can drive substantial gains in agent performance. Future research is poised to explore the nuanced impacts of these files on agent behavior and integration within diverse development environments.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

Explain it Like I'm 14

1. What is this paper about?

This paper studies whether a file called AGENTS.md can help AI coding agents work more efficiently.

AI coding agents are computer programs, such as OpenAI Codex, that can behave like software developers. They can read a code project, change files, run commands, fix bugs, and create proposed changes for a project.

An AGENTS.md file is like a special instruction manual for these AI agents. It may explain:

  • how the project is organized,
  • which coding rules to follow,
  • how to test the software, and
  • important project-specific information.

The researchers wanted to know whether giving an AI agent this extra information helps it finish coding tasks faster and use fewer computer resources.

2. What questions did the researchers ask?

The main research question was:

Does having an AGENTS.md file help an AI coding agent use fewer resources when completing a software task?

The researchers measured “resources” in two main ways:

  1. Time: How long the agent took to finish a task.
  2. Tokens: How much text the AI processed and generated.

Tokens are small pieces of text used by LLMs. They are a bit like counting the number of words or word parts the AI reads and writes. More tokens usually mean more computing work and higher cost.

The researchers also wanted to check that the agents still behaved normally and produced meaningful code changes.

3. How was the study carried out?

Choosing projects and tasks

The researchers began with many open-source GitHub projects. They selected projects that had:

  • exactly one AGENTS.md file in the main project folder,
  • useful information about the project’s structure, rules, or purpose, and
  • previous coding tasks recorded as merged pull requests.

A pull request is a proposed change to a software project. Other developers review it, and it may later be added to the project.

The researchers finally used:

  • 10 GitHub repositories
  • 124 pull requests
  • One AI agent: OpenAI Codex

The selected tasks were fairly small. Each task changed no more than 100 lines of code and affected no more than five files.

Comparing two nearly identical situations

For every task, the researchers ran Codex twice:

Test condition What the agent received
With AGENTS.md The project and its instruction file
Without AGENTS.md The same project, but with the instruction file removed

Everything else was kept the same, including the task description and the starting version of the project.

This is similar to testing two students with the same homework, same classroom, and same amount of time—but giving one student an instruction sheet and not giving it to the other. This makes it easier to see whether the instruction sheet caused a difference.

Recreating the original project situation

For each pull request, the researchers went back to the exact version of the project from just before the change was made. This meant the AI agent started with the same files that developers had originally seen.

When a pull request did not have a clear enough description, the researchers used another LLM to create a clearer task description based on the code change and the project’s file structure.

Measuring the results

The researchers recorded:

  • the total time taken by the AI agent,
  • the number of input tokens,
  • the number of output tokens, and
  • the number of cached tokens.

They also manually inspected 50 randomly selected tasks to make sure the agents produced real, non-empty code changes rather than stopping immediately or making completely random edits.

However, the researchers did not fully test whether every generated change was correct. They mainly studied speed and resource use.

4. What did the study find?

The agents generally performed more efficiently when they had an AGENTS.md file.

Faster completion

The median completion time fell from about 98.6 seconds without the file to 70.3 seconds with it.

That is a reduction of about 28.6%.

The average time also decreased:

  • Without AGENTS.md: about 163 seconds
  • With AGENTS.md: about 130 seconds

This means that the agents were usually able to finish their work more quickly when they had project-specific instructions.

Fewer output tokens

The amount of text generated by the AI also decreased:

  • Without AGENTS.md: median of 2,925 output tokens
  • With AGENTS.md: median of 2,440 output tokens

This is a reduction of about 16.6%.

The average output token use fell by about 20.1%. This suggests that the instruction file was especially helpful in some tasks where the agent might otherwise spend a lot of time explaining, planning, or trying different approaches.

Input tokens changed less

The number of tokens used to understand the project changed only slightly in the middle of the results. This suggests that the biggest improvement was not simply that the agent read less information. Instead, the agent may have needed fewer attempts, less exploration, or fewer repeated steps after receiving the instructions.

Why these findings matter

The results suggest that AGENTS.md files can act like a map for an AI coding agent. Instead of spending time figuring out where things are and which rules to follow, the agent can begin with useful information.

This could reduce:

  • waiting time for developers,
  • computer and cloud costs,
  • unnecessary messages between the agent and the AI model, and
  • wasted work while exploring the project.

The statistical test used by the researchers indicated that the differences in completion time and output tokens were unlikely to be caused only by random chance.

5. What are the limitations?

The paper presents promising results, but it does not prove that every AGENTS.md file will always help every AI agent.

The study has several limits:

  • It used only 10 repositories and 124 relatively small tasks.
  • It tested only OpenAI Codex and one model configuration.
  • The projects were selected using specific rules, so they may not represent all software projects.
  • The researchers measured speed and token use more thoroughly than correctness.
  • They did not yet explain exactly why the files helped. For example, the agent may have made fewer mistakes, explored fewer files, or needed fewer planning steps.

The researchers also point out that a poorly written or confusing AGENTS.md file might not help and could possibly make an agent’s work harder.

6. Possible impact of the research

This research suggests that software teams should consider maintaining an AGENTS.md file alongside their code. Such a file could give AI coding agents clear, up-to-date information about the project.

In the future, this might make AI development tools:

  • faster,
  • cheaper to operate,
  • easier to guide, and
  • better suited to individual projects.

The research also creates several questions for future studies. Researchers could test different kinds of instruction files, larger and more complicated coding tasks, and several different AI agents. They could also check whether the resulting code is correct, secure, easy to maintain, and truly follows the developers’ intentions.

In simple terms, the paper’s main message is: giving an AI coding agent a clear project guide can help it work faster and produce less unnecessary text, although more research is needed to find out whether it also produces better and more reliable code.

Practical Applications

Immediate Applications

The study provides practical evidence that a repository-level AGENTS.md file can reduce AI coding-agent runtime and output-token consumption without an obvious loss of task activity. The following applications are deployable with current repository and agent tooling, although their effectiveness should be monitored locally.

  • Software engineering: add a maintained AGENTS.md to repositories. Teams can create a root-level file describing project architecture, coding conventions, repository structure, build commands, and expected implementation practices. Based on the study’s paired experiments, this may reduce median agent runtime by approximately 28.64% and median output-token consumption by approximately 16.58% for small code-change tasks. Dependencies: The file must be accurate, discoverable by the agent, and sufficiently specific; the reported evidence comes from 10 repositories, 124 pull requests, and one Codex-based configuration.
  • CI/CD and pull-request automation. Organizations can include AGENTS.md in automated workflows that assign bug fixes, test repairs, refactoring tasks, or small feature changes to coding agents. Faster completion can reduce queue time in agent-driven pull-request pipelines and increase the number of tasks processed within a fixed compute budget. Dependencies: Sandboxed execution, repository-level permissions, automated testing, human review, and safeguards against agents modifying files outside the intended scope.
  • Cloud cost and token-budget management for AI coding services. Platform teams can treat AGENTS.md as a low-cost optimization layer before increasing model size or investing in more complex agent-planning systems. Reduced output tokens may lower API expenditure, while shorter execution times can improve utilization of shared runners and development environments. Dependencies: Actual monetary savings depend on the provider’s pricing model, token caching, model latency, and whether the instructions introduce additional input-token overhead.
  • Standardized repository onboarding for coding agents. Engineering teams can add an AGENTS.md template to new repositories and populate it with commands for testing, linting, formatting, deployment, and local development. This creates a version-controlled interface between project maintainers and autonomous agents, analogous to documentation intended for human contributors. Dependencies: Instructions must be kept synchronized with the codebase; stale guidance could cause incorrect edits, failed builds, or unsafe operational behavior.
  • Agent-aware code review and governance workflows. Pull-request bots can check whether an AGENTS.md file exists, whether it covers essential topics, and whether recent repository changes invalidate its instructions. Reviewers can request updates to the file when architecture, testing procedures, or coding standards change. Dependencies: Automated quality checks should not assume that the presence of a file guarantees correctness. The paper measures efficiency, not semantic correctness, maintainability, or alignment with developer intent.
  • Project-specific agent configuration in software organizations. Large organizations can maintain repository-level guidance for different teams, languages, and frameworks while preserving a common agent interface. For example, a Python service could specify test and type-check commands, whereas a mobile repository could describe platform-specific build and simulator workflows. Dependencies: Instruction precedence, inheritance across monorepos, conflicting nested files, and access-control requirements need to be defined by the agent platform.
  • Educational use in software-engineering courses. Instructors can use AGENTS.md to encode project conventions and ask students to evaluate how repository context affects an AI agent’s behavior. The supplied wrapper, Docker setup, and paired experimental design can support classroom demonstrations of reproducible agent evaluation. Dependencies: Educational deployments should include correctness assessment, attribution rules, and controls that prevent agents from completing graded work without meaningful student involvement.
  • Academic replication and benchmarking. Researchers can reproduce the paper’s with/without design using the online appendix, Dockerized environments, historical repository states, and pull-request tasks. This enables controlled studies of token use, runtime, task success, patch quality, and agent traces. Dependencies: Replication should address stochasticity through repeated runs and expand beyond Codex, ten repositories, small pull requests, and repositories already containing qualifying instruction files.
  • Operational dashboards for agent efficiency. Engineering platforms can record wall-clock time, input/output tokens, retries, tool calls, test results, and successful merge rates for tasks executed with and without repository guidance. Teams can then determine whether an AGENTS.md file provides a measurable benefit in their own codebase. Dependencies: Metrics must be interpreted jointly with correctness, security, review effort, and rollback rates rather than optimized in isolation.
  • Daily-life and small-team automation. Individual developers, students, and open-source maintainers can use a short AGENTS.md file to help an agent perform routine tasks such as updating tests, fixing lint violations, preparing small refactors, or explaining repository structure. Dependencies: This is most suitable for non-critical, reviewable changes. Sensitive credentials, production deployment instructions, and unverified security procedures should not be placed in agent-readable files without access controls.

Long-Term Applications

The paper’s findings also support broader applications that require validation across models, repositories, task types, and quality measures before reliable large-scale deployment.

  • Automated generation and maintenance of agent instruction files. Future tools could inspect repository structure, build scripts, test failures, contribution history, and developer documentation to draft or update AGENTS.md. Such a tool might produce a continuously synchronized “agent onboarding layer” for software repositories. Dependencies: Generated instructions require human approval, provenance tracking, conflict detection, and mechanisms for identifying obsolete or unsafe guidance.
  • Adaptive, task-specific context selection. Agent platforms could select only the relevant portions of AGENTS.md based on the task, affected files, programming language, or subsystem. This could preserve the efficiency gains while limiting context size in large monorepos. Dependencies: The system needs reliable repository indexing, instruction-priority rules, and safeguards against omitting constraints that are globally applicable.
  • Instruction quality optimization. Research could identify which properties—specificity, organization, architecture descriptions, testing guidance, or workflow constraints—produce the greatest improvements in runtime, token usage, correctness, and safety. This may lead to linters or quality scores for AGENTS.md files. Dependencies: The current study does not isolate which content categories caused the observed effect, and efficiency improvements may not generalize to all instruction styles.
  • High-reliability autonomous software maintenance. With additional correctness and security validation, repository instructions could support agents performing larger refactorings, dependency upgrades, vulnerability repairs, test migration, and multi-module changes. Agents could use project-specific constraints to generate patches that are easier to review and integrate. Dependencies: Larger tasks introduce more failure modes than the small, code-only changes studied here. Deployment would require strong tests, static analysis, provenance records, human approval, and rollback mechanisms.
  • Enterprise agent orchestration and multi-agent workflows. In complex organizations, AGENTS.md could become a shared contract used by coding, testing, documentation, security, and release agents. Different agents could use the same repository-level rules while applying role-specific capabilities. Dependencies: Multi-agent systems need formal instruction precedence, protection against malicious or contradictory instructions, identity and authorization controls, and auditability.
  • Energy- and sustainability-aware software development. Reduced execution time and token generation could lower the compute and energy requirements of large-scale agentic development. Organizations could incorporate token, runtime, and estimated energy metrics into sustainable software-engineering dashboards. Dependencies: The paper does not measure energy or emissions directly. Environmental benefits depend on model hardware, datacenter energy sources, caching, workload volume, and whether efficiency gains encourage greater overall agent usage.
  • Policy and organizational standards for autonomous coding. Standards bodies and technology organizations could define recommended practices for repository-level agent instructions, including minimum documentation, security restrictions, review requirements, and change history. Procurement policies could require vendors to expose instruction sources and execution traces. Dependencies: Standards should distinguish guidance from authorization. An AGENTS.md file must not be treated as sufficient approval for production changes, access to secrets, or safety-critical operations.
  • Benchmarks for context-aware AI coding agents. Future academic and industrial benchmarks could compare agents across controlled levels of repository context: no instructions, minimal instructions, detailed instructions, conflicting instructions, and dynamically retrieved instructions. Evaluation could combine task success, patch correctness, runtime, token cost, security, and maintainability. Dependencies: Benchmarks need diverse repositories, realistic issues, repeated stochastic trials, multiple model families, and protection against contamination from training data or benchmark-specific instructions.
  • Integration with software supply-chain security. Agent instructions could specify approved dependencies, secure coding practices, required scanners, license policies, and prohibited operations. Agents might automatically run security checks and produce auditable evidence before creating a pull request. Dependencies: Because instruction files are repository-controlled and potentially modifiable, they must be treated as untrusted input unless protected by code ownership, signed commits, policy enforcement, and independent security tooling.
  • Empirical models for agent capacity planning. Organizations could use repository characteristics and instruction-file quality to predict expected agent latency, token demand, and infrastructure requirements. This would support budgeting and scheduling for large fleets of autonomous development agents. Dependencies: Predictive models require substantially more data than the study provides and must account for model updates, task complexity, repository size, tool latency, and failures—not only median runtime and token usage.

Glossary

  • Acceptance criteria: Conditions that define when a software task is considered successfully completed. “acceptance criteria”
  • Agent–computer interface: An interface through which an AI agent interacts with a computer environment, including tools for navigation and command execution. “SWE-agent emphasizes agent–computer interface design”
  • Agentic: Describing systems that can independently plan and perform actions toward a goal. “agentic coding workflows”
  • AGENTS.md: A repository-level instruction file that provides coding agents with project-specific guidance. “the presence of an AGENTS.md file”
  • Autonomous coding agent: An AI system capable of completing software-development tasks with limited human intervention. “autonomous AI coding agent”
  • Cached input tokens: Input tokens reused from previously processed context rather than newly processed each time. “cached input tokens”
  • Codebase: The complete collection of source code and related files forming a software project. “understand and contribute to a codebase”
  • Computational resources: Quantifiable computing capacity or cost required to perform a task. “the computational resources required to complete a development task”
  • Confounding effect: An influence that makes it difficult to determine whether an observed result was caused by the factor being studied. “This configuration minimizes confounding effects”
  • Context engineering: The deliberate design and organization of information supplied to an AI system to shape its behavior. “a mechanism for context engineering in agentic coding workflows”
  • Context management: The process of selecting, organizing, and maintaining information available to an AI agent during execution. “context management for repository navigation”
  • Continuous development workflow: An ongoing software-development process in which changes are repeatedly developed, tested, and integrated. “continuous development workflows”
  • Docker environment: An isolated execution environment created using Docker containers. “experiments were conducted in isolated Docker environments”
  • Empirical study: Research based on systematic observation or measurement of real-world data. “we conduct an empirical study on real GitHub pull requests”
  • Exploratory navigation: Investigating a repository to infer its structure, files, or conventions before making changes. “reducing the need for agents to infer project organization through exploratory navigation”
  • Functional equivalence: The property of producing the same externally observable behavior as another implementation. “the functional equivalence to the merged PR”
  • GitHub issue: A structured GitHub record describing a software problem, request, or task. “a GitHub-issue-style task statement”
  • Issue resolution success: The extent to which an automated system successfully addresses the problem described in an issue. “based on issue resolution success and test pass rates”
  • LLM: A neural LLM trained on large text datasets that can generate and analyze natural language or code. “LLMs are now routinely used”
  • LLM-based autonomous coding agent: A software-development agent whose reasoning and generation capabilities are provided by a LLM. “LLM-based autonomous coding agents”
  • Operational efficiency: The amount of time or computational resources required to complete a task. “focusing on the operational efficiency of agents”
  • Operationalize: To define an abstract concept in terms of measurable variables or procedures. “We operationalize ‘resources’ using (i) token usage and (ii) wall-clock time-to-completion”
  • Paired design: An experimental design that compares matched observations under different conditions. “The resulting setup constitutes a paired within-task design”
  • Pull request (PR): A proposed set of repository changes submitted for review and possible integration. “we randomly sample 10 and select up to 15 merged pull requests”
  • Repository snapshot: A fixed representation of a repository’s files and state at a particular point in time. “keeping the task and repository snapshot constant”
  • Resource usage: The quantity of computational assets consumed during execution, such as time or tokens. “Resource Usage With and Without AGENTS.md”
  • Sandboxed environment: An isolated execution space that restricts what a program or agent can access or modify. “The agent was granted access only to this sandboxed environment”
  • Semantic correctness: The degree to which an output has the intended meaning or behavior. “the semantic correctness”
  • Standard deviation: A statistical measure of the dispersion of observations around their mean. “std dev 182.24”
  • Structural similarity: The degree to which two software artifacts share comparable organization or structure. “structural similarity analyzes”
  • SWE-bench: A benchmark that evaluates LLMs or agents on resolving real-world GitHub software issues. “Benchmarks such as SWE-bench operationalize this setting”
  • Taxonomy: A structured classification system used to organize concepts or artifacts into categories. “content categories derived from the taxonomy”
  • Token consumption: The number of language-model tokens processed or generated during an interaction. “reduced output token consumption”
  • Token usage: The total number of input, cached, and output tokens consumed by an AI system. “We collected the following operational performance metrics during each run”
  • Tool use: An agent’s ability to invoke external commands, programs, or services while performing a task. “supports repository-scale context and tool use”
  • Wall-clock time: The actual elapsed time between the beginning and end of an operation. “We measure wall-clock execution time”
  • Wilcoxon signed-rank test: A nonparametric statistical test for comparing paired observations. “Wilcoxon signed-rank test (p<0.05p < 0.05)”

Open Problems

We found no open problems mentioned in this paper.

Tweets

Sign up for free to view the 17 tweets with 309 likes about this paper.