You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a programmer, I want an AGENTS file that can be safely excluded from version control, so I can manage my personal context settings for a given project.
Solution
Add AGENTS.local.md to the specification
Alternatives
We have directory support #9 where we can decide the format of the file and ignore it
Reacted by Mike Prinsloo, Matan Yadaev, Naoya Yasuda, 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко), Yuta Kumagai, Shai Coleman, Dave Hulbert, Pascal de Ladurantaye, Jay Park, boiledfroginthewell and 25 more
For private per-project preferences that shouldn’t be checked into version control, prefer CLAUDE.local.md: it is automatically loaded and added to .gitignore.
The Claude Code docs no longer mention CLAUDE.local.md files. Instead, the recommended approach seems to be using the @ file-import syntax (e.g. add a line with @CLAUDE.local.md to CLAUDE.md). These files get loaded automatically when Claude Code starts up if they are present, and they can then be added to your .gitignore (e.g. *.local.md). I would love to see a similar syntax added to AGENTS.md. It seems like a more comprehensive approach to this problem.
Maybe we can look for a way of integrating, systems. I actually pulled two
AI. That way my main agent wasn’t being overwhelmed and my other agent was
extra insurance. No one could state favoritism or un codes from AI not
being accurate because I had two of them.
Pamela J Richardson
Proposal: Formalize AGENTS.local.md in the Specification
Problem
AGENTS.md is committed to version control and shared across teams. Individual developers need a place for personal, machine-local, or role-scoped instructions that should not be committed:
Personal coding style preferences (e.g., "I prefer verbose test output")
Local environment paths and ports
Tool-specific overrides (e.g., "never run npm run dev for me")
Temporary experiment flags or debug instructions
Without a standard convention, each tool implements its own ad-hoc solution, fragmenting the ecosystem. This issue has 22 reactions and Issue #72 has 8 more — the demand is clear.
Current Fragmentation
Tools are already implementing this independently:
Without spec-level guidance, each tool will implement semantics differently (additive vs override, standalone-allowed vs base-required, etc).
Proposed Spec Addition
Naming Convention
For any instruction file FOO.md, the local variant is FOO.local.md:
Base file
Local variant
AGENTS.md
AGENTS.local.md
AGENTS.md (in src/)
AGENTS.local.md (in src/)
Semantics
Additive merge: When both AGENTS.md and AGENTS.local.md exist in the same directory, agents MUST load both. Local content is appended after base content.
Local-only is valid: AGENTS.local.md MAY exist without a corresponding AGENTS.md. It stands alone in that case.
Precedence: In case of conflicting instructions, AGENTS.local.md takes precedence over AGENTS.md (last-wins, same as nested directory overrides).
Gitignore: *.local.md SHOULD be added to .gitignore. Repos MAY ship a .gitignore entry or a template file.
Updated Scope Resolution Order
~/.agents/AGENTS.md ← Global base
├── .agents/AGENTS.md ← Project base (committed)
├── AGENTS.md ← Project active (committed)
├── AGENTS.local.md ← Project local (gitignored)
│ ├── src/AGENTS.md ← Folder rules (committed)
│ └── src/AGENTS.local.md ← Folder local (gitignored)
Local files are loaded immediately after their same-directory base counterpart.
Why .local.md over alternatives
Alternative
Why not
AGENTS.override.md
Implies full replacement, not additive. Users want to extend, not replace.
Directory-based (.agents/local.md)
Loses the 1:1 mapping with base files in nested directories.
@import syntax
Requires parser changes in every agent. .local.md is zero-config.
Env vars / config fields
Not file-based; harder to discover and version locally.
The .local.md convention is already established by Claude Code, Vite (.env.local), ESLint (.eslintrc.local.*), and MUI X.
Implementation Guidance for Agent Authors
After loading FOO.md from a directory, check for FOO.local.md in the same directory.
If found, append its content (with a separator) after the base content.
Apply the same precedence rules: local overrides base for conflicting instructions.
No schema changes required — both files are plain Markdown.
Template for Repos
Repos MAY ship an AGENTS.local.md.template (committed) that developers copy to AGENTS.local.md (gitignored):
<!-- Copy to AGENTS.local.md — this file is gitignored --><!-- Add your personal preferences below -->## My Preferences- (add your local instructions here)
Happy to contribute a PR for this if the maintainers are open to it.
Reacted by samzong, Ben, Igor Kupczyński, Ilkka Kuusisto, Emiliano Fernandez, Oliver, Neroll and David A. Buser
Activity
Matan-Yadaev-Forter commentedon Aug 24, 2025
Prior Art:
CLAUDE.local.mdhttps://docs.anthropic.com/en/docs/claude-code/memory?utm_source=chatgpt.com#how-claude-looks-up-memoriesyordis commentedon Jan 4, 2026
@Matan-Yadaev-Forter it seens that the link is broken, do you know where the new link suppose to point to?
mattrossman commentedon Feb 4, 2026
CLAUDE.local.mdis mentioned in the docs here: https://code.claude.com/docs/en/memory#claude-md-importsdavidmyersdev commentedon Mar 15, 2026
The Claude Code docs no longer mention
CLAUDE.local.mdfiles. Instead, the recommended approach seems to be using the@file-import syntax (e.g. add a line with@CLAUDE.local.mdtoCLAUDE.md). These files get loaded automatically when Claude Code starts up if they are present, and they can then be added to your.gitignore(e.g.*.local.md). I would love to see a similar syntax added toAGENTS.md. It seems like a more comprehensive approach to this problem.Pjrich1313 commentedon Mar 15, 2026
hashlash commentedon Apr 14, 2026
Per 2026-04-09 they've added it back 🤔
HaleTom commentedon Jun 18, 2026
Proposal: Formalize
AGENTS.local.mdin the SpecificationProblem
AGENTS.md is committed to version control and shared across teams. Individual developers need a place for personal, machine-local, or role-scoped instructions that should not be committed:
npm run devfor me")Without a standard convention, each tool implements its own ad-hoc solution, fragmenting the ecosystem. This issue has 22 reactions and Issue #72 has 8 more — the demand is clear.
Current Fragmentation
Tools are already implementing this independently:
CLAUDE.local.md(prior art, in official docs)AGENTS.local.md.local.mdsupportAGENTS.local.md.templateWithout spec-level guidance, each tool will implement semantics differently (additive vs override, standalone-allowed vs base-required, etc).
Proposed Spec Addition
Naming Convention
For any instruction file
FOO.md, the local variant isFOO.local.md:AGENTS.mdAGENTS.local.mdAGENTS.md(insrc/)AGENTS.local.md(insrc/)Semantics
AGENTS.mdandAGENTS.local.mdexist in the same directory, agents MUST load both. Local content is appended after base content.AGENTS.local.mdMAY exist without a correspondingAGENTS.md. It stands alone in that case.AGENTS.local.mdtakes precedence overAGENTS.md(last-wins, same as nested directory overrides).*.local.mdSHOULD be added to.gitignore. Repos MAY ship a.gitignoreentry or a template file.Updated Scope Resolution Order
Local files are loaded immediately after their same-directory base counterpart.
Why
.local.mdover alternativesAGENTS.override.md.agents/local.md)@importsyntax.local.mdis zero-config.The
.local.mdconvention is already established by Claude Code, Vite (.env.local), ESLint (.eslintrc.local.*), and MUI X.Implementation Guidance for Agent Authors
FOO.mdfrom a directory, check forFOO.local.mdin the same directory.Template for Repos
Repos MAY ship an
AGENTS.local.md.template(committed) that developers copy toAGENTS.local.md(gitignored):Happy to contribute a PR for this if the maintainers are open to it.
maxwellb commentedon Aug 5, 2026
Just dropping in.
This sounds like a good place for XDG Base Directories:
$XDG_CONFIG_HOME/agents/AGENTS.mdplus any of$XDG_CONFIG_DIRS/agents/AGENTS.md.Thank you for your consideration.
EDIT: Please see #91 as a possible resolution to this proposal.
jhm-ciberman commentedon Aug 26, 2026
This needs to be standardized. Managing local rules is impossible with current standards.